Skip to content

Commit

Permalink
HPM Hooks Update
Browse files Browse the repository at this point in the history
Signed-off-by: HerculesWSAPI <[email protected]>
  • Loading branch information
HerculesWSAPI committed Dec 16, 2018
1 parent 4af25db commit 1655797
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/plugins/HPMHooking/HPMHooking.Defs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6238,8 +6238,8 @@ typedef int (*HPMHOOK_pre_pc_bonus_addeff) (struct s_addeffect **effect, int *ma
typedef int (*HPMHOOK_post_pc_bonus_addeff) (int retVal___, struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration);
typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill **effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target);
typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target);
typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate);
typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate);
typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, int *id, bool *is_group, int *race, int *rate);
typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate);
typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src);
typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src);
typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -63843,29 +63843,29 @@ int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum
}
return retVal___;
}
int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) {
int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_bonus_item_drop_pre > 0) {
int (*preHookFunc) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate);
int (*preHookFunc) (struct s_add_drop **drop, const short *max, int *id, bool *is_group, int *race, int *rate);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_pre[hIndex].func;
retVal___ = preHookFunc(&drop, &max, &id, &group, &race, &rate);
retVal___ = preHookFunc(&drop, &max, &id, &is_group, &race, &rate);
}
if (*HPMforce_return) {
*HPMforce_return = false;
return retVal___;
}
}
{
retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, group, race, rate);
retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, is_group, race, rate);
}
if (HPMHooks.count.HP_pc_bonus_item_drop_post > 0) {
int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate);
int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_post[hIndex].func;
retVal___ = postHookFunc(retVal___, drop, max, id, group, race, rate);
retVal___ = postHookFunc(retVal___, drop, max, id, is_group, race, rate);
}
}
return retVal___;
Expand Down

0 comments on commit 1655797

Please sign in to comment.