From cc6e1d5bd348d65f55ab553f01b781c4b69d5ed6 Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Tue, 22 Jul 2014 21:57:13 +0200 Subject: HPM Hooks Update Signed-off-by: HerculesWSAPI --- src/plugins/HPMHooking/HPMHooking.Hooks.inc | 50 +++++++---------------------- 1 file changed, 12 insertions(+), 38 deletions(-) (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc') diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 8fc718f20..8f209fe5c 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -38310,40 +38310,14 @@ bool HP_map_arg_next_value(const char *option, int i, int argc, bool must) { } return retVal___; } -void HP_map_addblcell(struct block_list *bl) { +void HP_map_update_cell_bl(struct block_list *bl, bool increase) { int hIndex = 0; - if( HPMHooks.count.HP_map_addblcell_pre ) { - void (*preHookFunc) (struct block_list *bl); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblcell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addblcell_pre[hIndex].func; - preHookFunc(bl); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.map.addblcell(bl); - } - if( HPMHooks.count.HP_map_addblcell_post ) { - void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblcell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addblcell_post[hIndex].func; - postHookFunc(bl); - } - } - return; -} -void HP_map_delblcell(struct block_list *bl) { - int hIndex = 0; - if( HPMHooks.count.HP_map_delblcell_pre ) { - void (*preHookFunc) (struct block_list *bl); + if( HPMHooks.count.HP_map_update_cell_bl_pre ) { + void (*preHookFunc) (struct block_list *bl, bool *increase); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblcell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_delblcell_pre[hIndex].func; - preHookFunc(bl); + 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); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38351,13 +38325,13 @@ void HP_map_delblcell(struct block_list *bl) { } } { - HPMHooks.source.map.delblcell(bl); + HPMHooks.source.map.update_cell_bl(bl, increase); } - if( HPMHooks.count.HP_map_delblcell_post ) { - void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblcell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_delblcell_post[hIndex].func; - postHookFunc(bl); + 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++ ) { + postHookFunc = HPMHooks.list.HP_map_update_cell_bl_post[hIndex].func; + postHookFunc(bl, &increase); } } return; -- cgit v1.2.3-70-g09d2