diff options
author | Haruna <haru@dotalux.com> | 2014-12-04 00:23:58 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2014-12-04 00:23:58 +0100 |
commit | 867ca32885a67fa69a00a3814ba33208274e81ba (patch) | |
tree | 0f59133fa0dbeeabbf2416e2ad6598f2d3305701 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | f3b72587466f484b62145dfe616d5f9e9e29e0b9 (diff) | |
parent | 727c785081bd045f2f3e7ccb8f2d825d1a777998 (diff) | |
download | hercules-867ca32885a67fa69a00a3814ba33208274e81ba.tar.gz hercules-867ca32885a67fa69a00a3814ba33208274e81ba.tar.bz2 hercules-867ca32885a67fa69a00a3814ba33208274e81ba.tar.xz hercules-867ca32885a67fa69a00a3814ba33208274e81ba.zip |
Merge pull request #400 from 4144/pcequip
Split functions pc_equipitem and pc_unequipitem.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 35e98693c..954436e94 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -49467,6 +49467,32 @@ int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { } return retVal___; } +void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int pos) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_equipitem_pos_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item_data *id, int *pos); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_equipitem_pos_pre[hIndex].func; + preHookFunc(sd, id, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.equipitem_pos(sd, id, pos); + } + if( HPMHooks.count.HP_pc_equipitem_pos_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_equipitem_pos_post[hIndex].func; + postHookFunc(sd, id, &pos); + } + } + return; +} int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { int hIndex = 0; int retVal___ = 0; @@ -49494,6 +49520,32 @@ int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { } return retVal___; } +void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_unequipitem_pos_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_pre[hIndex].func; + preHookFunc(sd, &n, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.unequipitem_pos(sd, n, pos); + } + if( HPMHooks.count.HP_pc_unequipitem_pos_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_post[hIndex].func; + postHookFunc(sd, &n, &pos); + } + } + return; +} int HP_pc_checkitem(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; |