summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc47
1 files changed, 37 insertions, 10 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 35d5b8419..f74e08187 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -16980,6 +16980,32 @@ void HP_clif_deleteskill(struct map_session_data *sd, int id) {
}
return;
}
+void HP_clif_playerSkillToPacket(struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_playerSkillToPacket_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct SKILLDATA **skillData, int *skillId, int *idx, bool *newSkill);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playerSkillToPacket_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_playerSkillToPacket_pre[hIndex].func;
+ preHookFunc(&sd, &skillData, &skillId, &idx, &newSkill);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.playerSkillToPacket(sd, skillData, skillId, idx, newSkill);
+ }
+ if (HPMHooks.count.HP_clif_playerSkillToPacket_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playerSkillToPacket_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_playerSkillToPacket_post[hIndex].func;
+ postHookFunc(sd, skillData, skillId, idx, newSkill);
+ }
+ }
+ return;
+}
void HP_clif_party_created(struct map_session_data *sd, int result) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_party_created_pre > 0) {
@@ -21386,10 +21412,10 @@ void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
}
return;
}
-void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response) {
+void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_npc_market_purchase_ack_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list, unsigned char *response);
+ void (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list, enum market_buy_result *response);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_pre[hIndex].func;
@@ -21404,7 +21430,7 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct i
HPMHooks.source.clif.npc_market_purchase_ack(sd, item_list, response);
}
if (HPMHooks.count.HP_clif_npc_market_purchase_ack_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response);
+ void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_post[hIndex].func;
postHookFunc(sd, item_list, response);
@@ -57342,11 +57368,12 @@ void HP_npc_trader_update(int master) {
}
return;
}
-int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) {
+enum market_buy_result HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) {
+/* Unknown return type 'enum market_buy_result'. Initializing to '0'. */
int hIndex = 0;
- int retVal___ = 0;
+ enum market_buy_result retVal___ = 0;
if (HPMHooks.count.HP_npc_market_buylist_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list);
+ enum market_buy_result (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func;
@@ -57361,7 +57388,7 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis
retVal___ = HPMHooks.source.npc.market_buylist(sd, item_list);
}
if (HPMHooks.count.HP_npc_market_buylist_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list);
+ enum market_buy_result (*postHookFunc) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, item_list);
@@ -61086,11 +61113,11 @@ int HP_pc_updateweightstatus(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill) {
+int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned int pos, bool onskill) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_addautobonus_pre > 0) {
- int (*preHookFunc) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned short *pos, bool *onskill);
+ int (*preHookFunc) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned int *pos, bool *onskill);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_addautobonus_pre[hIndex].func;
@@ -61105,7 +61132,7 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc
retVal___ = HPMHooks.source.pc.addautobonus(bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill);
}
if (HPMHooks.count.HP_pc_addautobonus_post > 0) {
- int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill);
+ int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned int pos, bool onskill);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_addautobonus_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill);