diff options
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 205 |
1 files changed, 199 insertions, 6 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 8823eedae..67a3ae731 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -763,6 +763,32 @@ void HP_atcommand_base_commands(void) { } return; } +bool HP_atcommand_add(char *name, AtCommandFunc func) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_atcommand_add_pre ) { + bool (*preHookFunc) (char *name, AtCommandFunc *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_add_pre[hIndex].func; + retVal___ = preHookFunc(name, &func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.add(name, func); + } + if( HPMHooks.count.HP_atcommand_add_post ) { + bool (*postHookFunc) (bool retVal___, char *name, AtCommandFunc *func); + 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); + } + } + return retVal___; +} /* battle */ void HP_battle_init(void) { int hIndex = 0; @@ -26694,6 +26720,31 @@ void HP_instance_final(void) { } return; } +void HP_instance_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_reload_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_reload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.reload(); + } + if( HPMHooks.count.HP_instance_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} int HP_instance_create(int party_id, const char *name, enum instance_owner_type type) { int hIndex = 0; int retVal___ = 0; @@ -26823,6 +26874,96 @@ int HP_instance_mapid2imapid(int16 m, int instance_id) { } return retVal___; } +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); + 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); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + 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++ ) { + postHookFunc = HPMHooks.list.HP_instance_mapname2imap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, map_name, &instance_id); + } + } + return retVal___; +} +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); + 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); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.instance.map_npcsub(bl, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_instance_map_npcsub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); + 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); + va_end(args___copy); + } + } + return retVal___; +} +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); + 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); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.instance.init_npc(bl, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_instance_init_npc_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); + 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); + va_end(args___copy); + } + } + return retVal___; +} void HP_instance_destroy(int instance_id) { int hIndex = 0; if( HPMHooks.count.HP_instance_destroy_pre ) { @@ -36471,6 +36612,32 @@ void HP_map_delblcell(struct block_list *bl) { } return; } +int HP_map_get_new_bonus_id(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_get_new_bonus_id_pre ) { + int (*preHookFunc) (void); + 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 ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.get_new_bonus_id(); + } + if( HPMHooks.count.HP_map_get_new_bonus_id_post ) { + int (*postHookFunc) (int retVal___); + 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___; +} /* mapit */ struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) { int hIndex = 0; @@ -56265,14 +56432,14 @@ int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, } return retVal___; } -int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick, bool load) { +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, bool *load); + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick); for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_skill_blockpc_start_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, &tick, &load); + retVal___ = preHookFunc(sd, &skill_id, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56280,13 +56447,13 @@ 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, load); + 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, bool *load); + 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, &load); + retVal___ = postHookFunc(retVal___, sd, &skill_id, &tick); } } return retVal___; @@ -58454,6 +58621,32 @@ int HP_skill_get_new_group_id(void) { } return retVal___; } +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); + 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); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + 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++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_shadowform_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &damage, &hit); + } + } + return retVal___; +} /* status */ int HP_status_init(void) { int hIndex = 0; |