diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2015-12-06 15:29:01 +0100 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2015-12-06 15:29:01 +0100 |
commit | 8750ef0953362426494678b7dd6599906dbe1dca (patch) | |
tree | a275dcb10b681c3c0225a11e3c8cc11f2e5a051f | |
parent | 60497e4a95836f3a6989d1cac940fd962224172c (diff) | |
download | hercules-8750ef0953362426494678b7dd6599906dbe1dca.tar.gz hercules-8750ef0953362426494678b7dd6599906dbe1dca.tar.bz2 hercules-8750ef0953362426494678b7dd6599906dbe1dca.tar.xz hercules-8750ef0953362426494678b7dd6599906dbe1dca.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
-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 | 27 |
3 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 39543d1a4..b6afa8fcf 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -3047,6 +3047,8 @@ struct { struct HPMHookPoint *HP_map_getmob_boss_post; struct HPMHookPoint *HP_map_id2boss_pre; struct HPMHookPoint *HP_map_id2boss_post; + struct HPMHookPoint *HP_map_race_id2mask_pre; + struct HPMHookPoint *HP_map_race_id2mask_post; struct HPMHookPoint *HP_map_reloadnpc_pre; struct HPMHookPoint *HP_map_reloadnpc_post; struct HPMHookPoint *HP_map_check_dir_pre; @@ -8828,6 +8830,8 @@ struct { int HP_map_getmob_boss_post; int HP_map_id2boss_pre; int HP_map_id2boss_post; + int HP_map_race_id2mask_pre; + int HP_map_race_id2mask_post; int HP_map_reloadnpc_pre; int HP_map_reloadnpc_post; int HP_map_check_dir_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 0e8322917..c937241f3 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -1553,6 +1553,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->nick2sd, HP_map_nick2sd) }, { HP_POP(map->getmob_boss, HP_map_getmob_boss) }, { HP_POP(map->id2boss, HP_map_id2boss) }, + { HP_POP(map->race_id2mask, HP_map_race_id2mask) }, { HP_POP(map->reloadnpc, HP_map_reloadnpc) }, { HP_POP(map->check_dir, HP_map_check_dir) }, { HP_POP(map->calc_dir, HP_map_calc_dir) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 0adf20592..78c9136de 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -40506,6 +40506,33 @@ struct mob_data* HP_map_id2boss(int id) { } return retVal___; } +uint32 HP_map_race_id2mask(int race) { + int hIndex = 0; + uint32 retVal___ = 0; + if( HPMHooks.count.HP_map_race_id2mask_pre ) { + uint32 (*preHookFunc) (int *race); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_race_id2mask_pre[hIndex].func; + retVal___ = preHookFunc(&race); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.race_id2mask(race); + } + if( HPMHooks.count.HP_map_race_id2mask_post ) { + uint32 (*postHookFunc) (uint32 retVal___, int *race); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_race_id2mask_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &race); + } + } + return retVal___; +} void HP_map_reloadnpc(bool clear) { int hIndex = 0; if( HPMHooks.count.HP_map_reloadnpc_pre ) { |