diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-07-22 21:57:13 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-07-22 21:57:13 +0200 |
commit | cc6e1d5bd348d65f55ab553f01b781c4b69d5ed6 (patch) | |
tree | 2a3222e032f43bbe92e585c83f6397d3a3bdf532 /src/plugins/HPMHooking/HPMHooking.Hooks.inc | |
parent | ca39e47dc650e60bff54a8d276d8f7126ad1a5df (diff) | |
download | hercules-cc6e1d5bd348d65f55ab553f01b781c4b69d5ed6.tar.gz hercules-cc6e1d5bd348d65f55ab553f01b781c4b69d5ed6.tar.bz2 hercules-cc6e1d5bd348d65f55ab553f01b781c4b69d5ed6.tar.xz hercules-cc6e1d5bd348d65f55ab553f01b781c4b69d5ed6.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 50 |
1 files changed, 12 insertions, 38 deletions
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; |