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 | |
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')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 3 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 50 |
3 files changed, 17 insertions, 48 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index 1a1ffcc3c..d73525b70 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -2879,10 +2879,8 @@ struct { struct HPMHookPoint *HP_map_versionscreen_post; struct HPMHookPoint *HP_map_arg_next_value_pre; struct HPMHookPoint *HP_map_arg_next_value_post; - struct HPMHookPoint *HP_map_addblcell_pre; - struct HPMHookPoint *HP_map_addblcell_post; - struct HPMHookPoint *HP_map_delblcell_pre; - struct HPMHookPoint *HP_map_delblcell_post; + struct HPMHookPoint *HP_map_update_cell_bl_pre; + struct HPMHookPoint *HP_map_update_cell_bl_post; struct HPMHookPoint *HP_map_get_new_bonus_id_pre; struct HPMHookPoint *HP_map_get_new_bonus_id_post; struct HPMHookPoint *HP_map_add_questinfo_pre; @@ -7918,10 +7916,8 @@ struct { int HP_map_versionscreen_post; int HP_map_arg_next_value_pre; int HP_map_arg_next_value_post; - int HP_map_addblcell_pre; - int HP_map_addblcell_post; - int HP_map_delblcell_pre; - int HP_map_delblcell_post; + int HP_map_update_cell_bl_pre; + int HP_map_update_cell_bl_post; int HP_map_get_new_bonus_id_pre; int HP_map_get_new_bonus_id_post; int HP_map_add_questinfo_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 552d49b4f..05d484d20 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -1461,8 +1461,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->helpscreen, HP_map_helpscreen) }, { HP_POP(map->versionscreen, HP_map_versionscreen) }, { HP_POP(map->arg_next_value, HP_map_arg_next_value) }, - { HP_POP(map->addblcell, HP_map_addblcell) }, - { HP_POP(map->delblcell, HP_map_delblcell) }, + { HP_POP(map->update_cell_bl, HP_map_update_cell_bl) }, { HP_POP(map->get_new_bonus_id, HP_map_get_new_bonus_id) }, { HP_POP(map->add_questinfo, HP_map_add_questinfo) }, { HP_POP(map->remove_questinfo, HP_map_remove_questinfo) }, 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; |