diff options
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 3792 |
1 files changed, 3321 insertions, 471 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 5690e0735..9636d67c7 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2018 Hercules Dev Team + * Copyright (C) 2013-2019 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1459,27 +1459,80 @@ bool HP_achievement_check_title(struct map_session_data *sd, int title_id) { } return retVal___; } -void HP_achievement_get_rewards(struct map_session_data *sd, const struct achievement_data *ad) { +bool HP_achievement_get_rewards(struct map_session_data *sd, const struct achievement_data *ad) { int hIndex = 0; + bool retVal___ = false; if (HPMHooks.count.HP_achievement_get_rewards_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); + bool (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_achievement_get_rewards_pre[hIndex].func; - preHookFunc(&sd, &ad); + retVal___ = preHookFunc(&sd, &ad); } if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.achievement.get_rewards(sd, ad); + retVal___ = HPMHooks.source.achievement.get_rewards(sd, ad); } if (HPMHooks.count.HP_achievement_get_rewards_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct achievement_data *ad); for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_post; hIndex++) { postHookFunc = HPMHooks.list.HP_achievement_get_rewards_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ad); + } + } + return retVal___; +} +void HP_achievement_get_rewards_buffs(struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_get_rewards_buffs_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_buffs_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_get_rewards_buffs_pre[hIndex].func; + preHookFunc(&sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.get_rewards_buffs(sd, ad); + } + if (HPMHooks.count.HP_achievement_get_rewards_buffs_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_buffs_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_get_rewards_buffs_post[hIndex].func; + postHookFunc(sd, ad); + } + } + return; +} +void HP_achievement_get_rewards_items(struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_get_rewards_items_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_get_rewards_items_pre[hIndex].func; + preHookFunc(&sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.get_rewards_items(sd, ad); + } + if (HPMHooks.count.HP_achievement_get_rewards_items_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_get_rewards_items_post[hIndex].func; postHookFunc(sd, ad); } } @@ -2806,6 +2859,32 @@ void HP_battle_reflect_damage(struct block_list *target, struct block_list *src, } return; } +void HP_battle_reflect_trap(struct block_list *target, struct block_list *src, struct Damage *md, uint16 skill_id) { + int hIndex = 0; + if (HPMHooks.count.HP_battle_reflect_trap_pre > 0) { + void (*preHookFunc) (struct block_list **target, struct block_list **src, struct Damage **md, uint16 *skill_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_trap_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_battle_reflect_trap_pre[hIndex].func; + preHookFunc(&target, &src, &md, &skill_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.battle.reflect_trap(target, src, md, skill_id); + } + if (HPMHooks.count.HP_battle_reflect_trap_post > 0) { + void (*postHookFunc) (struct block_list *target, struct block_list *src, struct Damage *md, uint16 skill_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_trap_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_battle_reflect_trap_post[hIndex].func; + postHookFunc(target, src, md, skill_id); + } + } + return; +} int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) { int hIndex = 0; int retVal___ = 0; @@ -9707,10 +9786,10 @@ void HP_clif_item_drop_announce(struct map_session_data *sd, int nameid, char *m } return; } -void HP_clif_clearunit_single(int id, clr_type type, int fd) { +void HP_clif_clearunit_single(int id, enum clr_type type, int fd) { int hIndex = 0; if (HPMHooks.count.HP_clif_clearunit_single_pre > 0) { - void (*preHookFunc) (int *id, clr_type *type, int *fd); + void (*preHookFunc) (int *id, enum clr_type *type, int *fd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_clearunit_single_pre[hIndex].func; @@ -9725,7 +9804,7 @@ void HP_clif_clearunit_single(int id, clr_type type, int fd) { HPMHooks.source.clif.clearunit_single(id, type, fd); } if (HPMHooks.count.HP_clif_clearunit_single_post > 0) { - void (*postHookFunc) (int id, clr_type type, int fd); + void (*postHookFunc) (int id, enum clr_type type, int fd); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_clearunit_single_post[hIndex].func; postHookFunc(id, type, fd); @@ -9733,10 +9812,10 @@ void HP_clif_clearunit_single(int id, clr_type type, int fd) { } return; } -void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { +void HP_clif_clearunit_area(struct block_list *bl, enum clr_type type) { int hIndex = 0; if (HPMHooks.count.HP_clif_clearunit_area_pre > 0) { - void (*preHookFunc) (struct block_list **bl, clr_type *type); + void (*preHookFunc) (struct block_list **bl, enum clr_type *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_clearunit_area_pre[hIndex].func; @@ -9751,7 +9830,7 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { HPMHooks.source.clif.clearunit_area(bl, type); } if (HPMHooks.count.HP_clif_clearunit_area_post > 0) { - void (*postHookFunc) (struct block_list *bl, clr_type type); + void (*postHookFunc) (struct block_list *bl, enum clr_type type); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_clearunit_area_post[hIndex].func; postHookFunc(bl, type); @@ -9759,10 +9838,10 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { } return; } -void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) { +void HP_clif_clearunit_delayed(struct block_list *bl, enum clr_type type, int64 tick) { int hIndex = 0; if (HPMHooks.count.HP_clif_clearunit_delayed_pre > 0) { - void (*preHookFunc) (struct block_list **bl, clr_type *type, int64 *tick); + void (*preHookFunc) (struct block_list **bl, enum clr_type *type, int64 *tick); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_pre[hIndex].func; @@ -9777,7 +9856,7 @@ void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) HPMHooks.source.clif.clearunit_delayed(bl, type, tick); } if (HPMHooks.count.HP_clif_clearunit_delayed_post > 0) { - void (*postHookFunc) (struct block_list *bl, clr_type type, int64 tick); + void (*postHookFunc) (struct block_list *bl, enum clr_type type, int64 tick); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_post[hIndex].func; postHookFunc(bl, type, tick); @@ -11890,13 +11969,65 @@ void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_car } return; } -void HP_clif_inventorylist(struct map_session_data *sd) { +void HP_clif_inventoryList(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryList_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryList_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryList(sd); + } + if (HPMHooks.count.HP_clif_inventoryList_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryList_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_inventoryItems(struct map_session_data *sd, enum inventory_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryItems_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryItems(sd, type); + } + if (HPMHooks.count.HP_clif_inventoryItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryItems_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} +void HP_clif_equipList(struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_inventorylist_pre > 0) { + if (HPMHooks.count.HP_clif_equipList_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_inventorylist_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_equipList_pre[hIndex].func; preHookFunc(&sd); } if (*HPMforce_return) { @@ -11905,24 +12036,50 @@ void HP_clif_inventorylist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.inventorylist(sd); + HPMHooks.source.clif.equipList(sd); } - if (HPMHooks.count.HP_clif_inventorylist_post > 0) { + if (HPMHooks.count.HP_clif_equipList_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_inventorylist_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_equipList_post[hIndex].func; postHookFunc(sd); } } return; } -void HP_clif_equiplist(struct map_session_data *sd) { +void HP_clif_equipItems(struct map_session_data *sd, enum inventory_type type) { int hIndex = 0; - if (HPMHooks.count.HP_clif_equiplist_pre > 0) { + if (HPMHooks.count.HP_clif_equipItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_equipItems_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.equipItems(sd, type); + } + if (HPMHooks.count.HP_clif_equipItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_equipItems_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} +void HP_clif_cartList(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cartList_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_equiplist_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cartList_pre[hIndex].func; preHookFunc(&sd); } if (*HPMforce_return) { @@ -11931,24 +12088,50 @@ void HP_clif_equiplist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.equiplist(sd); + HPMHooks.source.clif.cartList(sd); } - if (HPMHooks.count.HP_clif_equiplist_post > 0) { + if (HPMHooks.count.HP_clif_cartList_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_equiplist_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cartList_post[hIndex].func; postHookFunc(sd); } } return; } -void HP_clif_cartlist(struct map_session_data *sd) { +void HP_clif_cartItems(struct map_session_data *sd, enum inventory_type type) { int hIndex = 0; - if (HPMHooks.count.HP_clif_cartlist_pre > 0) { + if (HPMHooks.count.HP_clif_cartItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cartItems_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cartItems(sd, type); + } + if (HPMHooks.count.HP_clif_cartItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cartItems_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} +void HP_clif_inventoryExpansionInfo(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryExpansionInfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_cartlist_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpansionInfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryExpansionInfo_pre[hIndex].func; preHookFunc(&sd); } if (*HPMforce_return) { @@ -11957,17 +12140,147 @@ void HP_clif_cartlist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.cartlist(sd); + HPMHooks.source.clif.inventoryExpansionInfo(sd); } - if (HPMHooks.count.HP_clif_cartlist_post > 0) { + if (HPMHooks.count.HP_clif_inventoryExpansionInfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_cartlist_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpansionInfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryExpansionInfo_post[hIndex].func; postHookFunc(sd); } } return; } +void HP_clif_inventoryExpandAck(struct map_session_data *sd, enum expand_inventory result, int itemId) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryExpandAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum expand_inventory *result, int *itemId); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryExpandAck_pre[hIndex].func; + preHookFunc(&sd, &result, &itemId); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryExpandAck(sd, result, itemId); + } + if (HPMHooks.count.HP_clif_inventoryExpandAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum expand_inventory result, int itemId); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryExpandAck_post[hIndex].func; + postHookFunc(sd, result, itemId); + } + } + return; +} +void HP_clif_inventoryExpandResult(struct map_session_data *sd, enum expand_inventory_result result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryExpandResult_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum expand_inventory_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandResult_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryExpandResult_pre[hIndex].func; + preHookFunc(&sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryExpandResult(sd, result); + } + if (HPMHooks.count.HP_clif_inventoryExpandResult_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum expand_inventory_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandResult_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryExpandResult_post[hIndex].func; + postHookFunc(sd, result); + } + } + return; +} +void HP_clif_pInventoryExpansion(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pInventoryExpansion_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansion_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansion_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pInventoryExpansion(fd, sd); + } + if (HPMHooks.count.HP_clif_pInventoryExpansion_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansion_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansion_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pInventoryExpansionConfirmed(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionConfirmed_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pInventoryExpansionConfirmed(fd, sd); + } + if (HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionConfirmed_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pInventoryExpansionRejected(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pInventoryExpansionRejected_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionRejected_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionRejected_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pInventoryExpansionRejected(fd, sd); + } + if (HPMHooks.count.HP_clif_pInventoryExpansionRejected_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionRejected_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionRejected_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) { int hIndex = 0; if (HPMHooks.count.HP_clif_favorite_item_pre > 0) { @@ -12306,13 +12619,325 @@ void HP_clif_changed_dir(struct block_list *bl, enum send_target target) { } return; } -void HP_clif_charnameack(int fd, struct block_list *bl) { +void HP_clif_blname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_blname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_blname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.blname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_blname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_blname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_pcname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pcname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pcname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pcname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_pcname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pcname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_homname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_homname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_homname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.homname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_homname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_homname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mername_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mername_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mername_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mername_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mername_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mername_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mername_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mername_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_petname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_petname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_petname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.petname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_petname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_petname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_npcname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_npcname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_npcname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npcname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_npcname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_npcname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_guardian_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_guardian_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_guardian_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_guardian_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_guardian_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_guardian_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_guardian_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_guardian_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_additional_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_additional_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_additional_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_additional_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_additional_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_additional_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_additional_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_additional_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_normal_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_normal_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_normal_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_normal_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_normal_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_normal_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_normal_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_normal_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_chatname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_chatname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_chatname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chatname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_chatname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_chatname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_elemname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_elemname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_elemname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.elemname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_elemname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_elemname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_unknownname_ack(int fd, struct block_list *bl) { int hIndex = 0; - if (HPMHooks.count.HP_clif_charnameack_pre > 0) { + if (HPMHooks.count.HP_clif_unknownname_ack_pre > 0) { void (*preHookFunc) (int *fd, struct block_list **bl); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_charnameack_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unknownname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_unknownname_ack_pre[hIndex].func; preHookFunc(&fd, &bl); } if (*HPMforce_return) { @@ -12321,12 +12946,12 @@ void HP_clif_charnameack(int fd, struct block_list *bl) { } } { - HPMHooks.source.clif.charnameack(fd, bl); + HPMHooks.source.clif.unknownname_ack(fd, bl); } - if (HPMHooks.count.HP_clif_charnameack_post > 0) { + if (HPMHooks.count.HP_clif_unknownname_ack_post > 0) { void (*postHookFunc) (int fd, struct block_list *bl); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_charnameack_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unknownname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_unknownname_ack_post[hIndex].func; postHookFunc(fd, bl); } } @@ -14325,6 +14950,58 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, } return; } +void HP_clif_removeSpecialEffect(struct block_list *bl, int effectId, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_removeSpecialEffect_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effectId, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_pre[hIndex].func; + preHookFunc(&bl, &effectId, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.removeSpecialEffect(bl, effectId, target); + } + if (HPMHooks.count.HP_clif_removeSpecialEffect_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effectId, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_post[hIndex].func; + postHookFunc(bl, effectId, target); + } + } + return; +} +void HP_clif_removeSpecialEffect_single(struct block_list *bl, int effectId, struct block_list *targetBl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_removeSpecialEffect_single_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effectId, struct block_list **targetBl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_single_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_single_pre[hIndex].func; + preHookFunc(&bl, &effectId, &targetBl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.removeSpecialEffect_single(bl, effectId, targetBl); + } + if (HPMHooks.count.HP_clif_removeSpecialEffect_single_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effectId, struct block_list *targetBl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_single_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_single_post[hIndex].func; + postHookFunc(bl, effectId, targetBl); + } + } + return; +} void HP_clif_millenniumshield(struct block_list *bl, short shields) { int hIndex = 0; if (HPMHooks.count.HP_clif_millenniumshield_pre > 0) { @@ -14715,6 +15392,32 @@ void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd) } return; } +void HP_clif_chatRoleChange(struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_chatRoleChange_pre > 0) { + void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd, struct block_list **bl, int *isNotOwner); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatRoleChange_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_chatRoleChange_pre[hIndex].func; + preHookFunc(&cd, &sd, &bl, &isNotOwner); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chatRoleChange(cd, sd, bl, isNotOwner); + } + if (HPMHooks.count.HP_clif_chatRoleChange_post > 0) { + void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatRoleChange_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_chatRoleChange_post[hIndex].func; + postHookFunc(cd, sd, bl, isNotOwner); + } + } + return; +} void HP_clif_clearchat(struct chat_data *cd, int fd) { int hIndex = 0; if (HPMHooks.count.HP_clif_clearchat_pre > 0) { @@ -14975,6 +15678,32 @@ void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg) } return; } +void HP_clif_serviceMessageColor(struct map_session_data *sd, uint32 color, const char *msg) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_serviceMessageColor_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint32 *color, const char **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_serviceMessageColor_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_serviceMessageColor_pre[hIndex].func; + preHookFunc(&sd, &color, &msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.serviceMessageColor(sd, color, msg); + } + if (HPMHooks.count.HP_clif_serviceMessageColor_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint32 color, const char *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_serviceMessageColor_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_serviceMessageColor_post[hIndex].func; + postHookFunc(sd, color, msg); + } + } + return; +} void HP_clif_disp_overhead(struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl) { int hIndex = 0; if (HPMHooks.count.HP_clif_disp_overhead_pre > 0) { @@ -15367,14 +16096,14 @@ void HP_clif_PMIgnoreList(struct map_session_data *sd) { } return; } -void HP_clif_ShowScript(struct block_list *bl, const char *message) { +void HP_clif_ShowScript(struct block_list *bl, const char *message, enum send_target target) { int hIndex = 0; if (HPMHooks.count.HP_clif_ShowScript_pre > 0) { - void (*preHookFunc) (struct block_list **bl, const char **message); + void (*preHookFunc) (struct block_list **bl, const char **message, enum send_target *target); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_ShowScript_pre[hIndex].func; - preHookFunc(&bl, &message); + preHookFunc(&bl, &message, &target); } if (*HPMforce_return) { *HPMforce_return = false; @@ -15382,13 +16111,13 @@ void HP_clif_ShowScript(struct block_list *bl, const char *message) { } } { - HPMHooks.source.clif.ShowScript(bl, message); + HPMHooks.source.clif.ShowScript(bl, message, target); } if (HPMHooks.count.HP_clif_ShowScript_post > 0) { - void (*postHookFunc) (struct block_list *bl, const char *message); + void (*postHookFunc) (struct block_list *bl, const char *message, enum send_target target); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_ShowScript_post[hIndex].func; - postHookFunc(bl, message); + postHookFunc(bl, message, target); } } return; @@ -15809,13 +16538,39 @@ void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, u } return; } -void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int items_length) { +void HP_clif_storageList(struct map_session_data *sd, struct item *items, int items_length) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_storageList_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_storageList_pre[hIndex].func; + preHookFunc(&sd, &items, &items_length); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storageList(sd, items, items_length); + } + if (HPMHooks.count.HP_clif_storageList_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item *items, int items_length); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_storageList_post[hIndex].func; + postHookFunc(sd, items, items_length); + } + } + return; +} +void HP_clif_guildStorageList(struct map_session_data *sd, struct item *items, int items_length) { int hIndex = 0; - if (HPMHooks.count.HP_clif_storagelist_pre > 0) { + if (HPMHooks.count.HP_clif_guildStorageList_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_storagelist_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guildStorageList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guildStorageList_pre[hIndex].func; preHookFunc(&sd, &items, &items_length); } if (*HPMforce_return) { @@ -15824,17 +16579,95 @@ void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int it } } { - HPMHooks.source.clif.storagelist(sd, items, items_length); + HPMHooks.source.clif.guildStorageList(sd, items, items_length); } - if (HPMHooks.count.HP_clif_storagelist_post > 0) { + if (HPMHooks.count.HP_clif_guildStorageList_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item *items, int items_length); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_storagelist_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guildStorageList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guildStorageList_post[hIndex].func; postHookFunc(sd, items, items_length); } } return; } +void HP_clif_storageItems(struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_storageItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_storageItems_pre[hIndex].func; + preHookFunc(&sd, &type, &items, &items_length); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storageItems(sd, type, items, items_length); + } + if (HPMHooks.count.HP_clif_storageItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_storageItems_post[hIndex].func; + postHookFunc(sd, type, items, items_length); + } + } + return; +} +void HP_clif_inventoryStart(struct map_session_data *sd, enum inventory_type type, const char *name) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryStart_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryStart_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryStart_pre[hIndex].func; + preHookFunc(&sd, &type, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryStart(sd, type, name); + } + if (HPMHooks.count.HP_clif_inventoryStart_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryStart_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryStart_post[hIndex].func; + postHookFunc(sd, type, name); + } + } + return; +} +void HP_clif_inventoryEnd(struct map_session_data *sd, enum inventory_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryEnd_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryEnd_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryEnd_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryEnd(sd, type); + } + if (HPMHooks.count.HP_clif_inventoryEnd_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryEnd_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryEnd_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int max_amount) { int hIndex = 0; if (HPMHooks.count.HP_clif_updatestorageamount_pre > 0) { @@ -20528,10 +21361,10 @@ bool HP_clif_parse_roulette_db(void) { } return retVal___; } -void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID) { +void HP_clif_roulette_generate_ack(struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID) { int hIndex = 0; if (HPMHooks.count.HP_clif_roulette_generate_ack_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, int *bonusItemID); + void (*preHookFunc) (struct map_session_data **sd, enum GENERATE_ROULETTE_ACK *result, short *stage, short *prizeIdx, int *bonusItemID); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_pre[hIndex].func; @@ -20546,7 +21379,7 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re HPMHooks.source.clif.roulette_generate_ack(sd, result, stage, prizeIdx, bonusItemID); } if (HPMHooks.count.HP_clif_roulette_generate_ack_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID); + void (*postHookFunc) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_post[hIndex].func; postHookFunc(sd, result, stage, prizeIdx, bonusItemID); @@ -20554,6 +21387,32 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re } return; } +void HP_clif_roulette_close(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_roulette_close_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_close_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_roulette_close_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.roulette_close(sd); + } + if (HPMHooks.count.HP_clif_roulette_close_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_close_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_roulette_close_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_openmergeitem_pre > 0) { @@ -20659,6 +21518,32 @@ void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { } return; } +void HP_clif_mergeitems(int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mergeitems_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *index, int *amount, enum mergeitem_reason *reason); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mergeitems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mergeitems_pre[hIndex].func; + preHookFunc(&fd, &sd, &index, &amount, &reason); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mergeitems(fd, sd, index, amount, reason); + } + if (HPMHooks.count.HP_clif_mergeitems_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mergeitems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mergeitems_post[hIndex].func; + postHookFunc(fd, sd, index, amount, reason); + } + } + return; +} bool HP_clif_isdisguised(struct block_list *bl) { int hIndex = 0; bool retVal___ = false; @@ -22091,6 +22976,32 @@ void HP_clif_pSkillUp(int fd, struct map_session_data *sd) { } return; } +void HP_clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_useSkillToIdReal_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *skill_id, int *skill_lv, int *target_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useSkillToIdReal_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_useSkillToIdReal_pre[hIndex].func; + preHookFunc(&fd, &sd, &skill_id, &skill_lv, &target_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.useSkillToIdReal(fd, sd, skill_id, skill_lv, target_id); + } + if (HPMHooks.count.HP_clif_useSkillToIdReal_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useSkillToIdReal_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_useSkillToIdReal_post[hIndex].func; + postHookFunc(fd, sd, skill_id, skill_lv, target_id); + } + } + return; +} void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pUseSkillToId_pre > 0) { @@ -22117,6 +23028,58 @@ void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) { } return; } +void HP_clif_pStartUseSkillToId(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pStartUseSkillToId_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStartUseSkillToId_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pStartUseSkillToId_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pStartUseSkillToId(fd, sd); + } + if (HPMHooks.count.HP_clif_pStartUseSkillToId_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStartUseSkillToId_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pStartUseSkillToId_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pStopUseSkillToId(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pStopUseSkillToId_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopUseSkillToId_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pStopUseSkillToId_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pStopUseSkillToId(fd, sd); + } + if (HPMHooks.count.HP_clif_pStopUseSkillToId_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopUseSkillToId_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pStopUseSkillToId_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id) { int hIndex = 0; if (HPMHooks.count.HP_clif_pUseSkillToId_homun_pre > 0) { @@ -26355,6 +27318,32 @@ void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) { } return; } +void HP_clif_cashShopBuyAck(int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cashShopBuyAck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *itemId, enum CASH_SHOP_BUY_RESULT *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopBuyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cashShopBuyAck_pre[hIndex].func; + preHookFunc(&fd, &sd, &itemId, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashShopBuyAck(fd, sd, itemId, result); + } + if (HPMHooks.count.HP_clif_cashShopBuyAck_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopBuyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cashShopBuyAck_post[hIndex].func; + postHookFunc(fd, sd, itemId, result); + } + } + return; +} void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre > 0) { @@ -27475,10 +28464,10 @@ void HP_clif_pRodexCheckName(int fd, struct map_session_data *sd) { } return; } -void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name) { +void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, int class_, int base_level, const char *name) { int hIndex = 0; if (HPMHooks.count.HP_clif_rodex_checkname_result_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name); + void (*preHookFunc) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_pre[hIndex].func; @@ -27493,7 +28482,7 @@ void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, sh HPMHooks.source.clif.rodex_checkname_result(sd, char_id, class_, base_level, name); } if (HPMHooks.count.HP_clif_rodex_checkname_result_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name); + void (*postHookFunc) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_post[hIndex].func; postHookFunc(sd, char_id, class_, base_level, name); @@ -28233,14 +29222,14 @@ void HP_clif_PrivateAirshipResponse(struct map_session_data *sd, uint32 flag) { } return; } -void HP_clif_stylist_vector_init(void) { +void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_stylist_vector_init_pre > 0) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_clif_pReqStyleChange_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_init_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_stylist_vector_init_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange_pre[hIndex].func; + preHookFunc(&fd, &sd); } if (*HPMforce_return) { *HPMforce_return = false; @@ -28248,25 +29237,25 @@ void HP_clif_stylist_vector_init(void) { } } { - HPMHooks.source.clif.stylist_vector_init(); + HPMHooks.source.clif.pReqStyleChange(fd, sd); } - if (HPMHooks.count.HP_clif_stylist_vector_init_post > 0) { - void (*postHookFunc) (void); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_init_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_stylist_vector_init_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_clif_pReqStyleChange_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqStyleChange_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -void HP_clif_stylist_vector_clear(void) { +void HP_clif_pReqStyleChange2(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_stylist_vector_clear_pre > 0) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_clif_pReqStyleChange2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_clear_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_stylist_vector_clear_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_pre[hIndex].func; + preHookFunc(&fd, &sd); } if (*HPMforce_return) { *HPMforce_return = false; @@ -28274,80 +29263,286 @@ void HP_clif_stylist_vector_clear(void) { } } { - HPMHooks.source.clif.stylist_vector_clear(); + HPMHooks.source.clif.pReqStyleChange2(fd, sd); } - if (HPMHooks.count.HP_clif_stylist_vector_clear_post > 0) { - void (*postHookFunc) (void); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_clear_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_stylist_vector_clear_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_clif_pReqStyleChange2_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -bool HP_clif_stylist_read_db_libconfig(void) { +void HP_clif_pStyleClose(int fd, struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_pre > 0) { - bool (*preHookFunc) (void); + if (HPMHooks.count.HP_clif_pStyleClose_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_pre[hIndex].func; - retVal___ = preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pStyleClose_pre[hIndex].func; + preHookFunc(&fd, &sd); } if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.clif.stylist_read_db_libconfig(); + HPMHooks.source.clif.pStyleClose(fd, sd); } - if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_post > 0) { - bool (*postHookFunc) (bool retVal___); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if (HPMHooks.count.HP_clif_pStyleClose_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pStyleClose_post[hIndex].func; + postHookFunc(fd, sd); } } - return retVal___; + return; } -bool HP_clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { +void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag) { int hIndex = 0; - bool retVal___ = false; - if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_pre > 0) { - bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source); + if (HPMHooks.count.HP_clif_style_change_response_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum stylist_shop *flag); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_sub_pre[hIndex].func; - retVal___ = preHookFunc(&it, &idx, &source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_style_change_response_pre[hIndex].func; + preHookFunc(&sd, &flag); } if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.clif.stylist_read_db_libconfig_sub(it, idx, source); + HPMHooks.source.clif.style_change_response(sd, flag); } - if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_post > 0) { - bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, it, idx, source); + if (HPMHooks.count.HP_clif_style_change_response_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum stylist_shop flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_style_change_response_post[hIndex].func; + postHookFunc(sd, flag); } } - return retVal___; + return; +} +void HP_clif_pPetEvolution(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pPetEvolution_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetEvolution_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pPetEvolution_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPetEvolution(fd, sd); + } + if (HPMHooks.count.HP_clif_pPetEvolution_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetEvolution_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pPetEvolution_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_petEvolutionResult(int fd, enum pet_evolution_result result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_petEvolutionResult_pre > 0) { + void (*preHookFunc) (int *fd, enum pet_evolution_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petEvolutionResult_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_petEvolutionResult_pre[hIndex].func; + preHookFunc(&fd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.petEvolutionResult(fd, result); + } + if (HPMHooks.count.HP_clif_petEvolutionResult_post > 0) { + void (*postHookFunc) (int fd, enum pet_evolution_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petEvolutionResult_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_petEvolutionResult_post[hIndex].func; + postHookFunc(fd, result); + } + } + return; +} +void HP_clif_party_dead_notification(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_party_dead_notification_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_dead_notification_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_party_dead_notification_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_dead_notification(sd); + } + if (HPMHooks.count.HP_clif_party_dead_notification_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_dead_notification_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_party_dead_notification_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_pMemorialDungeonCommand(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pMemorialDungeonCommand_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMemorialDungeonCommand_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pMemorialDungeonCommand_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMemorialDungeonCommand(fd, sd); + } + if (HPMHooks.count.HP_clif_pMemorialDungeonCommand_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMemorialDungeonCommand_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pMemorialDungeonCommand_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_camera_showWindow(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_camera_showWindow_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_showWindow_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_camera_showWindow_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.camera_showWindow(sd); + } + if (HPMHooks.count.HP_clif_camera_showWindow_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_showWindow_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_camera_showWindow_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_camera_change(struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_camera_change_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, float *range, float *rotation, float *latitude, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_change_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_camera_change_pre[hIndex].func; + preHookFunc(&sd, &range, &rotation, &latitude, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.camera_change(sd, range, rotation, latitude, target); + } + if (HPMHooks.count.HP_clif_camera_change_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_change_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_camera_change_post[hIndex].func; + postHookFunc(sd, range, rotation, latitude, target); + } + } + return; +} +void HP_clif_pCameraInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pCameraInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCameraInfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCameraInfo_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCameraInfo(fd, sd); + } + if (HPMHooks.count.HP_clif_pCameraInfo_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCameraInfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCameraInfo_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_item_preview(struct map_session_data *sd, int n) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_item_preview_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_preview_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_item_preview_pre[hIndex].func; + preHookFunc(&sd, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_preview(sd, n); + } + if (HPMHooks.count.HP_clif_item_preview_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_preview_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_item_preview_post[hIndex].func; + postHookFunc(sd, n); + } + } + return; } -bool HP_clif_style_change_validate_requirements(struct map_session_data *sd, int type, int16 idx) { +bool HP_clif_enchant_equipment(struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId) { int hIndex = 0; bool retVal___ = false; - if (HPMHooks.count.HP_clif_style_change_validate_requirements_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx); + if (HPMHooks.count.HP_clif_enchant_equipment_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, enum equip_pos *pos, int *cardSlot, int *cardId); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_validate_requirements_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_style_change_validate_requirements_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &type, &idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_enchant_equipment_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_enchant_equipment_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &pos, &cardSlot, &cardId); } if (*HPMforce_return) { *HPMforce_return = false; @@ -28355,25 +29550,25 @@ bool HP_clif_style_change_validate_requirements(struct map_session_data *sd, int } } { - retVal___ = HPMHooks.source.clif.style_change_validate_requirements(sd, type, idx); + retVal___ = HPMHooks.source.clif.enchant_equipment(sd, pos, cardSlot, cardId); } - if (HPMHooks.count.HP_clif_style_change_validate_requirements_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int16 idx); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_validate_requirements_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_style_change_validate_requirements_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, type, idx); + if (HPMHooks.count.HP_clif_enchant_equipment_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_enchant_equipment_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_enchant_equipment_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pos, cardSlot, cardId); } } return retVal___; } -void HP_clif_stylist_send_rodexitem(struct map_session_data *sd, int itemid) { +void HP_clif_pReqRemainTime(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_stylist_send_rodexitem_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *itemid); + if (HPMHooks.count.HP_clif_pReqRemainTime_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_pre[hIndex].func; - preHookFunc(&sd, &itemid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqRemainTime_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqRemainTime_pre[hIndex].func; + preHookFunc(&fd, &sd); } if (*HPMforce_return) { *HPMforce_return = false; @@ -28381,24 +29576,50 @@ void HP_clif_stylist_send_rodexitem(struct map_session_data *sd, int itemid) { } } { - HPMHooks.source.clif.stylist_send_rodexitem(sd, itemid); + HPMHooks.source.clif.pReqRemainTime(fd, sd); } - if (HPMHooks.count.HP_clif_stylist_send_rodexitem_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int itemid); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_post[hIndex].func; - postHookFunc(sd, itemid); + if (HPMHooks.count.HP_clif_pReqRemainTime_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqRemainTime_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqRemainTime_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) { +void HP_clif_npc_barter_open(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_pReqStyleChange_pre > 0) { + if (HPMHooks.count.HP_clif_npc_barter_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_barter_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_npc_barter_open_pre[hIndex].func; + preHookFunc(&sd, &nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npc_barter_open(sd, nd); + } + if (HPMHooks.count.HP_clif_npc_barter_open_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_barter_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_npc_barter_open_post[hIndex].func; + postHookFunc(sd, nd); + } + } + return; +} +void HP_clif_pNPCBarterClosed(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pNPCBarterClosed_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterClosed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pNPCBarterClosed_pre[hIndex].func; preHookFunc(&fd, &sd); } if (*HPMforce_return) { @@ -28407,24 +29628,24 @@ void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) { } } { - HPMHooks.source.clif.pReqStyleChange(fd, sd); + HPMHooks.source.clif.pNPCBarterClosed(fd, sd); } - if (HPMHooks.count.HP_clif_pReqStyleChange_post > 0) { + if (HPMHooks.count.HP_clif_pNPCBarterClosed_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_pReqStyleChange_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterClosed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pNPCBarterClosed_post[hIndex].func; postHookFunc(fd, sd); } } return; } -void HP_clif_pReqStyleChange2(int fd, struct map_session_data *sd) { +void HP_clif_pNPCBarterPurchase(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_pReqStyleChange2_pre > 0) { + if (HPMHooks.count.HP_clif_pNPCBarterPurchase_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange2_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterPurchase_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pNPCBarterPurchase_pre[hIndex].func; preHookFunc(&fd, &sd); } if (*HPMforce_return) { @@ -28433,25 +29654,25 @@ void HP_clif_pReqStyleChange2(int fd, struct map_session_data *sd) { } } { - HPMHooks.source.clif.pReqStyleChange2(fd, sd); + HPMHooks.source.clif.pNPCBarterPurchase(fd, sd); } - if (HPMHooks.count.HP_clif_pReqStyleChange2_post > 0) { + if (HPMHooks.count.HP_clif_pNPCBarterPurchase_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange2_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterPurchase_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pNPCBarterPurchase_post[hIndex].func; postHookFunc(fd, sd); } } return; } -void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem) { +void HP_clif_pClientVersion(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_cz_req_style_change_sub_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); + if (HPMHooks.count.HP_clif_pClientVersion_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cz_req_style_change_sub_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_cz_req_style_change_sub_pre[hIndex].func; - preHookFunc(&sd, &type, &idx, &isitem); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pClientVersion_pre[hIndex].func; + preHookFunc(&fd, &sd); } if (*HPMforce_return) { *HPMforce_return = false; @@ -28459,25 +29680,25 @@ void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int1 } } { - HPMHooks.source.clif.cz_req_style_change_sub(sd, type, idx, isitem); + HPMHooks.source.clif.pClientVersion(fd, sd); } - if (HPMHooks.count.HP_clif_cz_req_style_change_sub_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int type, int16 idx, bool isitem); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cz_req_style_change_sub_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_cz_req_style_change_sub_post[hIndex].func; - postHookFunc(sd, type, idx, isitem); + if (HPMHooks.count.HP_clif_pClientVersion_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pClientVersion_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag) { +void HP_clif_pPing(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_style_change_response_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, enum stylist_shop *flag); + if (HPMHooks.count.HP_clif_pPing_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_style_change_response_pre[hIndex].func; - preHookFunc(&sd, &flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPing_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pPing_pre[hIndex].func; + preHookFunc(&fd, &sd); } if (*HPMforce_return) { *HPMforce_return = false; @@ -28485,24 +29706,110 @@ void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_sho } } { - HPMHooks.source.clif.style_change_response(sd, flag); + HPMHooks.source.clif.pPing(fd, sd); } - if (HPMHooks.count.HP_clif_style_change_response_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, enum stylist_shop flag); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_style_change_response_post[hIndex].func; - postHookFunc(sd, flag); + if (HPMHooks.count.HP_clif_pPing_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPing_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pPing_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -void HP_clif_pPetEvolution(int fd, struct map_session_data *sd) { +void HP_clif_ping(struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_pPetEvolution_pre > 0) { + if (HPMHooks.count.HP_clif_ping_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ping_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_ping_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ping(sd); + } + if (HPMHooks.count.HP_clif_ping_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ping_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_ping_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_clif_pingTimer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clif_pingTimer_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pingTimer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.pingTimer(tid, tick, id, data); + } + if (HPMHooks.count.HP_clif_pingTimer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pingTimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); + } + } + return retVal___; +} +int HP_clif_pingTimerSub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clif_pingTimerSub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimerSub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clif_pingTimerSub_pre[hIndex].func; + retVal___ = preHookFunc(&sd, ap___copy); + va_end(ap___copy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.clif.pingTimerSub(sd, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_clif_pingTimerSub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimerSub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clif_pingTimerSub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_clif_pResetCooldown(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pResetCooldown_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetEvolution_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_pPetEvolution_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetCooldown_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pResetCooldown_pre[hIndex].func; preHookFunc(&fd, &sd); } if (*HPMforce_return) { @@ -28511,25 +29818,25 @@ void HP_clif_pPetEvolution(int fd, struct map_session_data *sd) { } } { - HPMHooks.source.clif.pPetEvolution(fd, sd); + HPMHooks.source.clif.pResetCooldown(fd, sd); } - if (HPMHooks.count.HP_clif_pPetEvolution_post > 0) { + if (HPMHooks.count.HP_clif_pResetCooldown_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetEvolution_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_pPetEvolution_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetCooldown_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pResetCooldown_post[hIndex].func; postHookFunc(fd, sd); } } return; } -void HP_clif_petEvolutionResult(int fd, enum pet_evolution_result result) { +void HP_clif_loadConfirm(struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_petEvolutionResult_pre > 0) { - void (*preHookFunc) (int *fd, enum pet_evolution_result *result); + if (HPMHooks.count.HP_clif_loadConfirm_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petEvolutionResult_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_petEvolutionResult_pre[hIndex].func; - preHookFunc(&fd, &result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_loadConfirm_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_loadConfirm_pre[hIndex].func; + preHookFunc(&sd); } if (*HPMforce_return) { *HPMforce_return = false; @@ -28537,24 +29844,50 @@ void HP_clif_petEvolutionResult(int fd, enum pet_evolution_result result) { } } { - HPMHooks.source.clif.petEvolutionResult(fd, result); + HPMHooks.source.clif.loadConfirm(sd); } - if (HPMHooks.count.HP_clif_petEvolutionResult_post > 0) { - void (*postHookFunc) (int fd, enum pet_evolution_result result); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petEvolutionResult_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_petEvolutionResult_post[hIndex].func; - postHookFunc(fd, result); + if (HPMHooks.count.HP_clif_loadConfirm_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_loadConfirm_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_loadConfirm_post[hIndex].func; + postHookFunc(sd); } } return; } -void HP_clif_party_dead_notification(struct map_session_data *sd) { +void HP_clif_send_selforarea(int fd, struct block_list *bl, const void *buf, int len) { int hIndex = 0; - if (HPMHooks.count.HP_clif_party_dead_notification_pre > 0) { + if (HPMHooks.count.HP_clif_send_selforarea_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl, const void **buf, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_selforarea_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_send_selforarea_pre[hIndex].func; + preHookFunc(&fd, &bl, &buf, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.send_selforarea(fd, bl, buf, len); + } + if (HPMHooks.count.HP_clif_send_selforarea_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl, const void *buf, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_selforarea_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_send_selforarea_post[hIndex].func; + postHookFunc(fd, bl, buf, len); + } + } + return; +} +void HP_clif_OpenRefineryUI(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_OpenRefineryUI_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_dead_notification_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_party_dead_notification_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_OpenRefineryUI_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_OpenRefineryUI_pre[hIndex].func; preHookFunc(&sd); } if (*HPMforce_return) { @@ -28563,17 +29896,147 @@ void HP_clif_party_dead_notification(struct map_session_data *sd) { } } { - HPMHooks.source.clif.party_dead_notification(sd); + HPMHooks.source.clif.OpenRefineryUI(sd); } - if (HPMHooks.count.HP_clif_party_dead_notification_post > 0) { + if (HPMHooks.count.HP_clif_OpenRefineryUI_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_dead_notification_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_party_dead_notification_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_OpenRefineryUI_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_OpenRefineryUI_post[hIndex].func; postHookFunc(sd); } } return; } +void HP_clif_pAddItemRefineryUI(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pAddItemRefineryUI_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAddItemRefineryUI_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pAddItemRefineryUI_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAddItemRefineryUI(fd, sd); + } + if (HPMHooks.count.HP_clif_pAddItemRefineryUI_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAddItemRefineryUI_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pAddItemRefineryUI_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_AddItemRefineryUIAck(struct map_session_data *sd, int item_index, struct s_refine_requirement *req) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_AddItemRefineryUIAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *item_index, struct s_refine_requirement **req); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_AddItemRefineryUIAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_AddItemRefineryUIAck_pre[hIndex].func; + preHookFunc(&sd, &item_index, &req); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.AddItemRefineryUIAck(sd, item_index, req); + } + if (HPMHooks.count.HP_clif_AddItemRefineryUIAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_AddItemRefineryUIAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_AddItemRefineryUIAck_post[hIndex].func; + postHookFunc(sd, item_index, req); + } + } + return; +} +void HP_clif_pRefineryUIClose(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRefineryUIClose_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIClose_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRefineryUIClose_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRefineryUIClose(fd, sd); + } + if (HPMHooks.count.HP_clif_pRefineryUIClose_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIClose_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRefineryUIClose_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRefineryUIRefine(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRefineryUIRefine_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIRefine_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRefineryUIRefine_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRefineryUIRefine(fd, sd); + } + if (HPMHooks.count.HP_clif_pRefineryUIRefine_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIRefine_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRefineryUIRefine_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_announce_refine_status(struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_announce_refine_status_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_announce_refine_status_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_announce_refine_status_pre[hIndex].func; + preHookFunc(&sd, &item_id, &refine_level, &success, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.announce_refine_status(sd, item_id, refine_level, success, target); + } + if (HPMHooks.count.HP_clif_announce_refine_status_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_announce_refine_status_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_announce_refine_status_post[hIndex].func; + postHookFunc(sd, item_id, refine_level, success, target); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; @@ -31778,11 +33241,11 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { } return retVal___; } -int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login) { +int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_guild_recv_memberinfoshort_pre > 0) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login); + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func; @@ -31797,7 +33260,7 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class, last_login); } if (HPMHooks.count.HP_guild_recv_memberinfoshort_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login); + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login); for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class, last_login); @@ -33925,11 +35388,11 @@ bool HP_homun_levelup(struct homun_data *hd) { } return retVal___; } -int HP_homun_change_class(struct homun_data *hd, short class_) { +int HP_homun_change_class(struct homun_data *hd, int class_) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_homun_change_class_pre > 0) { - int (*preHookFunc) (struct homun_data **hd, short *class_); + int (*preHookFunc) (struct homun_data **hd, int *class_); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_change_class_pre[hIndex].func; @@ -33944,7 +35407,7 @@ int HP_homun_change_class(struct homun_data *hd, short class_) { retVal___ = HPMHooks.source.homun.change_class(hd, class_); } if (HPMHooks.count.HP_homun_change_class_post > 0) { - int (*postHookFunc) (int retVal___, struct homun_data *hd, short class_); + int (*postHookFunc) (int retVal___, struct homun_data *hd, int class_); for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_change_class_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd, class_); @@ -35268,6 +36731,32 @@ int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } +void HP_instance_force_destroy(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_instance_force_destroy_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_force_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_instance_force_destroy_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.force_destroy(sd); + } + if (HPMHooks.count.HP_instance_force_destroy_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_force_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_instance_force_destroy_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} /* intif_interface */ int HP_intif_parse(int fd) { int hIndex = 0; @@ -35296,11 +36785,11 @@ int HP_intif_parse(int fd) { } return retVal___; } -int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { +int HP_intif_create_pet(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_intif_create_pet_pre > 0) { - int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); + int (*preHookFunc) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_create_pet_pre[hIndex].func; @@ -35315,7 +36804,7 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } if (HPMHooks.count.HP_intif_create_pet_post > 0) { - int (*postHookFunc) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); + int (*postHookFunc) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_create_pet_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); @@ -35969,11 +37458,11 @@ int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, co } return retVal___; } -int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { +int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_intif_guild_memberinfoshort_pre > 0) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_pre[hIndex].func; @@ -35988,7 +37477,7 @@ int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, in retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class); } if (HPMHooks.count.HP_intif_guild_memberinfoshort_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); @@ -37182,15 +38671,15 @@ int HP_intif_rodex_checkhasnew(struct map_session_data *sd) { } return retVal___; } -int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) { +int HP_intif_rodex_updatemail(struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_intif_rodex_updatemail_pre > 0) { - int (*preHookFunc) (int64 *mail_id, int8 *flag); + int (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_pre[hIndex].func; - retVal___ = preHookFunc(&mail_id, &flag); + retVal___ = preHookFunc(&sd, &mail_id, &opentype, &flag); } if (*HPMforce_return) { *HPMforce_return = false; @@ -37198,13 +38687,13 @@ int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) { } } { - retVal___ = HPMHooks.source.intif.rodex_updatemail(mail_id, flag); + retVal___ = HPMHooks.source.intif.rodex_updatemail(sd, mail_id, opentype, flag); } if (HPMHooks.count.HP_intif_rodex_updatemail_post > 0) { - int (*postHookFunc) (int retVal___, int64 mail_id, int8 flag); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mail_id, flag); + retVal___ = postHookFunc(retVal___, sd, mail_id, opentype, flag); } } return retVal___; @@ -37263,6 +38752,58 @@ int HP_intif_rodex_checkname(struct map_session_data *sd, const char *name) { } return retVal___; } +void HP_intif_pGetZenyAck(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pGetZenyAck_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGetZenyAck(fd); + } + if (HPMHooks.count.HP_intif_pGetZenyAck_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pGetItemsAck(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pGetItemsAck_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGetItemsAck(fd); + } + if (HPMHooks.count.HP_intif_pGetItemsAck_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} int HP_intif_clan_kickoffline(int clan_id, int kick_interval) { int hIndex = 0; int retVal___ = 0; @@ -41483,6 +43024,39 @@ bool HP_itemdb_lookup_const_mask(const struct config_setting_t *it, const char * } return retVal___; } +int HP_itemdb_addname_sub(union DBKey key, struct DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_itemdb_addname_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_addname_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_addname_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, &data, ap___copy); + va_end(ap___copy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.itemdb.addname_sub(key, data, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_itemdb_addname_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_addname_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_addname_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} /* libconfig_interface */ int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; @@ -43860,15 +45434,15 @@ char HP_logs_chattype2char(e_log_chat_type type) { } return retVal___; } -bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) { +bool HP_logs_should_log_item(int nameid, int amount, int refine_level, struct item_data *id) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_logs_should_log_item_pre > 0) { - bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data **id); + bool (*preHookFunc) (int *nameid, int *amount, int *refine_level, struct item_data **id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_logs_should_log_item_pre[hIndex].func; - retVal___ = preHookFunc(&nameid, &amount, &refine, &id); + retVal___ = preHookFunc(&nameid, &amount, &refine_level, &id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -43876,13 +45450,13 @@ bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_dat } } { - retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id); + retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine_level, id); } if (HPMHooks.count.HP_logs_should_log_item_post > 0) { - bool (*postHookFunc) (bool retVal___, int nameid, int amount, int refine, struct item_data *id); + bool (*postHookFunc) (bool retVal___, int nameid, int amount, int refine_level, struct item_data *id); for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_should_log_item_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nameid, amount, refine, id); + retVal___ = postHookFunc(retVal___, nameid, amount, refine_level, id); } } return retVal___; @@ -44181,6 +45755,32 @@ void HP_map_zone_remove(int m) { } return; } +void HP_map_zone_remove_all(int m) { + int hIndex = 0; + if (HPMHooks.count.HP_map_zone_remove_all_pre > 0) { + void (*preHookFunc) (int *m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_all_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_zone_remove_all_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_remove_all(m); + } + if (HPMHooks.count.HP_map_zone_remove_all_post > 0) { + void (*postHookFunc) (int m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_all_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_zone_remove_all_post[hIndex].func; + postHookFunc(m); + } + } + return; +} void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) { int hIndex = 0; if (HPMHooks.count.HP_map_zone_apply_pre > 0) { @@ -47779,31 +49379,32 @@ int HP_map_get_new_bonus_id(void) { } return retVal___; } -void HP_map_add_questinfo(int m, struct questinfo *qi) { +bool HP_map_add_questinfo(int m, struct npc_data *nd) { int hIndex = 0; + bool retVal___ = false; if (HPMHooks.count.HP_map_add_questinfo_pre > 0) { - void (*preHookFunc) (int *m, struct questinfo **qi); + bool (*preHookFunc) (int *m, struct npc_data **nd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_add_questinfo_pre[hIndex].func; - preHookFunc(&m, &qi); + retVal___ = preHookFunc(&m, &nd); } if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.add_questinfo(m, qi); + retVal___ = HPMHooks.source.map.add_questinfo(m, nd); } if (HPMHooks.count.HP_map_add_questinfo_post > 0) { - void (*postHookFunc) (int m, struct questinfo *qi); + bool (*postHookFunc) (bool retVal___, int m, struct npc_data *nd); for (hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_add_questinfo_post[hIndex].func; - postHookFunc(m, qi); + retVal___ = postHookFunc(retVal___, m, nd); } } - return; + return retVal___; } bool HP_map_remove_questinfo(int m, struct npc_data *nd) { int hIndex = 0; @@ -50774,15 +52375,41 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } -struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) { +void HP_mob_setdropitem_options(struct item *item, struct optdrop_group *options) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_setdropitem_options_pre > 0) { + void (*preHookFunc) (struct item **item, struct optdrop_group **options); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_setdropitem_options_pre[hIndex].func; + preHookFunc(&item, &options); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.setdropitem_options(item, options); + } + if (HPMHooks.count.HP_mob_setdropitem_options_post > 0) { + void (*postHookFunc) (struct item *item, struct optdrop_group *options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_setdropitem_options_post[hIndex].func; + postHookFunc(item, options); + } + } + return; +} +struct item_drop* HP_mob_setdropitem(int nameid, struct optdrop_group *options, int qty, struct item_data *data) { int hIndex = 0; struct item_drop* retVal___ = NULL; if (HPMHooks.count.HP_mob_setdropitem_pre > 0) { - struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data **data); + struct item_drop* (*preHookFunc) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func; - retVal___ = preHookFunc(&nameid, &qty, &data); + retVal___ = preHookFunc(&nameid, &options, &qty, &data); } if (*HPMforce_return) { *HPMforce_return = false; @@ -50790,13 +52417,13 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data } } { - retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data); + retVal___ = HPMHooks.source.mob.setdropitem(nameid, options, qty, data); } if (HPMHooks.count.HP_mob_setdropitem_post > 0) { - struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data); + struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data); for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nameid, qty, data); + retVal___ = postHookFunc(retVal___, nameid, options, qty, data); } } return retVal___; @@ -51689,6 +53316,114 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { } return; } +bool HP_mob_read_optdrops_option(struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_option_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_pre[hIndex].func; + retVal___ = preHookFunc(&option, &entry, &idx, &calc_rate, &slot, &group); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_option(option, entry, idx, calc_rate, slot, group); + } + if (HPMHooks.count.HP_mob_read_optdrops_option_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, option, entry, idx, calc_rate, slot, group); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_optslot(struct config_setting_t *optslot, int n, int group_id, const char *group) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_optslot_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **optslot, int *n, int *group_id, const char **group); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_pre[hIndex].func; + retVal___ = preHookFunc(&optslot, &n, &group_id, &group); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_optslot(optslot, n, group_id, group); + } + if (HPMHooks.count.HP_mob_read_optdrops_optslot_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_post[hIndex].func; + retVal___ = postHookFunc(retVal___, optslot, n, group_id, group); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_group(struct config_setting_t *group, int n) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_group_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **group, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_pre[hIndex].func; + retVal___ = preHookFunc(&group, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_group(group, n); + } + if (HPMHooks.count.HP_mob_read_optdrops_group_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *group, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, n); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_db(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_db_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_db(); + } + if (HPMHooks.count.HP_mob_read_optdrops_db_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} void HP_mob_readdb(void) { int hIndex = 0; if (HPMHooks.count.HP_mob_readdb_pre > 0) { @@ -51955,6 +53690,33 @@ uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t) } return retVal___; } +struct optdrop_group* HP_mob_read_db_drops_option(struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate) { + int hIndex = 0; + struct optdrop_group* retVal___ = NULL; + if (HPMHooks.count.HP_mob_read_db_drops_option_pre > 0) { + struct optdrop_group* (*preHookFunc) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_pre[hIndex].func; + retVal___ = preHookFunc(&entry, &item_name, &drop, &drop_rate); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_db_drops_option(entry, item_name, drop, drop_rate); + } + if (HPMHooks.count.HP_mob_read_db_drops_option_post > 0) { + struct optdrop_group* (*postHookFunc) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry, item_name, drop, drop_rate); + } + } + return retVal___; +} void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; if (HPMHooks.count.HP_mob_read_db_stats_sub_pre > 0) { @@ -52358,6 +54120,32 @@ void HP_mob_destroy_mob_db(int index) { } return; } +void HP_mob_destroy_drop_groups(void) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_destroy_drop_groups_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.destroy_drop_groups(); + } + if (HPMHooks.count.HP_mob_destroy_drop_groups_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_post[hIndex].func; + postHookFunc(); + } + } + return; +} bool HP_mob_skill_db_libconfig(const char *filename, bool ignore_missing) { int hIndex = 0; bool retVal___ = false; @@ -54660,11 +56448,11 @@ bool HP_npc_viewisid(const char *viewid) { } return retVal___; } -struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_) { +struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) { int hIndex = 0; struct npc_data* retVal___ = NULL; if (HPMHooks.count.HP_npc_create_npc_pre > 0) { - struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_); + struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func; @@ -54679,7 +56467,7 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y retVal___ = HPMHooks.source.npc.create_npc(subtype, m, x, y, dir, class_); } if (HPMHooks.count.HP_npc_create_npc_post > 0) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_); + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func; retVal___ = postHookFunc(retVal___, subtype, m, x, y, dir, class_); @@ -55200,10 +56988,10 @@ void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { } return; } -void HP_npc_setclass(struct npc_data *nd, short class_) { +void HP_npc_setclass(struct npc_data *nd, int class_) { int hIndex = 0; if (HPMHooks.count.HP_npc_setclass_pre > 0) { - void (*preHookFunc) (struct npc_data **nd, short *class_); + void (*preHookFunc) (struct npc_data **nd, int *class_); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func; @@ -55218,7 +57006,7 @@ void HP_npc_setclass(struct npc_data *nd, short class_) { HPMHooks.source.npc.setclass(nd, class_); } if (HPMHooks.count.HP_npc_setclass_post > 0) { - void (*postHookFunc) (struct npc_data *nd, short class_); + void (*postHookFunc) (struct npc_data *nd, int class_); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func; postHookFunc(nd, class_); @@ -55770,6 +57558,33 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis } return retVal___; } +int HP_npc_barter_buylist(struct map_session_data *sd, struct barteritemlist *item_list) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_npc_barter_buylist_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct barteritemlist **item_list); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_buylist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_buylist_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_list); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.barter_buylist(sd, item_list); + } + if (HPMHooks.count.HP_npc_barter_buylist_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_buylist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_list); + } + } + return retVal___; +} bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; @@ -55823,10 +57638,10 @@ void HP_npc_market_fromsql(void) { } return; } -void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { +void HP_npc_market_tosql(struct npc_data *nd, int index) { int hIndex = 0; if (HPMHooks.count.HP_npc_market_tosql_pre > 0) { - void (*preHookFunc) (struct npc_data **nd, unsigned short *index); + void (*preHookFunc) (struct npc_data **nd, int *index); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_tosql_pre[hIndex].func; @@ -55841,7 +57656,7 @@ void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { HPMHooks.source.npc.market_tosql(nd, index); } if (HPMHooks.count.HP_npc_market_tosql_post > 0) { - void (*postHookFunc) (struct npc_data *nd, unsigned short index); + void (*postHookFunc) (struct npc_data *nd, int index); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_tosql_post[hIndex].func; postHookFunc(nd, index); @@ -55849,10 +57664,10 @@ void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { } return; } -void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { +void HP_npc_market_delfromsql(struct npc_data *nd, int index) { int hIndex = 0; if (HPMHooks.count.HP_npc_market_delfromsql_pre > 0) { - void (*preHookFunc) (struct npc_data **nd, unsigned short *index); + void (*preHookFunc) (struct npc_data **nd, int *index); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_pre[hIndex].func; @@ -55867,7 +57682,7 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { HPMHooks.source.npc.market_delfromsql(nd, index); } if (HPMHooks.count.HP_npc_market_delfromsql_post > 0) { - void (*postHookFunc) (struct npc_data *nd, unsigned short index); + void (*postHookFunc) (struct npc_data *nd, int index); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_post[hIndex].func; postHookFunc(nd, index); @@ -55875,10 +57690,10 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { } return; } -void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { +void HP_npc_market_delfromsql_sub(const char *npcname, int index) { int hIndex = 0; if (HPMHooks.count.HP_npc_market_delfromsql_sub_pre > 0) { - void (*preHookFunc) (const char **npcname, unsigned short *index); + void (*preHookFunc) (const char **npcname, int *index); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func; @@ -55893,7 +57708,7 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { HPMHooks.source.npc.market_delfromsql_sub(npcname, index); } if (HPMHooks.count.HP_npc_market_delfromsql_sub_post > 0) { - void (*postHookFunc) (const char *npcname, unsigned short index); + void (*postHookFunc) (const char *npcname, int index); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_post[hIndex].func; postHookFunc(npcname, index); @@ -55901,6 +57716,110 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { } return; } +void HP_npc_barter_fromsql(void) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_barter_fromsql_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_fromsql_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.barter_fromsql(); + } + if (HPMHooks.count.HP_npc_barter_fromsql_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_fromsql_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_npc_barter_tosql(struct npc_data *nd, int index) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_barter_tosql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_tosql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_tosql_pre[hIndex].func; + preHookFunc(&nd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.barter_tosql(nd, index); + } + if (HPMHooks.count.HP_npc_barter_tosql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_tosql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_tosql_post[hIndex].func; + postHookFunc(nd, index); + } + } + return; +} +void HP_npc_barter_delfromsql(struct npc_data *nd, int index) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_barter_delfromsql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_pre[hIndex].func; + preHookFunc(&nd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.barter_delfromsql(nd, index); + } + if (HPMHooks.count.HP_npc_barter_delfromsql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_post[hIndex].func; + postHookFunc(nd, index); + } + } + return; +} +void HP_npc_barter_delfromsql_sub(const char *npcname, int itemId, int itemId2, int amount2) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_barter_delfromsql_sub_pre > 0) { + void (*preHookFunc) (const char **npcname, int *itemId, int *itemId2, int *amount2); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_sub_pre[hIndex].func; + preHookFunc(&npcname, &itemId, &itemId2, &amount2); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.barter_delfromsql_sub(npcname, itemId, itemId2, amount2); + } + if (HPMHooks.count.HP_npc_barter_delfromsql_sub_post > 0) { + void (*postHookFunc) (const char *npcname, int itemId, int itemId2, int amount2); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_sub_post[hIndex].func; + postHookFunc(npcname, itemId, itemId2, amount2); + } + } + return; +} bool HP_npc_db_checkid(const int id) { int hIndex = 0; bool retVal___ = false; @@ -55954,6 +57873,32 @@ void HP_npc_refresh(struct npc_data *nd) { } return; } +void HP_npc_questinfo_clear(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_questinfo_clear_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_questinfo_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_questinfo_clear_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.questinfo_clear(nd); + } + if (HPMHooks.count.HP_npc_questinfo_clear_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_questinfo_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_questinfo_clear_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; @@ -56008,6 +57953,111 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const } return; } +/* packets_interface */ +void HP_packets_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.init(); + } + if (HPMHooks.count.HP_packets_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.final(); + } + if (HPMHooks.count.HP_packets_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_addLens(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_addLens_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_addLens_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.addLens(); + } + if (HPMHooks.count.HP_packets_addLens_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_addLens_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_addLen(int id, int len) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_addLen_pre > 0) { + void (*preHookFunc) (int *id, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_addLen_pre[hIndex].func; + preHookFunc(&id, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.addLen(id, len); + } + if (HPMHooks.count.HP_packets_addLen_post > 0) { + void (*postHookFunc) (int id, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_addLen_post[hIndex].func; + postHookFunc(id, len); + } + } + return; +} /* party_interface */ void HP_party_init(bool minimal) { int hIndex = 0; @@ -58122,10 +60172,10 @@ int HP_pc_makesavestatus(struct map_session_data *sd) { } return retVal___; } -void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { +void HP_pc_respawn(struct map_session_data *sd, enum clr_type clrtype) { int hIndex = 0; if (HPMHooks.count.HP_pc_respawn_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, clr_type *clrtype); + void (*preHookFunc) (struct map_session_data **sd, enum clr_type *clrtype); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_respawn_pre[hIndex].func; @@ -58140,7 +60190,7 @@ void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { HPMHooks.source.pc.respawn(sd, clrtype); } if (HPMHooks.count.HP_pc_respawn_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, clr_type clrtype); + void (*postHookFunc) (struct map_session_data *sd, enum clr_type clrtype); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_respawn_post[hIndex].func; postHookFunc(sd, clrtype); @@ -58604,11 +60654,11 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) { } return retVal___; } -int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype) { +int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_setpos_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); + int (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, enum clr_type *clrtype); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func; @@ -58623,7 +60673,7 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, i retVal___ = HPMHooks.source.pc.setpos(sd, map_index, x, y, clrtype); } if (HPMHooks.count.HP_pc_setpos_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setpos_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, map_index, x, y, clrtype); @@ -58658,11 +60708,11 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int } return retVal___; } -int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { +int HP_pc_randomwarp(struct map_session_data *sd, enum clr_type type) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_randomwarp_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, clr_type *type); + int (*preHookFunc) (struct map_session_data **sd, enum clr_type *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_randomwarp_pre[hIndex].func; @@ -58677,7 +60727,7 @@ int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { retVal___ = HPMHooks.source.pc.randomwarp(sd, type); } if (HPMHooks.count.HP_pc_randomwarp_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, clr_type type); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum clr_type type); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_randomwarp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, type); @@ -58820,11 +60870,11 @@ int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty } return retVal___; } -int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) { +int HP_pc_additem(struct map_session_data *sd, const struct item *item_data, int amount, e_log_pick_type log_type) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_additem_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, struct item **item_data, int *amount, e_log_pick_type *log_type); + int (*preHookFunc) (struct map_session_data **sd, const struct item **item_data, int *amount, e_log_pick_type *log_type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_additem_pre[hIndex].func; @@ -58839,7 +60889,7 @@ int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amoun retVal___ = HPMHooks.source.pc.additem(sd, item_data, amount, log_type); } if (HPMHooks.count.HP_pc_additem_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const struct item *item_data, int amount, e_log_pick_type log_type); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_additem_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_data, amount, log_type); @@ -61774,11 +63824,11 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) { } return retVal___; } -int HP_pc_jobid2mapid(int16 class) { +int HP_pc_jobid2mapid(int class) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_jobid2mapid_pre > 0) { - int (*preHookFunc) (int16 *class); + int (*preHookFunc) (int *class); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func; @@ -61793,7 +63843,7 @@ int HP_pc_jobid2mapid(int16 class) { retVal___ = HPMHooks.source.pc.jobid2mapid(class); } if (HPMHooks.count.HP_pc_jobid2mapid_post > 0) { - int (*postHookFunc) (int retVal___, int16 class); + int (*postHookFunc) (int retVal___, int class); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_jobid2mapid_post[hIndex].func; retVal___ = postHookFunc(retVal___, class); @@ -61801,11 +63851,11 @@ int HP_pc_jobid2mapid(int16 class) { } return retVal___; } -int HP_pc_mapid2jobid(unsigned short class_, int sex) { +int HP_pc_mapid2jobid(unsigned int class_, int sex) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_mapid2jobid_pre > 0) { - int (*preHookFunc) (unsigned short *class_, int *sex); + int (*preHookFunc) (unsigned int *class_, int *sex); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func; @@ -61820,7 +63870,7 @@ int HP_pc_mapid2jobid(unsigned short class_, int sex) { retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex); } if (HPMHooks.count.HP_pc_mapid2jobid_post > 0) { - int (*postHookFunc) (int retVal___, unsigned short class_, int sex); + int (*postHookFunc) (int retVal___, unsigned int class_, int sex); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_mapid2jobid_post[hIndex].func; retVal___ = postHookFunc(retVal___, class_, sex); @@ -62930,15 +64980,15 @@ 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; @@ -62946,13 +64996,13 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, sh } } { - 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___; @@ -64230,6 +66280,33 @@ bool HP_pc_has_second_costume(struct map_session_data *sd) { } return retVal___; } +bool HP_pc_expandInventory(struct map_session_data *sd, int adjustSize) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_expandInventory_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *adjustSize); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expandInventory_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_expandInventory_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &adjustSize); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.expandInventory(sd, adjustSize); + } + if (HPMHooks.count.HP_pc_expandInventory_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int adjustSize); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expandInventory_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_expandInventory_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, adjustSize); + } + } + return retVal___; +} /* pcre_interface */ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) { int hIndex = 0; @@ -64985,11 +67062,11 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { } return retVal___; } -bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { +bool HP_pet_get_egg(int account_id, int pet_class, int pet_id) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_pet_get_egg_pre > 0) { - bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id); + bool (*preHookFunc) (int *account_id, int *pet_class, int *pet_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func; @@ -65004,7 +67081,7 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id); } if (HPMHooks.count.HP_pet_get_egg_post > 0) { - bool (*postHookFunc) (bool retVal___, int account_id, short pet_class, int pet_id); + bool (*postHookFunc) (bool retVal___, int account_id, int pet_class, int pet_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, pet_class, pet_id); @@ -66318,14 +68395,69 @@ bool HP_quest_questinfo_validate_quests(struct map_session_data *sd, struct ques } return retVal___; } -void HP_quest_questinfo_vector_clear(int m) { +bool HP_quest_questinfo_validate_mercenary_class(struct map_session_data *sd, struct questinfo *qi) { int hIndex = 0; - if (HPMHooks.count.HP_quest_questinfo_vector_clear_pre > 0) { - void (*preHookFunc) (int *m); + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_vector_clear_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_quest_questinfo_vector_clear_pre[hIndex].func; - preHookFunc(&m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_mercenary_class_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_mercenary_class(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_mercenary_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +/* refine_interface */ +int HP_refine_init(bool minimal) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_refine_init_pre > 0) { + int (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_init_pre[hIndex].func; + retVal___ = preHookFunc(&minimal); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.refine.init(minimal); + } + if (HPMHooks.count.HP_refine_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, minimal); + } + } + return retVal___; +} +void HP_refine_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_refine_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_final_pre[hIndex].func; + preHookFunc(); } if (*HPMforce_return) { *HPMforce_return = false; @@ -66333,17 +68465,367 @@ void HP_quest_questinfo_vector_clear(int m) { } } { - HPMHooks.source.quest.questinfo_vector_clear(m); + HPMHooks.source.refine.final(); } - if (HPMHooks.count.HP_quest_questinfo_vector_clear_post > 0) { - void (*postHookFunc) (int m); - for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_vector_clear_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_quest_questinfo_vector_clear_post[hIndex].func; - postHookFunc(m); + if (HPMHooks.count.HP_refine_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_final_post[hIndex].func; + postHookFunc(); } } return; } +int HP_refine_get_refine_chance(enum refine_type wlv, int refine_level, enum refine_chance_type type) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_refine_get_refine_chance_pre > 0) { + int (*preHookFunc) (enum refine_type *wlv, int *refine_level, enum refine_chance_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_refine_chance_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_get_refine_chance_pre[hIndex].func; + retVal___ = preHookFunc(&wlv, &refine_level, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.refine.get_refine_chance(wlv, refine_level, type); + } + if (HPMHooks.count.HP_refine_get_refine_chance_post > 0) { + int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine_level, enum refine_chance_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_refine_chance_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_get_refine_chance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, wlv, refine_level, type); + } + } + return retVal___; +} +int HP_refine_get_bonus(enum refine_type equipment_type, int refine_level) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_refine_get_bonus_pre > 0) { + int (*preHookFunc) (enum refine_type *equipment_type, int *refine_level); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_bonus_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_get_bonus_pre[hIndex].func; + retVal___ = preHookFunc(&equipment_type, &refine_level); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.refine.get_bonus(equipment_type, refine_level); + } + if (HPMHooks.count.HP_refine_get_bonus_post > 0) { + int (*postHookFunc) (int retVal___, enum refine_type equipment_type, int refine_level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_bonus_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_get_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, equipment_type, refine_level); + } + } + return retVal___; +} +int HP_refine_get_randombonus_max(enum refine_type equipment_type, int refine_level) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_refine_get_randombonus_max_pre > 0) { + int (*preHookFunc) (enum refine_type *equipment_type, int *refine_level); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_randombonus_max_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_get_randombonus_max_pre[hIndex].func; + retVal___ = preHookFunc(&equipment_type, &refine_level); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.refine.get_randombonus_max(equipment_type, refine_level); + } + if (HPMHooks.count.HP_refine_get_randombonus_max_post > 0) { + int (*postHookFunc) (int retVal___, enum refine_type equipment_type, int refine_level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_randombonus_max_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_get_randombonus_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, equipment_type, refine_level); + } + } + return retVal___; +} +void HP_refine_refinery_add_item(struct map_session_data *sd, int item_index) { + int hIndex = 0; + if (HPMHooks.count.HP_refine_refinery_add_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *item_index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_add_item_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_refinery_add_item_pre[hIndex].func; + preHookFunc(&sd, &item_index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.refine.refinery_add_item(sd, item_index); + } + if (HPMHooks.count.HP_refine_refinery_add_item_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int item_index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_add_item_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_refinery_add_item_post[hIndex].func; + postHookFunc(sd, item_index); + } + } + return; +} +void HP_refine_refinery_refine_request(struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing) { + int hIndex = 0; + if (HPMHooks.count.HP_refine_refinery_refine_request_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *item_index, int *material_id, bool *use_blacksmith_blessing); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_refine_request_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_refinery_refine_request_pre[hIndex].func; + preHookFunc(&sd, &item_index, &material_id, &use_blacksmith_blessing); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.refine.refinery_refine_request(sd, item_index, material_id, use_blacksmith_blessing); + } + if (HPMHooks.count.HP_refine_refinery_refine_request_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_refine_request_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_refinery_refine_request_post[hIndex].func; + postHookFunc(sd, item_index, material_id, use_blacksmith_blessing); + } + } + return; +} +/* refine_interface_private */ +int HP_PRIV__refine_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **r, const char **name, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&r, &name, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refine_libconfig_sub(r, name, source); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, r, name, source); + } + } + return retVal___; +} +int HP_PRIV__refine_readdb_refine_libconfig(const char *filename) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_pre > 0) { + int (*preHookFunc) (const char **filename); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(&filename); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refine_libconfig(filename); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_post > 0) { + int (*postHookFunc) (int retVal___, const char *filename); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename); + } + } + return retVal___; +} +bool HP_PRIV__refine_announce_behavior_string2enum(const char *str, unsigned int *result) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_pre > 0) { + bool (*preHookFunc) (const char **str, unsigned int **result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_announce_behavior_string2enum_pre[hIndex].func; + retVal___ = preHookFunc(&str, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.announce_behavior_string2enum(str, result); + } + if (HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *str, unsigned int *result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_announce_behavior_string2enum_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, result); + } + } + return retVal___; +} +bool HP_PRIV__refine_failure_behavior_string2enum(const char *str, enum refine_ui_failure_behavior *result) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_pre > 0) { + bool (*preHookFunc) (const char **str, enum refine_ui_failure_behavior **result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_failure_behavior_string2enum_pre[hIndex].func; + retVal___ = preHookFunc(&str, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.failure_behavior_string2enum(str, result); + } + if (HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *str, enum refine_ui_failure_behavior *result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_failure_behavior_string2enum_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, result); + } + } + return retVal___; +} +bool HP_PRIV__refine_readdb_refinery_ui_settings_items(const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **elem, struct s_refine_requirement **req, const char **name, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre[hIndex].func; + retVal___ = preHookFunc(&elem, &req, &name, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings_items(elem, req, name, source); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_items_post[hIndex].func; + retVal___ = postHookFunc(retVal___, elem, req, name, source); + } + } + return retVal___; +} +bool HP_PRIV__refine_readdb_refinery_ui_settings_sub(const struct config_setting_t *elem, int type, const char *name, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **elem, int *type, const char **name, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre[hIndex].func; + retVal___ = preHookFunc(&elem, &type, &name, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings_sub(elem, type, name, source); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *elem, int type, const char *name, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, elem, type, name, source); + } + } + return retVal___; +} +int HP_PRIV__refine_readdb_refinery_ui_settings(const struct config_setting_t *r, int type, const char *name, const char *source) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **r, int *type, const char **name, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_pre[hIndex].func; + retVal___ = preHookFunc(&r, &type, &name, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings(r, type, name, source); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *r, int type, const char *name, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_post[hIndex].func; + retVal___ = postHookFunc(retVal___, r, type, name, source); + } + } + return retVal___; +} +bool HP_PRIV__refine_is_refinable(struct map_session_data *sd, int item_index) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_is_refinable_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *item_index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_is_refinable_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_is_refinable_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.is_refinable(sd, item_index); + } + if (HPMHooks.count.HP_PRIV__refine_is_refinable_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int item_index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_is_refinable_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_is_refinable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_index); + } + } + return retVal___; +} /* rnd_interface */ void HP_rnd_init(void) { int hIndex = 0; @@ -66768,10 +69250,10 @@ void HP_rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amount) } return; } -void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class) { +void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class) { int hIndex = 0; if (HPMHooks.count.HP_rodex_check_player_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class); + void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rodex_check_player_pre[hIndex].func; @@ -66786,7 +69268,7 @@ void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *b HPMHooks.source.rodex.check_player(sd, name, base_level, char_id, class); } if (HPMHooks.count.HP_rodex_check_player_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class); + void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class); for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rodex_check_player_post[hIndex].func; postHookFunc(sd, name, base_level, char_id, class); @@ -67004,6 +69486,58 @@ void HP_rodex_clean(struct map_session_data *sd, int8 flag) { } return; } +void HP_rodex_getZenyAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_getZenyAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_getZenyAck_pre[hIndex].func; + preHookFunc(&sd, &mail_id, &opentype, &zeny); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.getZenyAck(sd, mail_id, opentype, zeny); + } + if (HPMHooks.count.HP_rodex_getZenyAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_getZenyAck_post[hIndex].func; + postHookFunc(sd, mail_id, opentype, zeny); + } + } + return; +} +void HP_rodex_getItemsAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_getItemsAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_getItemsAck_pre[hIndex].func; + preHookFunc(&sd, &mail_id, &opentype, &count, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.getItemsAck(sd, mail_id, opentype, count, items); + } + if (HPMHooks.count.HP_rodex_getItemsAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_getItemsAck_post[hIndex].func; + postHookFunc(sd, mail_id, opentype, count, items); + } + } + return; +} /* script_interface */ void HP_script_init(bool minimal) { int hIndex = 0; @@ -72294,15 +74828,15 @@ void HP_searchstore_clearremote(struct map_session_data *sd) { } return; } -bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option) { +bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_searchstore_result_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine, const struct item_option **option); + bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine_level, const struct item_option **option); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine, &option); + retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine_level, &option); } if (*HPMforce_return) { *HPMforce_return = false; @@ -72310,13 +74844,13 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i } } { - retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option); + retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine_level, option); } if (HPMHooks.count.HP_searchstore_result_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option); for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option); + retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine_level, option); } } return retVal___; @@ -75951,6 +78485,32 @@ int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } +void HP_skill_trap_do_splash(struct block_list *bl, uint16 skill_id, uint16 skill_lv, int bl_flag, int64 tick) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_trap_do_splash_pre > 0) { + void (*preHookFunc) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *bl_flag, int64 *tick); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_do_splash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_trap_do_splash_pre[hIndex].func; + preHookFunc(&bl, &skill_id, &skill_lv, &bl_flag, &tick); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.trap_do_splash(bl, skill_id, skill_lv, bl_flag, tick); + } + if (HPMHooks.count.HP_skill_trap_do_splash_post > 0) { + void (*postHookFunc) (struct block_list *bl, uint16 skill_id, uint16 skill_lv, int bl_flag, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_do_splash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_trap_do_splash_post[hIndex].func; + postHookFunc(bl, skill_id, skill_lv, bl_flag, tick); + } + } + return; +} int HP_skill_trap_splash(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; @@ -79317,15 +81877,15 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { } return retVal___; } -int HP_sockt_wfifoset(int fd, size_t len) { +int HP_sockt_wfifoset(int fd, size_t len, bool validate) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) { - int (*preHookFunc) (int *fd, size_t *len); + int (*preHookFunc) (int *fd, size_t *len, bool *validate); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &len); + retVal___ = preHookFunc(&fd, &len, &validate); } if (*HPMforce_return) { *HPMforce_return = false; @@ -79333,17 +81893,43 @@ int HP_sockt_wfifoset(int fd, size_t len) { } } { - retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); + retVal___ = HPMHooks.source.sockt.wfifoset(fd, len, validate); } if (HPMHooks.count.HP_sockt_wfifoset_post > 0) { - int (*postHookFunc) (int retVal___, int fd, size_t len); + int (*postHookFunc) (int retVal___, int fd, size_t len, bool validate); for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd, len); + retVal___ = postHookFunc(retVal___, fd, len, validate); } } return retVal___; } +void HP_sockt_wfifohead(int fd, size_t len) { + int hIndex = 0; + if (HPMHooks.count.HP_sockt_wfifohead_pre > 0) { + void (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_wfifohead_pre[hIndex].func; + preHookFunc(&fd, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.wfifohead(fd, len); + } + if (HPMHooks.count.HP_sockt_wfifohead_post > 0) { + void (*postHookFunc) (int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_wfifohead_post[hIndex].func; + postHookFunc(fd, len); + } + } + return; +} int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; @@ -79397,6 +81983,32 @@ void HP_sockt_close(int fd) { } return; } +void HP_sockt_validateWfifo(int fd, size_t len) { + int hIndex = 0; + if (HPMHooks.count.HP_sockt_validateWfifo_pre > 0) { + void (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_validateWfifo_pre[hIndex].func; + preHookFunc(&fd, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.validateWfifo(fd, len); + } + if (HPMHooks.count.HP_sockt_validateWfifo_post > 0) { + void (*postHookFunc) (int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_validateWfifo_post[hIndex].func; + postHookFunc(fd, len); + } + } + return; +} bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; bool retVal___ = false; @@ -79503,6 +82115,33 @@ void HP_sockt_flush_fifos(void) { } return; } +int HP_sockt_connect_client(int listen_fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_sockt_connect_client_pre > 0) { + int (*preHookFunc) (int *listen_fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func; + retVal___ = preHookFunc(&listen_fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.connect_client(listen_fd); + } + if (HPMHooks.count.HP_sockt_connect_client_post > 0) { + int (*postHookFunc) (int retVal___, int listen_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func; + retVal___ = postHookFunc(retVal___, listen_fd); + } + } + return retVal___; +} void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) { @@ -80775,33 +83414,6 @@ void HP_status_final(void) { } return; } -int HP_status_get_refine_chance(enum refine_type wlv, int refine, enum refine_chance_type type) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_status_get_refine_chance_pre > 0) { - int (*preHookFunc) (enum refine_type *wlv, int *refine, enum refine_chance_type *type); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func; - retVal___ = preHookFunc(&wlv, &refine, &type); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine, type); - } - if (HPMHooks.count.HP_status_get_refine_chance_post > 0) { - int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type); - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_status_get_refine_chance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wlv, refine, type); - } - } - return retVal___; -} sc_type HP_status_skill2sc(int skill_id) { int hIndex = 0; sc_type retVal___ = SC_NONE; @@ -81018,11 +83630,11 @@ int HP_status_percent_change(struct block_list *src, struct block_list *target, } return retVal___; } -int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { +int HP_status_set_hp(struct block_list *bl, unsigned int hp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_status_set_hp_pre > 0) { - int (*preHookFunc) (struct block_list **bl, unsigned int *hp, int *flag); + int (*preHookFunc) (struct block_list **bl, unsigned int *hp, enum status_heal_flag *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_set_hp_pre[hIndex].func; @@ -81037,7 +83649,7 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { retVal___ = HPMHooks.source.status.set_hp(bl, hp, flag); } if (HPMHooks.count.HP_status_set_hp_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int hp, int flag); + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int hp, enum status_heal_flag flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_set_hp_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, hp, flag); @@ -81045,11 +83657,11 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { } return retVal___; } -int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { +int HP_status_set_sp(struct block_list *bl, unsigned int sp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_status_set_sp_pre > 0) { - int (*preHookFunc) (struct block_list **bl, unsigned int *sp, int *flag); + int (*preHookFunc) (struct block_list **bl, unsigned int *sp, enum status_heal_flag *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_set_sp_pre[hIndex].func; @@ -81064,7 +83676,7 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { retVal___ = HPMHooks.source.status.set_sp(bl, sp, flag); } if (HPMHooks.count.HP_status_set_sp_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int sp, int flag); + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int sp, enum status_heal_flag flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_set_sp_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sp, flag); @@ -81072,11 +83684,11 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { } return retVal___; } -int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { +int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_status_heal_pre > 0) { - int (*preHookFunc) (struct block_list **bl, int64 *hp, int64 *sp, int *flag); + int (*preHookFunc) (struct block_list **bl, int64 *hp, int64 *sp, enum status_heal_flag *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_heal_pre[hIndex].func; @@ -81091,7 +83703,7 @@ int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { retVal___ = HPMHooks.source.status.heal(bl, hp, sp, flag); } if (HPMHooks.count.HP_status_heal_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int64 hp, int64 sp, int flag); + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 hp, int64 sp, enum status_heal_flag flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_heal_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, hp, sp, flag); @@ -82634,11 +85246,11 @@ short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int } return retVal___; } -unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { +int HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_calc_batk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_batk_pre[hIndex].func; @@ -82653,7 +85265,7 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * retVal___ = HPMHooks.source.status.calc_batk(bl, sc, batk, viewable); } if (HPMHooks.count.HP_status_calc_batk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_batk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, batk, viewable); @@ -82661,11 +85273,11 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * } return retVal___; } -unsigned short HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { +int HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_base_matk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, const struct status_data **st, int *level); + int (*preHookFunc) (struct block_list **bl, const struct status_data **st, int *level); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func; @@ -82680,7 +85292,7 @@ unsigned short HP_status_base_matk(struct block_list *bl, const struct status_da retVal___ = HPMHooks.source.status.base_matk(bl, st, level); } if (HPMHooks.count.HP_status_base_matk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int level); + int (*postHookFunc) (int retVal___, struct block_list *bl, const struct status_data *st, int level); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, st, level); @@ -82928,11 +85540,11 @@ int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *s } return retVal___; } -unsigned short HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { +int HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_base_atk_pre > 0) { - unsigned short (*preHookFunc) (const struct block_list **bl, const struct status_data **st); + int (*preHookFunc) (const struct block_list **bl, const struct status_data **st); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_atk_pre[hIndex].func; @@ -82947,7 +85559,7 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat retVal___ = HPMHooks.source.status.base_atk(bl, st); } if (HPMHooks.count.HP_status_base_atk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st); + int (*postHookFunc) (int retVal___, const struct block_list *bl, const struct status_data *st); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_atk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, st); @@ -83009,6 +85621,60 @@ unsigned int HP_status_get_base_maxsp(const struct map_session_data *sd, const s } return retVal___; } +unsigned int HP_status_get_restart_hp(const struct map_session_data *sd, const struct status_data *st) { + int hIndex = 0; + unsigned int retVal___ = 0; + if (HPMHooks.count.HP_status_get_restart_hp_pre > 0) { + unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_hp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_restart_hp_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &st); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_restart_hp(sd, st); + } + if (HPMHooks.count.HP_status_get_restart_hp_post > 0) { + unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_hp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_restart_hp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} +unsigned int HP_status_get_restart_sp(const struct map_session_data *sd, const struct status_data *st) { + int hIndex = 0; + unsigned int retVal___ = 0; + if (HPMHooks.count.HP_status_get_restart_sp_pre > 0) { + unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_sp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_restart_sp_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &st); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_restart_sp(sd, st); + } + if (HPMHooks.count.HP_status_get_restart_sp_post > 0) { + unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_sp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_restart_sp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; @@ -83198,11 +85864,11 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s } return retVal___; } -unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { +int HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_calc_watk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_watk_pre[hIndex].func; @@ -83217,7 +85883,7 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change * retVal___ = HPMHooks.source.status.calc_watk(bl, sc, watk, viewable); } if (HPMHooks.count.HP_status_calc_watk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_watk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, watk, viewable); @@ -83225,11 +85891,11 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change * } return retVal___; } -unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { +int HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_calc_matk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_matk_pre[hIndex].func; @@ -83244,7 +85910,7 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change * retVal___ = HPMHooks.source.status.calc_matk(bl, sc, matk, viewable); } if (HPMHooks.count.HP_status_calc_matk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_matk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, matk, viewable); @@ -83252,11 +85918,11 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change * } return retVal___; } -signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { +signed int HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; + signed int retVal___ = 0; if (HPMHooks.count.HP_status_calc_hit_pre > 0) { - signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_hit_pre[hIndex].func; @@ -83271,7 +85937,7 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, retVal___ = HPMHooks.source.status.calc_hit(bl, sc, hit, viewable); } if (HPMHooks.count.HP_status_calc_hit_post > 0) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); + signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_hit_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, hit, viewable); @@ -83279,11 +85945,11 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, } return retVal___; } -signed short HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { +signed int HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; + signed int retVal___ = 0; if (HPMHooks.count.HP_status_calc_critical_pre > 0) { - signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_critical_pre[hIndex].func; @@ -83298,7 +85964,7 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change retVal___ = HPMHooks.source.status.calc_critical(bl, sc, critical, viewable); } if (HPMHooks.count.HP_status_calc_critical_post > 0) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); + signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_critical_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, critical, viewable); @@ -83306,11 +85972,11 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change } return retVal___; } -signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { +signed int HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; + signed int retVal___ = 0; if (HPMHooks.count.HP_status_calc_flee_pre > 0) { - signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_flee_pre[hIndex].func; @@ -83325,7 +85991,7 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc retVal___ = HPMHooks.source.status.calc_flee(bl, sc, flee, viewable); } if (HPMHooks.count.HP_status_calc_flee_post > 0) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); + signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_flee_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, flee, viewable); @@ -83333,11 +85999,11 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc } return retVal___; } -signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { +signed int HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; + signed int retVal___ = 0; if (HPMHooks.count.HP_status_calc_flee2_pre > 0) { - signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_flee2_pre[hIndex].func; @@ -83352,7 +86018,7 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s retVal___ = HPMHooks.source.status.calc_flee2(bl, sc, flee2, viewable); } if (HPMHooks.count.HP_status_calc_flee2_post > 0) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); + signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_flee2_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, flee2, viewable); @@ -83630,11 +86296,11 @@ uint32 HP_status_calc_mode(const struct block_list *bl, const struct status_chan } return retVal___; } -unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { +int HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_calc_ematk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk); + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func; @@ -83649,7 +86315,7 @@ unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk); } if (HPMHooks.count.HP_status_calc_ematk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk); + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int matk); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_ematk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, matk); @@ -83849,60 +86515,6 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { } return retVal___; } -int HP_status_readdb_refine_libconfig(const char *filename) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_status_readdb_refine_libconfig_pre > 0) { - int (*preHookFunc) (const char **filename); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_pre[hIndex].func; - retVal___ = preHookFunc(&filename); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.status.readdb_refine_libconfig(filename); - } - if (HPMHooks.count.HP_status_readdb_refine_libconfig_post > 0) { - int (*postHookFunc) (int retVal___, const char *filename); - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_post[hIndex].func; - retVal___ = postHookFunc(retVal___, filename); - } - } - return retVal___; -} -int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre > 0) { - int (*preHookFunc) (struct config_setting_t **r, const char **name, const char **source); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_pre[hIndex].func; - retVal___ = preHookFunc(&r, &name, &source); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.status.readdb_refine_libconfig_sub(r, name, source); - } - if (HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post > 0) { - int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source); - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, r, name, source); - } - } - return retVal___; -} bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; @@ -84034,11 +86646,11 @@ void HP_status_copy(struct status_data *a, const struct status_data *b) { } return; } -unsigned short HP_status_base_matk_min(const struct status_data *st) { +int HP_status_base_matk_min(const struct status_data *st) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_base_matk_min_pre > 0) { - unsigned short (*preHookFunc) (const struct status_data **st); + int (*preHookFunc) (const struct status_data **st); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_min_pre[hIndex].func; @@ -84053,7 +86665,7 @@ unsigned short HP_status_base_matk_min(const struct status_data *st) { retVal___ = HPMHooks.source.status.base_matk_min(st); } if (HPMHooks.count.HP_status_base_matk_min_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st); + int (*postHookFunc) (int retVal___, const struct status_data *st); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_min_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); @@ -84061,11 +86673,11 @@ unsigned short HP_status_base_matk_min(const struct status_data *st) { } return retVal___; } -unsigned short HP_status_base_matk_max(const struct status_data *st) { +int HP_status_base_matk_max(const struct status_data *st) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_base_matk_max_pre > 0) { - unsigned short (*preHookFunc) (const struct status_data **st); + int (*preHookFunc) (const struct status_data **st); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_max_pre[hIndex].func; @@ -84080,7 +86692,7 @@ unsigned short HP_status_base_matk_max(const struct status_data *st) { retVal___ = HPMHooks.source.status.base_matk_max(st); } if (HPMHooks.count.HP_status_base_matk_max_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st); + int (*postHookFunc) (int retVal___, const struct status_data *st); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_max_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); @@ -85121,6 +87733,244 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) } return retVal___; } +/* stylist_interface */ +void HP_stylist_init(bool minimal) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_init_pre > 0) { + void (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_init_pre[hIndex].func; + preHookFunc(&minimal); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.init(minimal); + } + if (HPMHooks.count.HP_stylist_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_init_post[hIndex].func; + postHookFunc(minimal); + } + } + return; +} +void HP_stylist_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.final(); + } + if (HPMHooks.count.HP_stylist_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_stylist_vector_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_vector_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_vector_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.vector_init(); + } + if (HPMHooks.count.HP_stylist_vector_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_vector_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_stylist_vector_clear(void) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_vector_clear_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_vector_clear_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.vector_clear(); + } + if (HPMHooks.count.HP_stylist_vector_clear_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_vector_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_stylist_read_db_libconfig(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_stylist_read_db_libconfig_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.stylist.read_db_libconfig(); + } + if (HPMHooks.count.HP_stylist_read_db_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_stylist_read_db_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.stylist.read_db_libconfig_sub(it, idx, source); + } + if (HPMHooks.count.HP_stylist_read_db_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); + } + } + return retVal___; +} +void HP_stylist_request_style_change(struct map_session_data *sd, int type, int16 idx, bool isitem) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_request_style_change_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_request_style_change_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_request_style_change_pre[hIndex].func; + preHookFunc(&sd, &type, &idx, &isitem); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.request_style_change(sd, type, idx, isitem); + } + if (HPMHooks.count.HP_stylist_request_style_change_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int type, int16 idx, bool isitem); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_request_style_change_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_request_style_change_post[hIndex].func; + postHookFunc(sd, type, idx, isitem); + } + } + return; +} +bool HP_stylist_validate_requirements(struct map_session_data *sd, int type, int16 idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_stylist_validate_requirements_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_validate_requirements_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_validate_requirements_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &type, &idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.stylist.validate_requirements(sd, type, idx); + } + if (HPMHooks.count.HP_stylist_validate_requirements_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int16 idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_validate_requirements_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_validate_requirements_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, type, idx); + } + } + return retVal___; +} +void HP_stylist_send_rodexitem(struct map_session_data *sd, int itemid) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_send_rodexitem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *itemid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_send_rodexitem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_send_rodexitem_pre[hIndex].func; + preHookFunc(&sd, &itemid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.send_rodexitem(sd, itemid); + } + if (HPMHooks.count.HP_stylist_send_rodexitem_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int itemid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_send_rodexitem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_send_rodexitem_post[hIndex].func; + postHookFunc(sd, itemid); + } + } + return; +} /* sv_interface */ int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; @@ -87187,11 +90037,11 @@ int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) { } return retVal___; } -int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type) { +int HP_unit_warp(struct block_list *bl, short m, short x, short y, enum clr_type type) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_unit_warp_pre > 0) { - int (*preHookFunc) (struct block_list **bl, short *m, short *x, short *y, clr_type *type); + int (*preHookFunc) (struct block_list **bl, short *m, short *x, short *y, enum clr_type *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_warp_pre[hIndex].func; @@ -87206,7 +90056,7 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type retVal___ = HPMHooks.source.unit.warp(bl, m, x, y, type); } if (HPMHooks.count.HP_unit_warp_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, short m, short x, short y, clr_type type); + int (*postHookFunc) (int retVal___, struct block_list *bl, short m, short x, short y, enum clr_type type); for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_warp_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, m, x, y, type); @@ -87886,11 +90736,11 @@ int HP_unit_changeviewsize(struct block_list *bl, short size) { } return retVal___; } -int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func) { +int HP_unit_remove_map(struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_unit_remove_map_pre > 0) { - int (*preHookFunc) (struct block_list **bl, clr_type *clrtype, const char **file, int *line, const char **func); + int (*preHookFunc) (struct block_list **bl, enum clr_type *clrtype, const char **file, int *line, const char **func); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_remove_map_pre[hIndex].func; @@ -87905,7 +90755,7 @@ int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file retVal___ = HPMHooks.source.unit.remove_map(bl, clrtype, file, line, func); } if (HPMHooks.count.HP_unit_remove_map_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func); + int (*postHookFunc) (int retVal___, struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func); for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_remove_map_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, clrtype, file, line, func); @@ -87913,10 +90763,10 @@ int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file } return retVal___; } -void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) { +void HP_unit_remove_map_pc(struct map_session_data *sd, enum clr_type clrtype) { int hIndex = 0; if (HPMHooks.count.HP_unit_remove_map_pc_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, clr_type *clrtype); + void (*preHookFunc) (struct map_session_data **sd, enum clr_type *clrtype); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_remove_map_pc_pre[hIndex].func; @@ -87931,7 +90781,7 @@ void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) { HPMHooks.source.unit.remove_map_pc(sd, clrtype); } if (HPMHooks.count.HP_unit_remove_map_pc_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, clr_type clrtype); + void (*postHookFunc) (struct map_session_data *sd, enum clr_type clrtype); for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_remove_map_pc_post[hIndex].func; postHookFunc(sd, clrtype); @@ -87965,11 +90815,11 @@ void HP_unit_free_pc(struct map_session_data *sd) { } return; } -int HP_unit_free(struct block_list *bl, clr_type clrtype) { +int HP_unit_free(struct block_list *bl, enum clr_type clrtype) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_unit_free_pre > 0) { - int (*preHookFunc) (struct block_list **bl, clr_type *clrtype); + int (*preHookFunc) (struct block_list **bl, enum clr_type *clrtype); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_free_pre[hIndex].func; @@ -87984,7 +90834,7 @@ int HP_unit_free(struct block_list *bl, clr_type clrtype) { retVal___ = HPMHooks.source.unit.free(bl, clrtype); } if (HPMHooks.count.HP_unit_free_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type clrtype); + int (*postHookFunc) (int retVal___, struct block_list *bl, enum clr_type clrtype); for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_free_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, clrtype); |