diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-11-03 11:47:00 +0100 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-11-03 11:47:00 +0100 |
commit | 092949e0fea0c103c7d3fb32953182781853f575 (patch) | |
tree | 1fca8313e38d695f8f933e2519e69c28eb0eadec /src/plugins/HPMHooking | |
parent | b8abf962fd079bc3cad4498aa968f2318d1f5fde (diff) | |
download | hercules-092949e0fea0c103c7d3fb32953182781853f575.tar.gz hercules-092949e0fea0c103c7d3fb32953182781853f575.tar.bz2 hercules-092949e0fea0c103c7d3fb32953182781853f575.tar.xz hercules-092949e0fea0c103c7d3fb32953182781853f575.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 39 |
3 files changed, 38 insertions, 6 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index ba42106f6..81e0c1c2d 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -2687,6 +2687,8 @@ struct { struct HPMHookPoint *HP_map_get_new_object_id_post; struct HPMHookPoint *HP_map_search_freecell_pre; struct HPMHookPoint *HP_map_search_freecell_post; + struct HPMHookPoint *HP_map_closest_freecell_pre; + struct HPMHookPoint *HP_map_closest_freecell_post; struct HPMHookPoint *HP_map_quit_pre; struct HPMHookPoint *HP_map_quit_post; struct HPMHookPoint *HP_map_addnpc_pre; @@ -7748,6 +7750,8 @@ struct { int HP_map_get_new_object_id_post; int HP_map_search_freecell_pre; int HP_map_search_freecell_post; + int HP_map_closest_freecell_pre; + int HP_map_closest_freecell_post; int HP_map_quit_pre; int HP_map_quit_post; int HP_map_addnpc_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 21e3d616d..5fa0bff3f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -1365,6 +1365,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->find_skill_unit_oncell, HP_map_find_skill_unit_oncell) }, { HP_POP(map->get_new_object_id, HP_map_get_new_object_id) }, { HP_POP(map->search_freecell, HP_map_search_freecell) }, + { HP_POP(map->closest_freecell, HP_map_closest_freecell) }, { HP_POP(map->quit, HP_map_quit) }, { HP_POP(map->addnpc, HP_map_addnpc) }, { HP_POP(map->clearflooritem_timer, HP_map_clearflooritem_timer) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 3407c3268..9b518d097 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -35481,15 +35481,15 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { } return retVal___; } -int HP_map_count_oncell(int16 m, int16 x, int16 y, int type) { +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 ) { - int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type); + 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++ ) { preHookFunc = HPMHooks.list.HP_map_count_oncell_pre[hIndex].func; - retVal___ = preHookFunc(&m, &x, &y, &type); + retVal___ = preHookFunc(&m, &x, &y, &type, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35497,13 +35497,13 @@ int HP_map_count_oncell(int16 m, int16 x, int16 y, int type) { } } { - retVal___ = HPMHooks.source.map.count_oncell(m, x, y, type); + 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 (*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); + retVal___ = postHookFunc(retVal___, &m, &x, &y, &type, &flag); } } return retVal___; @@ -35589,6 +35589,33 @@ int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, } return retVal___; } +bool HP_map_closest_freecell(int16 m, 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, int16 *x, int16 *y, int *type, int *flag); + *HPMforce_return = false; + 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, x, y, &type, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.closest_freecell(m, x, y, type, flag); + } + if( HPMHooks.count.HP_map_closest_freecell_post ) { + bool (*postHookFunc) (bool retVal___, int16 *m, 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, x, y, &type, &flag); + } + } + return retVal___; +} int HP_map_quit(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; |