diff options
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 686 |
1 files changed, 630 insertions, 56 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 3615f06ed..b177c12c0 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -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); } } @@ -9239,6 +9292,32 @@ void HP_clif_takeitem(struct block_list *src, struct block_list *dst) { } return; } +void HP_clif_item_movefailed(struct map_session_data *sd, int n) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_item_movefailed_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_movefailed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_item_movefailed_pre[hIndex].func; + preHookFunc(&sd, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_movefailed(sd, n); + } + if (HPMHooks.count.HP_clif_item_movefailed_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_movefailed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_item_movefailed_post[hIndex].func; + postHookFunc(sd, n); + } + } + return; +} void HP_clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos) { int hIndex = 0; if (HPMHooks.count.HP_clif_item_equip_pre > 0) { @@ -11890,13 +11969,13 @@ 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) { + 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; + 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) { @@ -11905,24 +11984,50 @@ void HP_clif_inventorylist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.inventorylist(sd); + HPMHooks.source.clif.inventoryList(sd); } - if (HPMHooks.count.HP_clif_inventorylist_post > 0) { + 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; + 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_equiplist(struct map_session_data *sd) { +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_equiplist_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_equiplist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_equiplist_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) { @@ -11931,24 +12036,50 @@ void HP_clif_equiplist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.equiplist(sd); + HPMHooks.source.clif.equipList(sd); } - if (HPMHooks.count.HP_clif_equiplist_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_equiplist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_equiplist_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_cartlist(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_cartlist_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_cartlist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_cartlist_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) { @@ -11957,17 +12088,43 @@ void HP_clif_cartlist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.cartlist(sd); + HPMHooks.source.clif.cartList(sd); } - if (HPMHooks.count.HP_clif_cartlist_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_cartlist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_cartlist_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_cartItems(struct map_session_data *sd, enum inventory_type type) { + int hIndex = 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_favorite_item(struct map_session_data *sd, unsigned short index) { int hIndex = 0; if (HPMHooks.count.HP_clif_favorite_item_pre > 0) { @@ -14325,6 +14482,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) { @@ -15131,6 +15340,32 @@ void HP_clif_msgtable_str(struct map_session_data *sd, enum clif_messages p1, co } return; } +void HP_clif_msgtable_str_color(struct map_session_data *sd, enum clif_messages p1, const char *value, uint32 color) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_msgtable_str_color_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clif_messages *p1, const char **value, uint32 *color); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_color_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_str_color_pre[hIndex].func; + preHookFunc(&sd, &p1, &value, &color); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable_str_color(sd, p1, value, color); + } + if (HPMHooks.count.HP_clif_msgtable_str_color_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum clif_messages p1, const char *value, uint32 color); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_color_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_str_color_post[hIndex].func; + postHookFunc(sd, p1, value, color); + } + } + return; +} void HP_clif_msgtable_color(struct map_session_data *sd, enum clif_messages p1, uint32 color) { int hIndex = 0; if (HPMHooks.count.HP_clif_msgtable_color_pre > 0) { @@ -15783,13 +16018,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) { @@ -15798,17 +16059,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) { @@ -16745,14 +17084,14 @@ void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) { } return; } -void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const char *mes) { +void HP_clif_guild_leave(struct map_session_data *sd, const char *name, int char_id, const char *mes) { int hIndex = 0; if (HPMHooks.count.HP_clif_guild_leave_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, const char **name, const char **mes); + void (*preHookFunc) (struct map_session_data **sd, const char **name, int *char_id, const char **mes); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_leave_pre[hIndex].func; - preHookFunc(&sd, &name, &mes); + preHookFunc(&sd, &name, &char_id, &mes); } if (*HPMforce_return) { *HPMforce_return = false; @@ -16760,25 +17099,25 @@ void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const ch } } { - HPMHooks.source.clif.guild_leave(sd, name, mes); + HPMHooks.source.clif.guild_leave(sd, name, char_id, mes); } if (HPMHooks.count.HP_clif_guild_leave_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, const char *name, const char *mes); + void (*postHookFunc) (struct map_session_data *sd, const char *name, int char_id, const char *mes); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_leave_post[hIndex].func; - postHookFunc(sd, name, mes); + postHookFunc(sd, name, char_id, mes); } } return; } -void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, const char *mes, int account_id) { +void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, int char_id, const char *mes, int account_id) { int hIndex = 0; if (HPMHooks.count.HP_clif_guild_expulsion_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, const char **name, const char **mes, int *account_id); + void (*preHookFunc) (struct map_session_data **sd, const char **name, int *char_id, const char **mes, int *account_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_expulsion_pre[hIndex].func; - preHookFunc(&sd, &name, &mes, &account_id); + preHookFunc(&sd, &name, &char_id, &mes, &account_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -16786,13 +17125,13 @@ void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, cons } } { - HPMHooks.source.clif.guild_expulsion(sd, name, mes, account_id); + HPMHooks.source.clif.guild_expulsion(sd, name, char_id, mes, account_id); } if (HPMHooks.count.HP_clif_guild_expulsion_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, const char *name, const char *mes, int account_id); + void (*postHookFunc) (struct map_session_data *sd, const char *name, int char_id, const char *mes, int account_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_expulsion_post[hIndex].func; - postHookFunc(sd, name, mes, account_id); + postHookFunc(sd, name, char_id, mes, account_id); } } return; @@ -17239,6 +17578,58 @@ void HP_clif_guild_expulsionlist(struct map_session_data *sd) { } return; } +void HP_clif_guild_set_position(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_set_position_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_set_position_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_set_position_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_set_position(sd); + } + if (HPMHooks.count.HP_clif_guild_set_position_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_set_position_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_set_position_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_position_selected(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_position_selected_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_position_selected_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_position_selected_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_position_selected(sd); + } + if (HPMHooks.count.HP_clif_guild_position_selected_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_position_selected_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_position_selected_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { int hIndex = 0; bool retVal___ = false; @@ -28340,6 +28731,32 @@ void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) { } return; } +void HP_clif_pReqStyleChange2(int fd, struct map_session_data *sd) { + int hIndex = 0; + 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_pReqStyleChange2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqStyleChange2(fd, sd); + } + 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; +} void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem) { int hIndex = 0; if (HPMHooks.count.HP_clif_cz_req_style_change_sub_pre > 0) { @@ -28470,6 +28887,84 @@ void HP_clif_party_dead_notification(struct map_session_data *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; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; @@ -35164,6 +35659,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; @@ -35434,10 +35955,10 @@ void HP_intif_request_account_storage(const struct map_session_data *sd) { } return; } -void HP_intif_send_account_storage(const struct map_session_data *sd) { +void HP_intif_send_account_storage(struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_intif_send_account_storage_pre > 0) { - void (*preHookFunc) (const struct map_session_data **sd); + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_account_storage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_send_account_storage_pre[hIndex].func; @@ -35452,7 +35973,7 @@ void HP_intif_send_account_storage(const struct map_session_data *sd) { HPMHooks.source.intif.send_account_storage(sd); } if (HPMHooks.count.HP_intif_send_account_storage_post > 0) { - void (*postHookFunc) (const struct map_session_data *sd); + void (*postHookFunc) (struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_account_storage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_send_account_storage_post[hIndex].func; postHookFunc(sd); @@ -44155,6 +44676,32 @@ void HP_map_zone_change2(int m, struct map_zone_data *zone) { } return; } +void HP_map_zone_reload(void) { + int hIndex = 0; + if (HPMHooks.count.HP_map_zone_reload_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_reload_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_zone_reload_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_reload(); + } + if (HPMHooks.count.HP_map_zone_reload_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_reload_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_zone_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} int HP_map_getcell(int16 m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk) { int hIndex = 0; int retVal___ = 0; @@ -58690,11 +59237,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; @@ -58709,7 +59256,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); @@ -68365,6 +68912,33 @@ int HP_script_add_str(const char *p) { } return retVal___; } +int HP_script_add_variable(const char *varname) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_add_variable_pre > 0) { + int (*preHookFunc) (const char **varname); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_variable_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_add_variable_pre[hIndex].func; + retVal___ = preHookFunc(&varname); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.add_variable(varname); + } + if (HPMHooks.count.HP_script_add_variable_post > 0) { + int (*postHookFunc) (int retVal___, const char *varname); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_variable_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_add_variable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, varname); + } + } + return retVal___; +} const char* HP_script_get_str(int id) { int hIndex = 0; const char* retVal___ = NULL; |