diff options
Diffstat (limited to 'src/plugins')
20 files changed, 7057 insertions, 2144 deletions
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c index b477cb5c3..8e7ed4823 100644 --- a/src/plugins/HPMHooking.c +++ b/src/plugins/HPMHooking.c @@ -25,6 +25,7 @@ #include "common/memmgr.h" #include "common/mmo.h" #include "common/socket.h" +#include "common/packets.h" PRAGMA_GCC5(GCC diagnostic push) PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") @@ -40,6 +41,8 @@ PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") #include "login/lclif.p.h" #include "login/login.h" #include "login/loginlog.h" +#include "login/packets_ac_struct.h" +#include "login/packets_ca_struct.h" #elif defined (HPMHOOKING_CHAR) #define HPM_SERVER_TYPE SERVER_TYPE_CHAR #define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_char.HPMHooksCore.inc" @@ -103,10 +106,13 @@ PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") #include "map/pet.h" #include "map/quest.h" #include "map/rodex.h" +#include "map/refine.h" +#include "map/refine.p.h" #include "map/script.h" #include "map/skill.h" #include "map/status.h" #include "map/storage.h" +#include "map/stylist.h" #include "map/trade.h" #include "map/unit.h" #include "common/grfio.h" diff --git a/src/plugins/HPMHooking.h b/src/plugins/HPMHooking.h index 44970863c..f94dccac4 100644 --- a/src/plugins/HPMHooking.h +++ b/src/plugins/HPMHooking.h @@ -50,11 +50,21 @@ HPExport struct HPMHooking_interface HPMHooking_s; HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->" #funcname, (hook), HPMi->pid) \ ) +#define addHookPrePriv(ifname, funcname, hook) ( \ + (void)((HPMHOOK_pre_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->p->" #funcname, (hook), HPMi->pid) \ + ) + #define addHookPost(ifname, funcname, hook) ( \ (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \ HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->" #funcname, (hook), HPMi->pid) \ ) +#define addHookPostPriv(ifname, funcname, hook) ( \ + (void)((HPMHOOK_post_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->p->" #funcname, (hook), HPMi->pid) \ + ) + /* need better names ;/ */ /* will not run the original function after pre-hook processing is complete (other hooks will run) */ #define hookStop() (HPMi->hooking->HookStop(__func__,HPMi->pid)) diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index f80dc9003..b2c3e80ac 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.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-2020 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 @@ -176,8 +176,12 @@ typedef void (*HPMHOOK_pre_achievement_init_titles) (struct map_session_data **s typedef void (*HPMHOOK_post_achievement_init_titles) (struct map_session_data *sd); typedef bool (*HPMHOOK_pre_achievement_check_title) (struct map_session_data **sd, int *title_id); typedef bool (*HPMHOOK_post_achievement_check_title) (bool retVal___, struct map_session_data *sd, int title_id); -typedef void (*HPMHOOK_pre_achievement_get_rewards) (struct map_session_data **sd, const struct achievement_data **ad); -typedef void (*HPMHOOK_post_achievement_get_rewards) (struct map_session_data *sd, const struct achievement_data *ad); +typedef bool (*HPMHOOK_pre_achievement_get_rewards) (struct map_session_data **sd, const struct achievement_data **ad); +typedef bool (*HPMHOOK_post_achievement_get_rewards) (bool retVal___, struct map_session_data *sd, const struct achievement_data *ad); +typedef void (*HPMHOOK_pre_achievement_get_rewards_buffs) (struct map_session_data **sd, const struct achievement_data **ad); +typedef void (*HPMHOOK_post_achievement_get_rewards_buffs) (struct map_session_data *sd, const struct achievement_data *ad); +typedef void (*HPMHOOK_pre_achievement_get_rewards_items) (struct map_session_data **sd, const struct achievement_data **ad); +typedef void (*HPMHOOK_post_achievement_get_rewards_items) (struct map_session_data *sd, const struct achievement_data *ad); #endif // MAP_ACHIEVEMENT_H #ifdef MAP_ATCOMMAND_H /* atcommand */ typedef void (*HPMHOOK_pre_atcommand_init) (bool *minimal); @@ -278,6 +282,8 @@ typedef void (*HPMHOOK_pre_battle_drain) (struct map_session_data **sd, struct b typedef void (*HPMHOOK_post_battle_drain) (struct map_session_data *sd, struct block_list *tbl, int64 rdamage, int64 ldamage, int race, int boss); typedef void (*HPMHOOK_pre_battle_reflect_damage) (struct block_list **target, struct block_list **src, struct Damage **wd, uint16 *skill_id); typedef void (*HPMHOOK_post_battle_reflect_damage) (struct block_list *target, struct block_list *src, struct Damage *wd, uint16 skill_id); +typedef void (*HPMHOOK_pre_battle_reflect_trap) (struct block_list **target, struct block_list **src, struct Damage **md, uint16 *skill_id); +typedef void (*HPMHOOK_post_battle_reflect_trap) (struct block_list *target, struct block_list *src, struct Damage *md, uint16 skill_id); typedef int (*HPMHOOK_pre_battle_attr_ratio) (int *atk_elem, int *def_type, int *def_lv); typedef int (*HPMHOOK_post_battle_attr_ratio) (int retVal___, int atk_elem, int def_type, int def_lv); typedef int64 (*HPMHOOK_pre_battle_attr_fix) (struct block_list **src, struct block_list **target, int64 *damage, int *atk_elem, int *def_type, int *def_lv); @@ -532,8 +538,8 @@ typedef int (*HPMHOOK_pre_chr_memitemdata_to_sql) (const struct item *items[], i typedef int (*HPMHOOK_post_chr_memitemdata_to_sql) (int retVal___, const struct item items[], int id, enum inventory_table_type table); typedef int (*HPMHOOK_pre_chr_mmo_gender) (const struct char_session_data **sd, const struct mmo_charstatus **p, char *sex); typedef int (*HPMHOOK_post_chr_mmo_gender) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char sex); -typedef int (*HPMHOOK_pre_chr_mmo_chars_fromsql) (struct char_session_data **sd, uint8 **buf); -typedef int (*HPMHOOK_post_chr_mmo_chars_fromsql) (int retVal___, struct char_session_data *sd, uint8 *buf); +typedef int (*HPMHOOK_pre_chr_mmo_chars_fromsql) (struct char_session_data **sd, uint8 **buf, int **count); +typedef int (*HPMHOOK_post_chr_mmo_chars_fromsql) (int retVal___, struct char_session_data *sd, uint8 *buf, int *count); typedef int (*HPMHOOK_pre_chr_mmo_char_fromsql) (int *char_id, struct mmo_charstatus **p, bool *load_everything); typedef int (*HPMHOOK_post_chr_mmo_char_fromsql) (int retVal___, int char_id, struct mmo_charstatus *p, bool load_everything); typedef int (*HPMHOOK_pre_chr_mmo_char_sql_init) (void); @@ -546,16 +552,18 @@ typedef bool (*HPMHOOK_pre_chr_name_exists) (const char **name, const char **esc typedef bool (*HPMHOOK_post_chr_name_exists) (bool retVal___, const char *name, const char *esc_name); typedef int (*HPMHOOK_pre_chr_check_char_name) (const char **name, const char **esc_name); typedef int (*HPMHOOK_post_chr_check_char_name) (int retVal___, const char *name, const char *esc_name); -typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex); -typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex); +typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex); +typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex); typedef int (*HPMHOOK_pre_chr_divorce_char_sql) (int *partner_id1, int *partner_id2); typedef int (*HPMHOOK_post_chr_divorce_char_sql) (int retVal___, int partner_id1, int partner_id2); typedef int (*HPMHOOK_pre_chr_count_users) (void); typedef int (*HPMHOOK_post_chr_count_users) (int retVal___); typedef int (*HPMHOOK_pre_chr_mmo_char_tobuf) (uint8 **buffer, struct mmo_charstatus **p); typedef int (*HPMHOOK_post_chr_mmo_char_tobuf) (int retVal___, uint8 *buffer, struct mmo_charstatus *p); -typedef void (*HPMHOOK_pre_chr_mmo_char_send099d) (int *fd, struct char_session_data **sd); -typedef void (*HPMHOOK_post_chr_mmo_char_send099d) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd); typedef void (*HPMHOOK_pre_chr_mmo_char_send_ban_list) (int *fd, struct char_session_data **sd); typedef void (*HPMHOOK_post_chr_mmo_char_send_ban_list) (int fd, struct char_session_data *sd); typedef void (*HPMHOOK_pre_chr_mmo_char_send_slots_info) (int *fd, struct char_session_data **sd); @@ -1154,12 +1162,12 @@ typedef void (*HPMHOOK_pre_clif_package_announce) (struct map_session_data **sd, typedef void (*HPMHOOK_post_clif_package_announce) (struct map_session_data *sd, int nameid, int containerid); typedef void (*HPMHOOK_pre_clif_item_drop_announce) (struct map_session_data **sd, int *nameid, char **monsterName); typedef void (*HPMHOOK_post_clif_item_drop_announce) (struct map_session_data *sd, int nameid, char *monsterName); -typedef void (*HPMHOOK_pre_clif_clearunit_single) (int *id, clr_type *type, int *fd); -typedef void (*HPMHOOK_post_clif_clearunit_single) (int id, clr_type type, int fd); -typedef void (*HPMHOOK_pre_clif_clearunit_area) (struct block_list **bl, clr_type *type); -typedef void (*HPMHOOK_post_clif_clearunit_area) (struct block_list *bl, clr_type type); -typedef void (*HPMHOOK_pre_clif_clearunit_delayed) (struct block_list **bl, clr_type *type, int64 *tick); -typedef void (*HPMHOOK_post_clif_clearunit_delayed) (struct block_list *bl, clr_type type, int64 tick); +typedef void (*HPMHOOK_pre_clif_clearunit_single) (int *id, enum clr_type *type, int *fd); +typedef void (*HPMHOOK_post_clif_clearunit_single) (int id, enum clr_type type, int fd); +typedef void (*HPMHOOK_pre_clif_clearunit_area) (struct block_list **bl, enum clr_type *type); +typedef void (*HPMHOOK_post_clif_clearunit_area) (struct block_list *bl, enum clr_type type); +typedef void (*HPMHOOK_pre_clif_clearunit_delayed) (struct block_list **bl, enum clr_type *type, int64 *tick); +typedef void (*HPMHOOK_post_clif_clearunit_delayed) (struct block_list *bl, enum clr_type type, int64 tick); typedef void (*HPMHOOK_pre_clif_walkok) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_walkok) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_move) (struct unit_data **ud); @@ -1268,8 +1276,8 @@ typedef void (*HPMHOOK_pre_clif_scriptclear) (struct map_session_data **sd, int typedef void (*HPMHOOK_post_clif_scriptclear) (struct map_session_data *sd, int npcid); typedef void (*HPMHOOK_pre_clif_viewpoint) (struct map_session_data **sd, int *npc_id, int *type, int *x, int *y, int *id, int *color); typedef void (*HPMHOOK_post_clif_viewpoint) (struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color); -typedef int (*HPMHOOK_pre_clif_damage) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); -typedef int (*HPMHOOK_post_clif_damage) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2); +typedef int (*HPMHOOK_pre_clif_damage) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, enum battle_dmg_type *type, int64 *damage2); +typedef int (*HPMHOOK_post_clif_damage) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type type, int64 damage2); typedef void (*HPMHOOK_pre_clif_sitting) (struct block_list **bl); typedef void (*HPMHOOK_post_clif_sitting) (struct block_list *bl); typedef void (*HPMHOOK_pre_clif_standing) (struct block_list **bl); @@ -1288,12 +1296,18 @@ typedef void (*HPMHOOK_pre_clif_fame_taekwon) (struct map_session_data **sd, int typedef void (*HPMHOOK_post_clif_fame_taekwon) (struct map_session_data *sd, int points); typedef void (*HPMHOOK_pre_clif_ranklist) (struct map_session_data **sd, enum fame_list_type *type); typedef void (*HPMHOOK_post_clif_ranklist) (struct map_session_data *sd, enum fame_list_type type); +typedef void (*HPMHOOK_pre_clif_ranklist_sub) (struct PACKET_ZC_ACK_RANKING_sub **ranks, enum fame_list_type *type); +typedef void (*HPMHOOK_post_clif_ranklist_sub) (struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type); +typedef void (*HPMHOOK_pre_clif_ranklist_sub2) (uint32 **chars, uint32 **points, enum fame_list_type *type); +typedef void (*HPMHOOK_post_clif_ranklist_sub2) (uint32 *chars, uint32 *points, enum fame_list_type type); typedef void (*HPMHOOK_pre_clif_update_rankingpoint) (struct map_session_data **sd, enum fame_list_type *type, int *points); typedef void (*HPMHOOK_post_clif_update_rankingpoint) (struct map_session_data *sd, enum fame_list_type type, int points); typedef void (*HPMHOOK_pre_clif_pRanklist) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRanklist) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_hotkeys) (struct map_session_data **sd); -typedef void (*HPMHOOK_post_clif_hotkeys) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_hotkeys) (struct map_session_data **sd, int *tab); +typedef void (*HPMHOOK_post_clif_hotkeys) (struct map_session_data *sd, int tab); +typedef void (*HPMHOOK_pre_clif_hotkeysAll) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_hotkeysAll) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_clif_insight) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_clif_insight) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_clif_outsight) (struct block_list **bl, va_list ap); @@ -1316,8 +1330,10 @@ typedef void (*HPMHOOK_pre_clif_autospell) (struct map_session_data **sd, uint16 typedef void (*HPMHOOK_post_clif_autospell) (struct map_session_data *sd, uint16 skill_lv); typedef void (*HPMHOOK_pre_clif_combo_delay) (struct block_list **bl, int *wait); typedef void (*HPMHOOK_post_clif_combo_delay) (struct block_list *bl, int wait); -typedef void (*HPMHOOK_pre_clif_status_change) (struct block_list **bl, int *type, int *flag, int *tick, int *val1, int *val2, int *val3); -typedef void (*HPMHOOK_post_clif_status_change) (struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3); +typedef void (*HPMHOOK_pre_clif_status_change) (struct block_list **bl, int *relevant_bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3); +typedef void (*HPMHOOK_post_clif_status_change) (struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3); +typedef void (*HPMHOOK_pre_clif_status_change_sub) (struct block_list **bl, int *type, int *relevant_bl, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3); +typedef void (*HPMHOOK_post_clif_status_change_sub) (struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3); typedef void (*HPMHOOK_pre_clif_insert_card) (struct map_session_data **sd, int *idx_equip, int *idx_card, int *flag); typedef void (*HPMHOOK_post_clif_insert_card) (struct map_session_data *sd, int idx_equip, int idx_card, int flag); typedef void (*HPMHOOK_pre_clif_inventoryList) (struct map_session_data **sd); @@ -1332,6 +1348,18 @@ typedef void (*HPMHOOK_pre_clif_cartList) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_cartList) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_cartItems) (struct map_session_data **sd, enum inventory_type *type); typedef void (*HPMHOOK_post_clif_cartItems) (struct map_session_data *sd, enum inventory_type type); +typedef void (*HPMHOOK_pre_clif_inventoryExpansionInfo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_inventoryExpansionInfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_inventoryExpandAck) (struct map_session_data **sd, enum expand_inventory *result, int *itemId); +typedef void (*HPMHOOK_post_clif_inventoryExpandAck) (struct map_session_data *sd, enum expand_inventory result, int itemId); +typedef void (*HPMHOOK_pre_clif_inventoryExpandResult) (struct map_session_data **sd, enum expand_inventory_result *result); +typedef void (*HPMHOOK_post_clif_inventoryExpandResult) (struct map_session_data *sd, enum expand_inventory_result result); +typedef void (*HPMHOOK_pre_clif_pInventoryExpansion) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pInventoryExpansion) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pInventoryExpansionConfirmed) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pInventoryExpansionConfirmed) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pInventoryExpansionRejected) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pInventoryExpansionRejected) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_favorite_item) (struct map_session_data **sd, unsigned short *index); typedef void (*HPMHOOK_post_clif_favorite_item) (struct map_session_data *sd, unsigned short index); typedef void (*HPMHOOK_pre_clif_clearcart) (int *fd); @@ -1358,8 +1386,32 @@ typedef void (*HPMHOOK_pre_clif_mvp_noitem) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_mvp_noitem) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_changed_dir) (struct block_list **bl, enum send_target *target); typedef void (*HPMHOOK_post_clif_changed_dir) (struct block_list *bl, enum send_target target); -typedef void (*HPMHOOK_pre_clif_charnameack) (int *fd, struct block_list **bl); -typedef void (*HPMHOOK_post_clif_charnameack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_blname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_blname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_pcname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_pcname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_homname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_homname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mername_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mername_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_petname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_petname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_npcname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_npcname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_guardian_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_guardian_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_additional_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_additional_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_normal_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_normal_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_chatname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_chatname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_elemname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_elemname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_unknownname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_unknownname_ack) (int fd, struct block_list *bl); typedef void (*HPMHOOK_pre_clif_monster_hp_bar) (struct mob_data **md, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_monster_hp_bar) (struct mob_data *md, struct map_session_data *sd); typedef int (*HPMHOOK_pre_clif_hpmeter) (struct map_session_data **sd); @@ -1474,8 +1526,8 @@ typedef void (*HPMHOOK_pre_clif_divorced) (struct map_session_data **sd, const c typedef void (*HPMHOOK_post_clif_divorced) (struct map_session_data *sd, const char *name); typedef void (*HPMHOOK_pre_clif_callpartner) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_callpartner) (struct map_session_data *sd); -typedef int (*HPMHOOK_pre_clif_skill_damage) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type); -typedef int (*HPMHOOK_post_clif_skill_damage) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type); +typedef int (*HPMHOOK_pre_clif_skill_damage) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, enum battle_dmg_type *type); +typedef int (*HPMHOOK_post_clif_skill_damage) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type type); typedef int (*HPMHOOK_pre_clif_skill_nodamage) (struct block_list **src, struct block_list **dst, uint16 *skill_id, int *heal, int *fail); typedef int (*HPMHOOK_post_clif_skill_nodamage) (int retVal___, struct block_list *src, struct block_list *dst, uint16 skill_id, int heal, int fail); typedef void (*HPMHOOK_pre_clif_skill_poseffect) (struct block_list **src, uint16 *skill_id, int *val, int *x, int *y, int64 *tick); @@ -1510,8 +1562,14 @@ typedef void (*HPMHOOK_pre_clif_specialeffect) (struct block_list **bl, int *typ typedef void (*HPMHOOK_post_clif_specialeffect) (struct block_list *bl, int type, enum send_target target); typedef void (*HPMHOOK_pre_clif_specialeffect_single) (struct block_list **bl, int *type, int *fd); typedef void (*HPMHOOK_post_clif_specialeffect_single) (struct block_list *bl, int type, int fd); -typedef void (*HPMHOOK_pre_clif_specialeffect_value) (struct block_list **bl, int *effect_id, int *num, send_target *target); -typedef void (*HPMHOOK_post_clif_specialeffect_value) (struct block_list *bl, int effect_id, int num, send_target target); +typedef void (*HPMHOOK_pre_clif_specialeffect_value) (struct block_list **bl, int *effect_id, uint64 *num, send_target *target); +typedef void (*HPMHOOK_post_clif_specialeffect_value) (struct block_list *bl, int effect_id, uint64 num, send_target target); +typedef void (*HPMHOOK_pre_clif_specialeffect_value_single) (struct block_list **bl, int *effect_id, uint64 *num, int *fd); +typedef void (*HPMHOOK_post_clif_specialeffect_value_single) (struct block_list *bl, int effect_id, uint64 num, int fd); +typedef void (*HPMHOOK_pre_clif_removeSpecialEffect) (struct block_list **bl, int *effectId, enum send_target *target); +typedef void (*HPMHOOK_post_clif_removeSpecialEffect) (struct block_list *bl, int effectId, enum send_target target); +typedef void (*HPMHOOK_pre_clif_removeSpecialEffect_single) (struct block_list **bl, int *effectId, struct block_list **targetBl); +typedef void (*HPMHOOK_post_clif_removeSpecialEffect_single) (struct block_list *bl, int effectId, struct block_list *targetBl); typedef void (*HPMHOOK_pre_clif_millenniumshield) (struct block_list **bl, short *shields); typedef void (*HPMHOOK_post_clif_millenniumshield) (struct block_list *bl, short shields); typedef void (*HPMHOOK_pre_clif_spiritcharm) (struct map_session_data **sd); @@ -1542,6 +1600,8 @@ typedef void (*HPMHOOK_pre_clif_addchat) (struct chat_data **cd, struct map_sess typedef void (*HPMHOOK_post_clif_addchat) (struct chat_data *cd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_changechatowner) (struct chat_data **cd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_changechatowner) (struct chat_data *cd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_chatRoleChange) (struct chat_data **cd, struct map_session_data **sd, struct block_list **bl, int *isNotOwner); +typedef void (*HPMHOOK_post_clif_chatRoleChange) (struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner); typedef void (*HPMHOOK_pre_clif_clearchat) (struct chat_data **cd, int *fd); typedef void (*HPMHOOK_post_clif_clearchat) (struct chat_data *cd, int fd); typedef void (*HPMHOOK_pre_clif_leavechat) (struct chat_data **cd, struct map_session_data **sd, bool *flag); @@ -1562,6 +1622,8 @@ typedef void (*HPMHOOK_pre_clif_messagecolor_self) (int *fd, uint32 *color, cons typedef void (*HPMHOOK_post_clif_messagecolor_self) (int fd, uint32 color, const char *msg); typedef void (*HPMHOOK_pre_clif_messagecolor) (struct block_list **bl, uint32 *color, const char **msg); typedef void (*HPMHOOK_post_clif_messagecolor) (struct block_list *bl, uint32 color, const char *msg); +typedef void (*HPMHOOK_pre_clif_serviceMessageColor) (struct map_session_data **sd, uint32 *color, const char **msg); +typedef void (*HPMHOOK_post_clif_serviceMessageColor) (struct map_session_data *sd, uint32 color, const char *msg); typedef void (*HPMHOOK_pre_clif_disp_overhead) (struct block_list **bl, const char **mes, enum send_target *target, struct block_list **target_bl); typedef void (*HPMHOOK_post_clif_disp_overhead) (struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl); typedef void (*HPMHOOK_pre_clif_notify_playerchat) (struct block_list **bl, const char **mes); @@ -1592,8 +1654,8 @@ typedef void (*HPMHOOK_pre_clif_wisall) (struct map_session_data **sd, int *type typedef void (*HPMHOOK_post_clif_wisall) (struct map_session_data *sd, int type, int flag); typedef void (*HPMHOOK_pre_clif_PMIgnoreList) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_PMIgnoreList) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_ShowScript) (struct block_list **bl, const char **message); -typedef void (*HPMHOOK_post_clif_ShowScript) (struct block_list *bl, const char *message); +typedef void (*HPMHOOK_pre_clif_ShowScript) (struct block_list **bl, const char **message, enum send_target *target); +typedef void (*HPMHOOK_post_clif_ShowScript) (struct block_list *bl, const char *message, enum send_target target); typedef void (*HPMHOOK_pre_clif_traderequest) (struct map_session_data **sd, const char **name); typedef void (*HPMHOOK_post_clif_traderequest) (struct map_session_data *sd, const char *name); typedef void (*HPMHOOK_pre_clif_tradestart) (struct map_session_data **sd, uint8 *type); @@ -1654,6 +1716,8 @@ typedef void (*HPMHOOK_pre_clif_addskill) (struct map_session_data **sd, int *id typedef void (*HPMHOOK_post_clif_addskill) (struct map_session_data *sd, int id); typedef void (*HPMHOOK_pre_clif_deleteskill) (struct map_session_data **sd, int *id); typedef void (*HPMHOOK_post_clif_deleteskill) (struct map_session_data *sd, int id); +typedef void (*HPMHOOK_pre_clif_playerSkillToPacket) (struct map_session_data **sd, struct SKILLDATA **skillData, int *skillId, int *idx, bool *newSkill); +typedef void (*HPMHOOK_post_clif_playerSkillToPacket) (struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill); typedef void (*HPMHOOK_pre_clif_party_created) (struct map_session_data **sd, int *result); typedef void (*HPMHOOK_post_clif_party_created) (struct map_session_data *sd, int result); typedef void (*HPMHOOK_pre_clif_party_member_info) (struct party_data **p, struct map_session_data **sd); @@ -1696,6 +1760,10 @@ typedef void (*HPMHOOK_pre_clif_guild_basicinfo) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_guild_basicinfo) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_guild_allianceinfo) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_guild_allianceinfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_castlelist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_castlelist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_castleinfo) (struct map_session_data **sd, struct guild_castle **gc); +typedef void (*HPMHOOK_post_clif_guild_castleinfo) (struct map_session_data *sd, struct guild_castle *gc); typedef void (*HPMHOOK_pre_clif_guild_memberlist) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_guild_memberlist) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_guild_skillinfo) (struct map_session_data **sd); @@ -1986,18 +2054,20 @@ typedef void (*HPMHOOK_pre_clif_show_modifiers) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_show_modifiers) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_notify_bounditem) (struct map_session_data **sd, unsigned short *index); typedef void (*HPMHOOK_post_clif_notify_bounditem) (struct map_session_data *sd, unsigned short index); -typedef int (*HPMHOOK_pre_clif_delay_damage) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, unsigned char *type); -typedef int (*HPMHOOK_post_clif_delay_damage) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type); +typedef int (*HPMHOOK_pre_clif_delay_damage) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, enum battle_dmg_type *type); +typedef int (*HPMHOOK_post_clif_delay_damage) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type); typedef int (*HPMHOOK_pre_clif_delay_damage_sub) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_clif_delay_damage_sub) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef void (*HPMHOOK_pre_clif_npc_market_open) (struct map_session_data **sd, struct npc_data **nd); typedef void (*HPMHOOK_post_clif_npc_market_open) (struct map_session_data *sd, struct npc_data *nd); -typedef void (*HPMHOOK_pre_clif_npc_market_purchase_ack) (struct map_session_data **sd, const struct itemlist **item_list, unsigned char *response); -typedef void (*HPMHOOK_post_clif_npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response); +typedef void (*HPMHOOK_pre_clif_npc_market_purchase_ack) (struct map_session_data **sd, const struct itemlist **item_list, enum market_buy_result *response); +typedef void (*HPMHOOK_post_clif_npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response); typedef bool (*HPMHOOK_pre_clif_parse_roulette_db) (void); typedef bool (*HPMHOOK_post_clif_parse_roulette_db) (bool retVal___); -typedef void (*HPMHOOK_pre_clif_roulette_generate_ack) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, int *bonusItemID); -typedef void (*HPMHOOK_post_clif_roulette_generate_ack) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID); +typedef void (*HPMHOOK_pre_clif_roulette_generate_ack) (struct map_session_data **sd, enum GENERATE_ROULETTE_ACK *result, short *stage, short *prizeIdx, int *bonusItemID); +typedef void (*HPMHOOK_post_clif_roulette_generate_ack) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID); +typedef void (*HPMHOOK_pre_clif_roulette_close) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_roulette_close) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_openmergeitem) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_openmergeitem) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_cancelmergeitem) (int *fd, struct map_session_data **sd); @@ -2006,6 +2076,8 @@ typedef int (*HPMHOOK_pre_clif_comparemergeitem) (const void **a, const void **b typedef int (*HPMHOOK_post_clif_comparemergeitem) (int retVal___, const void *a, const void *b); typedef void (*HPMHOOK_pre_clif_ackmergeitems) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_ackmergeitems) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_mergeitems) (int *fd, struct map_session_data **sd, int *index, int *amount, enum mergeitem_reason *reason); +typedef void (*HPMHOOK_post_clif_mergeitems) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason); typedef bool (*HPMHOOK_pre_clif_isdisguised) (struct block_list **bl); typedef bool (*HPMHOOK_post_clif_isdisguised) (bool retVal___, struct block_list *bl); typedef void (*HPMHOOK_pre_clif_navigate_to) (struct map_session_data **sd, const char **mapname, uint16 *x, uint16 *y, uint8 *flag, bool *hideWindow, uint16 *mob_id); @@ -2030,8 +2102,10 @@ typedef void (*HPMHOOK_pre_clif_pLoadEndAck) (int *fd, struct map_session_data * typedef void (*HPMHOOK_post_clif_pLoadEndAck) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pTickSend) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pTickSend) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_pHotkey) (int *fd, struct map_session_data **sd); -typedef void (*HPMHOOK_post_clif_pHotkey) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHotkey1) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHotkey1) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHotkey2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHotkey2) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pProgressbar) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pProgressbar) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pWalkToXY) (int *fd, struct map_session_data **sd); @@ -2116,8 +2190,14 @@ typedef void (*HPMHOOK_pre_clif_pStatusUp) (int *fd, struct map_session_data **s typedef void (*HPMHOOK_post_clif_pStatusUp) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pSkillUp) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pSkillUp) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_useSkillToIdReal) (int *fd, struct map_session_data **sd, int *skill_id, int *skill_lv, int *target_id); +typedef void (*HPMHOOK_post_clif_useSkillToIdReal) (int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id); typedef void (*HPMHOOK_pre_clif_pUseSkillToId) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pUseSkillToId) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pStartUseSkillToId) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStartUseSkillToId) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pStopUseSkillToId) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStopUseSkillToId) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pUseSkillToId_homun) (struct homun_data **hd, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); typedef void (*HPMHOOK_post_clif_pUseSkillToId_homun) (struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id); typedef void (*HPMHOOK_pre_clif_pUseSkillToId_mercenary) (struct mercenary_data **md, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); @@ -2430,8 +2510,12 @@ typedef void (*HPMHOOK_pre_clif_pBGQueueRevokeReq) (int *fd, struct map_session_ typedef void (*HPMHOOK_post_clif_pBGQueueRevokeReq) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pBGQueueBattleBeginAck) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pBGQueueBattleBeginAck) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_pCashShopOpen) (int *fd, struct map_session_data **sd); -typedef void (*HPMHOOK_post_clif_pCashShopOpen) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopOpen1) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopOpen1) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopOpen2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopOpen2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopLimitedReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopLimitedReq) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pCashShopClose) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pCashShopClose) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pCashShopReqTab) (int *fd, struct map_session_data **sd); @@ -2444,6 +2528,10 @@ typedef void (*HPMHOOK_pre_clif_pPartyTick) (int *fd, struct map_session_data ** typedef void (*HPMHOOK_post_clif_pPartyTick) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pGuildInvite2) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pGuildInvite2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cashShopBuyAck) (int *fd, struct map_session_data **sd, int *itemId, enum CASH_SHOP_BUY_RESULT *result); +typedef void (*HPMHOOK_post_clif_cashShopBuyAck) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result); +typedef void (*HPMHOOK_pre_clif_cashShopOpen) (int *fd, struct map_session_data **sd, int *tab); +typedef void (*HPMHOOK_post_clif_cashShopOpen) (int fd, struct map_session_data *sd, int tab); typedef void (*HPMHOOK_pre_clif_pPartyBookingAddFilter) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pPartyBookingAddFilter) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pPartyBookingSubFilter) (int *fd, struct map_session_data **sd); @@ -2482,8 +2570,10 @@ typedef void (*HPMHOOK_pre_clif_pNPCMarketPurchase) (int *fd, struct map_session typedef void (*HPMHOOK_post_clif_pNPCMarketPurchase) (int fd, struct map_session_data *sd); typedef int (*HPMHOOK_pre_clif_add_item_options) (struct ItemOptions **buf, const struct item **it); typedef int (*HPMHOOK_post_clif_add_item_options) (int retVal___, struct ItemOptions *buf, const struct item *it); -typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift) (int *fd, struct map_session_data **sd); -typedef void (*HPMHOOK_post_clif_pHotkeyRowShift) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift1) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHotkeyRowShift1) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHotkeyRowShift2) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_dressroom_open) (struct map_session_data **sd, int *view); typedef void (*HPMHOOK_post_clif_dressroom_open) (struct map_session_data *sd, int view); typedef void (*HPMHOOK_pre_clif_pOneClick_ItemIdentify) (int *fd, struct map_session_data **sd); @@ -2530,8 +2620,8 @@ typedef void (*HPMHOOK_pre_clif_pRodexOpenMailbox) (int *fd, struct map_session_ typedef void (*HPMHOOK_post_clif_pRodexOpenMailbox) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pRodexCheckName) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexCheckName) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name); -typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name); +typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name); +typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name); typedef void (*HPMHOOK_pre_clif_pRodexDeleteMail) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexDeleteMail) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_rodex_delete_mail) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); @@ -2588,24 +2678,12 @@ typedef void (*HPMHOOK_pre_clif_pPrivateAirshipRequest) (int *fd, struct map_ses typedef void (*HPMHOOK_post_clif_pPrivateAirshipRequest) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_PrivateAirshipResponse) (struct map_session_data **sd, uint32 *flag); typedef void (*HPMHOOK_post_clif_PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag); -typedef void (*HPMHOOK_pre_clif_stylist_vector_init) (void); -typedef void (*HPMHOOK_post_clif_stylist_vector_init) (void); -typedef void (*HPMHOOK_pre_clif_stylist_vector_clear) (void); -typedef void (*HPMHOOK_post_clif_stylist_vector_clear) (void); -typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig) (void); -typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig) (bool retVal___); -typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); -typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); -typedef bool (*HPMHOOK_pre_clif_style_change_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx); -typedef bool (*HPMHOOK_post_clif_style_change_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx); -typedef void (*HPMHOOK_pre_clif_stylist_send_rodexitem) (struct map_session_data **sd, int *itemid); -typedef void (*HPMHOOK_post_clif_stylist_send_rodexitem) (struct map_session_data *sd, int itemid); typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pReqStyleChange2) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pReqStyleChange2) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_cz_req_style_change_sub) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); -typedef void (*HPMHOOK_post_clif_cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem); +typedef void (*HPMHOOK_pre_clif_pStyleClose) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStyleClose) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag); typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, enum stylist_shop flag); typedef void (*HPMHOOK_pre_clif_pPetEvolution) (int *fd, struct map_session_data **sd); @@ -2616,6 +2694,68 @@ typedef void (*HPMHOOK_pre_clif_party_dead_notification) (struct map_session_dat typedef void (*HPMHOOK_post_clif_party_dead_notification) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pMemorialDungeonCommand) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pMemorialDungeonCommand) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_camera_showWindow) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_camera_showWindow) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_camera_change) (struct map_session_data **sd, float *range, float *rotation, float *latitude, enum send_target *target); +typedef void (*HPMHOOK_post_clif_camera_change) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target); +typedef void (*HPMHOOK_pre_clif_pCameraInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCameraInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_item_preview) (struct map_session_data **sd, int *n); +typedef void (*HPMHOOK_post_clif_item_preview) (struct map_session_data *sd, int n); +typedef bool (*HPMHOOK_pre_clif_enchant_equipment) (struct map_session_data **sd, enum equip_pos *pos, int *cardSlot, int *cardId); +typedef bool (*HPMHOOK_post_clif_enchant_equipment) (bool retVal___, struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId); +typedef void (*HPMHOOK_pre_clif_pReqRemainTime) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqRemainTime) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_npc_barter_open) (struct map_session_data **sd, struct npc_data **nd); +typedef void (*HPMHOOK_post_clif_npc_barter_open) (struct map_session_data *sd, struct npc_data *nd); +typedef void (*HPMHOOK_pre_clif_pNPCBarterClosed) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCBarterClosed) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCBarterPurchase) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCBarterPurchase) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pClientVersion) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pClientVersion) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPing) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPing) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_ping) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_ping) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_pingTimer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clif_pingTimer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_clif_pingTimerSub) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_clif_pingTimerSub) (int retVal___, struct map_session_data *sd, va_list ap); +typedef void (*HPMHOOK_pre_clif_pResetCooldown) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pResetCooldown) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_loadConfirm) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_loadConfirm) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_send_selforarea) (int *fd, struct block_list **bl, const void **buf, int *len); +typedef void (*HPMHOOK_post_clif_send_selforarea) (int fd, struct block_list *bl, const void *buf, int len); +typedef void (*HPMHOOK_pre_clif_OpenRefineryUI) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_OpenRefineryUI) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAddItemRefineryUI) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAddItemRefineryUI) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_AddItemRefineryUIAck) (struct map_session_data **sd, int *item_index, struct s_refine_requirement **req); +typedef void (*HPMHOOK_post_clif_AddItemRefineryUIAck) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req); +typedef void (*HPMHOOK_pre_clif_pRefineryUIClose) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRefineryUIClose) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRefineryUIRefine) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRefineryUIRefine) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_announce_refine_status) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target); +typedef void (*HPMHOOK_post_clif_announce_refine_status) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target); +typedef void (*HPMHOOK_pre_clif_pGuildCastleTeleportRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildCastleTeleportRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildCastleInfoRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildCastleInfoRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_castleteleport_res) (struct map_session_data **sd, enum siege_teleport_result *result); +typedef void (*HPMHOOK_post_clif_guild_castleteleport_res) (struct map_session_data *sd, enum siege_teleport_result result); +typedef bool (*HPMHOOK_pre_clif_lapineDdukDdak_open) (struct map_session_data **sd, int *item_id); +typedef bool (*HPMHOOK_post_clif_lapineDdukDdak_open) (bool retVal___, struct map_session_data *sd, int item_id); +typedef bool (*HPMHOOK_pre_clif_lapineDdukDdak_result) (struct map_session_data **sd, enum lapineddukddak_result *result); +typedef bool (*HPMHOOK_post_clif_lapineDdukDdak_result) (bool retVal___, struct map_session_data *sd, enum lapineddukddak_result result); +typedef void (*HPMHOOK_pre_clif_plapineDdukDdak_ack) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_plapineDdukDdak_ack) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_plapineDdukDdak_close) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_plapineDdukDdak_close) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReqGearOff) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqGearOff) (int fd, struct map_session_data *sd); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); @@ -2818,8 +2958,8 @@ typedef bool (*HPMHOOK_pre_guild_isallied) (int *guild_id, int *guild_id2); typedef bool (*HPMHOOK_post_guild_isallied) (bool retVal___, int guild_id, int guild_id2); typedef struct guild* (*HPMHOOK_pre_guild_search) (int *guild_id); typedef struct guild* (*HPMHOOK_post_guild_search) (struct guild* retVal___, int guild_id); -typedef struct guild* (*HPMHOOK_pre_guild_searchname) (char **str); -typedef struct guild* (*HPMHOOK_post_guild_searchname) (struct guild* retVal___, char *str); +typedef struct guild* (*HPMHOOK_pre_guild_searchname) (const char **str); +typedef struct guild* (*HPMHOOK_post_guild_searchname) (struct guild* retVal___, const char *str); typedef struct guild_castle* (*HPMHOOK_pre_guild_castle_search) (int *gcid); typedef struct guild_castle* (*HPMHOOK_post_guild_castle_search) (struct guild_castle* retVal___, int gcid); typedef struct guild_castle* (*HPMHOOK_pre_guild_mapname2gc) (const char **mapname); @@ -2880,8 +3020,8 @@ typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2, typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag); typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online); typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online); -typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login); -typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login); +typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login); +typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login); typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx); typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx); typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos); @@ -2900,8 +3040,6 @@ typedef int (*HPMHOOK_pre_guild_emblem_changed) (int *len, int *guild_id, int *e typedef int (*HPMHOOK_post_guild_emblem_changed) (int retVal___, int len, int guild_id, int emblem_id, const char *data); typedef int (*HPMHOOK_pre_guild_send_message) (struct map_session_data **sd, const char **mes); typedef int (*HPMHOOK_post_guild_send_message) (int retVal___, struct map_session_data *sd, const char *mes); -typedef int (*HPMHOOK_pre_guild_recv_message) (int *guild_id, int *account_id, const char **mes, int *len); -typedef int (*HPMHOOK_post_guild_recv_message) (int retVal___, int guild_id, int account_id, const char *mes, int len); typedef int (*HPMHOOK_pre_guild_send_dot_remove) (struct map_session_data **sd); typedef int (*HPMHOOK_post_guild_send_dot_remove) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_guild_skillupack) (int *guild_id, uint16 *skill_id, int *account_id); @@ -2946,8 +3084,12 @@ typedef struct map_session_data* (*HPMHOOK_pre_guild_sd_check) (int *guild_id, i typedef struct map_session_data* (*HPMHOOK_post_guild_sd_check) (struct map_session_data* retVal___, int guild_id, int account_id, int char_id); typedef bool (*HPMHOOK_pre_guild_read_guildskill_tree_db) (char **split[], int *columns, int *current); typedef bool (*HPMHOOK_post_guild_read_guildskill_tree_db) (bool retVal___, char *split[], int columns, int current); -typedef bool (*HPMHOOK_pre_guild_read_castledb) (char **str[], int *columns, int *current); -typedef bool (*HPMHOOK_post_guild_read_castledb) (bool retVal___, char *str[], int columns, int current); +typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig) (void); +typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); +typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig_sub_warp) (struct config_setting_t **wd, const char **source, struct guild_castle **gc); +typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig_sub_warp) (bool retVal___, struct config_setting_t *wd, const char *source, struct guild_castle *gc); typedef int (*HPMHOOK_pre_guild_payexp_timer_sub) (union DBKey *key, struct DBData **data, va_list ap); typedef int (*HPMHOOK_post_guild_payexp_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef int (*HPMHOOK_pre_guild_send_xy_timer_sub) (union DBKey *key, struct DBData **data, va_list ap); @@ -3026,8 +3168,8 @@ typedef void (*HPMHOOK_pre_homun_damaged) (struct homun_data **hd); typedef void (*HPMHOOK_post_homun_damaged) (struct homun_data *hd); typedef int (*HPMHOOK_pre_homun_dead) (struct homun_data **hd); typedef int (*HPMHOOK_post_homun_dead) (int retVal___, struct homun_data *hd); -typedef int (*HPMHOOK_pre_homun_vaporize) (struct map_session_data **sd, enum homun_state *flag); -typedef int (*HPMHOOK_post_homun_vaporize) (int retVal___, struct map_session_data *sd, enum homun_state flag); +typedef int (*HPMHOOK_pre_homun_vaporize) (struct map_session_data **sd, enum homun_state *state, bool *force); +typedef int (*HPMHOOK_post_homun_vaporize) (int retVal___, struct map_session_data *sd, enum homun_state state, bool force); typedef int (*HPMHOOK_pre_homun_delete) (struct homun_data **hd, int *emote); typedef int (*HPMHOOK_post_homun_delete) (int retVal___, struct homun_data *hd, int emote); typedef int (*HPMHOOK_pre_homun_checkskill) (struct homun_data **hd, uint16 *skill_id); @@ -3040,14 +3182,16 @@ typedef void (*HPMHOOK_pre_homun_skillup) (struct homun_data **hd, uint16 *skill typedef void (*HPMHOOK_post_homun_skillup) (struct homun_data *hd, uint16 skill_id); typedef bool (*HPMHOOK_pre_homun_levelup) (struct homun_data **hd); typedef bool (*HPMHOOK_post_homun_levelup) (bool retVal___, struct homun_data *hd); -typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, short *class_); -typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, short class_); +typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, int *class_); +typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, int class_); typedef bool (*HPMHOOK_pre_homun_evolve) (struct homun_data **hd); typedef bool (*HPMHOOK_post_homun_evolve) (bool retVal___, struct homun_data *hd); typedef bool (*HPMHOOK_pre_homun_mutate) (struct homun_data **hd, int *homun_id); typedef bool (*HPMHOOK_post_homun_mutate) (bool retVal___, struct homun_data *hd, int homun_id); typedef int (*HPMHOOK_pre_homun_gainexp) (struct homun_data **hd, unsigned int *exp); typedef int (*HPMHOOK_post_homun_gainexp) (int retVal___, struct homun_data *hd, unsigned int exp); +typedef int (*HPMHOOK_pre_homun_gainexp_real) (struct homun_data **hd, unsigned int *exp); +typedef int (*HPMHOOK_post_homun_gainexp_real) (int retVal___, struct homun_data *hd, unsigned int exp); typedef unsigned int (*HPMHOOK_pre_homun_add_intimacy) (struct homun_data **hd, unsigned int *value); typedef unsigned int (*HPMHOOK_post_homun_add_intimacy) (unsigned int retVal___, struct homun_data *hd, unsigned int value); typedef unsigned int (*HPMHOOK_pre_homun_consume_intimacy) (struct homun_data **hd, unsigned int *value); @@ -3070,8 +3214,8 @@ typedef bool (*HPMHOOK_pre_homun_change_name_ack) (struct map_session_data **sd, typedef bool (*HPMHOOK_post_homun_change_name_ack) (bool retVal___, struct map_session_data *sd, const char *name, int flag); typedef int (*HPMHOOK_pre_homun_db_search) (int *key, int *type); typedef int (*HPMHOOK_post_homun_db_search) (int retVal___, int key, int type); -typedef bool (*HPMHOOK_pre_homun_create) (struct map_session_data **sd, const struct s_homunculus **hom); -typedef bool (*HPMHOOK_post_homun_create) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom); +typedef bool (*HPMHOOK_pre_homun_create) (struct map_session_data **sd, const struct s_homunculus **hom, bool *is_new); +typedef bool (*HPMHOOK_post_homun_create) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom, bool is_new); typedef void (*HPMHOOK_pre_homun_init_timers) (struct homun_data **hd); typedef void (*HPMHOOK_post_homun_init_timers) (struct homun_data *hd); typedef bool (*HPMHOOK_pre_homun_call) (struct map_session_data **sd); @@ -3254,8 +3398,8 @@ typedef bool (*HPMHOOK_pre_inter_guild_add_member) (int *guild_id, const struct typedef bool (*HPMHOOK_post_inter_guild_add_member) (bool retVal___, int guild_id, const struct guild_member *member, int map_fd); typedef bool (*HPMHOOK_pre_inter_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes, int *map_fd); typedef bool (*HPMHOOK_post_inter_guild_leave) (bool retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd); -typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); -typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); +typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); typedef bool (*HPMHOOK_pre_inter_guild_update_member_info) (int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len); typedef bool (*HPMHOOK_post_inter_guild_update_member_info) (bool retVal___, int guild_id, int account_id, int char_id, int type, const char *data, int len); typedef bool (*HPMHOOK_pre_inter_guild_disband) (int *guild_id); @@ -3318,10 +3462,6 @@ typedef int (*HPMHOOK_pre_inter_init_sql) (const char **file); typedef int (*HPMHOOK_post_inter_init_sql) (int retVal___, const char *file); typedef int (*HPMHOOK_pre_inter_mapif_init) (int *fd); typedef int (*HPMHOOK_post_inter_mapif_init) (int retVal___, int fd); -typedef int (*HPMHOOK_pre_inter_check_ttl_wisdata_sub) (union DBKey *key, struct DBData **data, va_list ap); -typedef int (*HPMHOOK_post_inter_check_ttl_wisdata_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); -typedef int (*HPMHOOK_pre_inter_check_ttl_wisdata) (void); -typedef int (*HPMHOOK_post_inter_check_ttl_wisdata) (int retVal___); typedef int (*HPMHOOK_pre_inter_check_length) (int *fd, int *length); typedef int (*HPMHOOK_post_inter_check_length) (int retVal___, int fd, int length); typedef int (*HPMHOOK_pre_inter_parse_frommap) (int *fd); @@ -3338,12 +3478,6 @@ typedef void (*HPMHOOK_pre_inter_accinfo) (int *u_fd, int *aid, int *castergroup typedef void (*HPMHOOK_post_inter_accinfo) (int u_fd, int aid, int castergroup, const char *query, int map_fd); typedef void (*HPMHOOK_pre_inter_accinfo2) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char **userid, const char **user_pass, const char **email, const char **last_ip, const char **lastlogin, const char **pin_code, const char **birthdate, int *group_id, int *logincount, int *state); typedef void (*HPMHOOK_post_inter_accinfo2) (bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state); -typedef struct WisData* (*HPMHOOK_pre_inter_add_wisdata) (int *fd, const unsigned char **src, const unsigned char **dst, const unsigned char **msg, int *msg_len); -typedef struct WisData* (*HPMHOOK_post_inter_add_wisdata) (struct WisData* retVal___, int fd, const unsigned char *src, const unsigned char *dst, const unsigned char *msg, int msg_len); -typedef struct WisData* (*HPMHOOK_pre_inter_get_wisdata) (int *id); -typedef struct WisData* (*HPMHOOK_post_inter_get_wisdata) (struct WisData* retVal___, int id); -typedef void (*HPMHOOK_pre_inter_remove_wisdata) (int *id); -typedef void (*HPMHOOK_post_inter_remove_wisdata) (int id); #endif // CHAR_INTER_H #ifdef CHAR_INT_MAIL_H /* inter_mail */ typedef int (*HPMHOOK_pre_inter_mail_sql_init) (void); @@ -3448,8 +3582,8 @@ typedef int (*HPMHOOK_pre_inter_pet_delete_) (int *pet_id); typedef int (*HPMHOOK_post_inter_pet_delete_) (int retVal___, int pet_id); typedef int (*HPMHOOK_pre_inter_pet_parse_frommap) (int *fd); typedef int (*HPMHOOK_post_inter_pet_parse_frommap) (int retVal___, int fd); -typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); -typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); +typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); +typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); typedef struct s_pet* (*HPMHOOK_pre_inter_pet_load) (int *account_id, int *char_id, int *pet_id); typedef struct s_pet* (*HPMHOOK_post_inter_pet_load) (struct s_pet* retVal___, int account_id, int char_id, int pet_id); #endif // CHAR_INT_PET_H @@ -3478,12 +3612,16 @@ typedef int (*HPMHOOK_pre_inter_rodex_fromsql) (int *char_id, int *account_id, i typedef int (*HPMHOOK_post_inter_rodex_fromsql) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails); typedef bool (*HPMHOOK_pre_inter_rodex_hasnew) (int *char_id, int *account_id); typedef bool (*HPMHOOK_post_inter_rodex_hasnew) (bool retVal___, int char_id, int account_id); -typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, short **target_class, int **target_level); -typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level); +typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, int **target_class, int **target_level); +typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level); typedef int64 (*HPMHOOK_pre_inter_rodex_savemessage) (struct rodex_message **msg); typedef int64 (*HPMHOOK_post_inter_rodex_savemessage) (int64 retVal___, struct rodex_message *msg); -typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int64 *mail_id, int8 *flag); -typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int64 mail_id, int8 flag); +typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag); +typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag); +typedef int64 (*HPMHOOK_pre_inter_rodex_getzeny) (int64 *mail_id); +typedef int64 (*HPMHOOK_post_inter_rodex_getzeny) (int64 retVal___, int64 mail_id); +typedef int (*HPMHOOK_pre_inter_rodex_getitems) (int64 *mail_id, struct rodex_item **items); +typedef int (*HPMHOOK_post_inter_rodex_getitems) (int retVal___, int64 mail_id, struct rodex_item *items); #endif // CHAR_INT_RODEX_H #ifdef CHAR_INT_STORAGE_H /* inter_storage */ typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, const struct storage_data **p); @@ -3510,18 +3648,8 @@ typedef bool (*HPMHOOK_post_inter_storage_retrieve_bound_items) (bool retVal___, #ifdef MAP_INTIF_H /* intif */ typedef int (*HPMHOOK_pre_intif_parse) (int *fd); typedef int (*HPMHOOK_post_intif_parse) (int retVal___, int fd); -typedef int (*HPMHOOK_pre_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); -typedef int (*HPMHOOK_post_intif_create_pet) (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); -typedef int (*HPMHOOK_pre_intif_broadcast) (const char **mes, int *len, int *type); -typedef int (*HPMHOOK_post_intif_broadcast) (int retVal___, const char *mes, int len, int type); -typedef int (*HPMHOOK_pre_intif_broadcast2) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); -typedef int (*HPMHOOK_post_intif_broadcast2) (int retVal___, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY); -typedef int (*HPMHOOK_pre_intif_main_message) (struct map_session_data **sd, const char **message); -typedef int (*HPMHOOK_post_intif_main_message) (int retVal___, struct map_session_data *sd, const char *message); -typedef int (*HPMHOOK_pre_intif_wis_message) (struct map_session_data **sd, const char **nick, const char **mes, int *mes_len); -typedef int (*HPMHOOK_post_intif_wis_message) (int retVal___, struct map_session_data *sd, const char *nick, const char *mes, int mes_len); -typedef int (*HPMHOOK_pre_intif_wis_message_to_gm) (char **Wisp_name, int *permission, char **mes); -typedef int (*HPMHOOK_post_intif_wis_message_to_gm) (int retVal___, char *Wisp_name, int permission, char *mes); +typedef int (*HPMHOOK_pre_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); +typedef int (*HPMHOOK_post_intif_create_pet) (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); typedef int (*HPMHOOK_pre_intif_saveregistry) (struct map_session_data **sd); typedef int (*HPMHOOK_post_intif_saveregistry) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_intif_request_registry) (struct map_session_data **sd, int *flag); @@ -3548,8 +3676,6 @@ typedef int (*HPMHOOK_pre_intif_party_changemap) (struct map_session_data **sd, typedef int (*HPMHOOK_post_intif_party_changemap) (int retVal___, struct map_session_data *sd, int online); typedef int (*HPMHOOK_pre_intif_break_party) (int *party_id); typedef int (*HPMHOOK_post_intif_break_party) (int retVal___, int party_id); -typedef int (*HPMHOOK_pre_intif_party_message) (int *party_id, int *account_id, const char **mes, int *len); -typedef int (*HPMHOOK_post_intif_party_message) (int retVal___, int party_id, int account_id, const char *mes, int len); typedef int (*HPMHOOK_pre_intif_party_leaderchange) (int *party_id, int *account_id, int *char_id); typedef int (*HPMHOOK_post_intif_party_leaderchange) (int retVal___, int party_id, int account_id, int char_id); typedef int (*HPMHOOK_pre_intif_guild_create) (const char **name, const struct guild_member **master); @@ -3560,12 +3686,10 @@ typedef int (*HPMHOOK_pre_intif_guild_addmember) (int *guild_id, struct guild_me typedef int (*HPMHOOK_post_intif_guild_addmember) (int retVal___, int guild_id, struct guild_member *m); typedef int (*HPMHOOK_pre_intif_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); typedef int (*HPMHOOK_post_intif_guild_leave) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes); -typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); -typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); +typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); typedef int (*HPMHOOK_pre_intif_guild_break) (int *guild_id); typedef int (*HPMHOOK_post_intif_guild_break) (int retVal___, int guild_id); -typedef int (*HPMHOOK_pre_intif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len); -typedef int (*HPMHOOK_post_intif_guild_message) (int retVal___, int guild_id, int account_id, const char *mes, int len); typedef int (*HPMHOOK_pre_intif_guild_change_gm) (int *guild_id, const char **name, int *len); typedef int (*HPMHOOK_post_intif_guild_change_gm) (int retVal___, int guild_id, const char *name, int len); typedef int (*HPMHOOK_pre_intif_guild_change_basicinfo) (int *guild_id, int *type, const void **data, int *len); @@ -3650,12 +3774,16 @@ typedef int (*HPMHOOK_pre_intif_rodex_requestinbox) (int *char_id, int *account_ typedef int (*HPMHOOK_post_intif_rodex_requestinbox) (int retVal___, int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id); typedef int (*HPMHOOK_pre_intif_rodex_checkhasnew) (struct map_session_data **sd); typedef int (*HPMHOOK_post_intif_rodex_checkhasnew) (int retVal___, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (int64 *mail_id, int8 *flag); -typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, int64 mail_id, int8 flag); +typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag); +typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag); typedef int (*HPMHOOK_pre_intif_rodex_sendmail) (struct rodex_message **msg); typedef int (*HPMHOOK_post_intif_rodex_sendmail) (int retVal___, struct rodex_message *msg); typedef int (*HPMHOOK_pre_intif_rodex_checkname) (struct map_session_data **sd, const char **name); typedef int (*HPMHOOK_post_intif_rodex_checkname) (int retVal___, struct map_session_data *sd, const char *name); +typedef void (*HPMHOOK_pre_intif_pGetZenyAck) (int *fd); +typedef void (*HPMHOOK_post_intif_pGetZenyAck) (int fd); +typedef void (*HPMHOOK_pre_intif_pGetItemsAck) (int *fd); +typedef void (*HPMHOOK_post_intif_pGetItemsAck) (int fd); typedef int (*HPMHOOK_pre_intif_clan_kickoffline) (int *clan_id, int *kick_interval); typedef int (*HPMHOOK_post_intif_clan_kickoffline) (int retVal___, int clan_id, int kick_interval); typedef int (*HPMHOOK_pre_intif_clan_membercount) (int *clan_id, int *kick_interval); @@ -3668,14 +3796,6 @@ typedef void (*HPMHOOK_pre_intif_achievements_request) (struct map_session_data typedef void (*HPMHOOK_post_intif_achievements_request) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_intif_achievements_save) (struct map_session_data **sd); typedef void (*HPMHOOK_post_intif_achievements_save) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_intif_pWisMessage) (int *fd); -typedef void (*HPMHOOK_post_intif_pWisMessage) (int fd); -typedef void (*HPMHOOK_pre_intif_pWisEnd) (int *fd); -typedef void (*HPMHOOK_post_intif_pWisEnd) (int fd); -typedef int (*HPMHOOK_pre_intif_pWisToGM_sub) (struct map_session_data **sd, va_list va); -typedef int (*HPMHOOK_post_intif_pWisToGM_sub) (int retVal___, struct map_session_data *sd, va_list va); -typedef void (*HPMHOOK_pre_intif_pWisToGM) (int *fd); -typedef void (*HPMHOOK_post_intif_pWisToGM) (int fd); typedef void (*HPMHOOK_pre_intif_pRegisters) (int *fd); typedef void (*HPMHOOK_post_intif_pRegisters) (int fd); typedef void (*HPMHOOK_pre_intif_pAccountStorage) (int *fd); @@ -3704,8 +3824,6 @@ typedef void (*HPMHOOK_pre_intif_pPartyMove) (int *fd); typedef void (*HPMHOOK_post_intif_pPartyMove) (int fd); typedef void (*HPMHOOK_pre_intif_pPartyBroken) (int *fd); typedef void (*HPMHOOK_post_intif_pPartyBroken) (int fd); -typedef void (*HPMHOOK_pre_intif_pPartyMessage) (int *fd); -typedef void (*HPMHOOK_post_intif_pPartyMessage) (int fd); typedef void (*HPMHOOK_pre_intif_pGuildCreated) (int *fd); typedef void (*HPMHOOK_post_intif_pGuildCreated) (int fd); typedef void (*HPMHOOK_pre_intif_pGuildInfo) (int *fd); @@ -3718,8 +3836,6 @@ typedef void (*HPMHOOK_pre_intif_pGuildMemberInfoShort) (int *fd); typedef void (*HPMHOOK_post_intif_pGuildMemberInfoShort) (int fd); typedef void (*HPMHOOK_pre_intif_pGuildBroken) (int *fd); typedef void (*HPMHOOK_post_intif_pGuildBroken) (int fd); -typedef void (*HPMHOOK_pre_intif_pGuildMessage) (int *fd); -typedef void (*HPMHOOK_post_intif_pGuildMessage) (int fd); typedef void (*HPMHOOK_pre_intif_pGuildBasicInfoChanged) (int *fd); typedef void (*HPMHOOK_post_intif_pGuildBasicInfoChanged) (int fd); typedef void (*HPMHOOK_pre_intif_pGuildMemberInfoChanged) (int *fd); @@ -3894,8 +4010,8 @@ typedef struct item_data* (*HPMHOOK_pre_itemdb_name2id) (const char **str); typedef struct item_data* (*HPMHOOK_post_itemdb_name2id) (struct item_data* retVal___, const char *str); typedef struct item_data* (*HPMHOOK_pre_itemdb_search_name) (const char **name); typedef struct item_data* (*HPMHOOK_post_itemdb_search_name) (struct item_data* retVal___, const char *name); -typedef int (*HPMHOOK_pre_itemdb_search_name_array) (struct item_data ***data, int *size, const char **str, int *flag); -typedef int (*HPMHOOK_post_itemdb_search_name_array) (int retVal___, struct item_data **data, int size, const char *str, int flag); +typedef int (*HPMHOOK_pre_itemdb_search_name_array) (struct item_data ***data, const int *size, const char **str, enum item_name_search_flag *flag); +typedef int (*HPMHOOK_post_itemdb_search_name_array) (int retVal___, struct item_data **data, const int size, const char *str, enum item_name_search_flag flag); typedef struct item_data* (*HPMHOOK_pre_itemdb_load) (int *nameid); typedef struct item_data* (*HPMHOOK_post_itemdb_load) (struct item_data* retVal___, int nameid); typedef struct item_data* (*HPMHOOK_pre_itemdb_search) (int *nameid); @@ -3960,10 +4076,10 @@ typedef int (*HPMHOOK_pre_itemdb_isidentified) (int *nameid); typedef int (*HPMHOOK_post_itemdb_isidentified) (int retVal___, int nameid); typedef int (*HPMHOOK_pre_itemdb_isidentified2) (struct item_data **data); typedef int (*HPMHOOK_post_itemdb_isidentified2) (int retVal___, struct item_data *data); -typedef int (*HPMHOOK_pre_itemdb_combo_split_atoi) (char **str, int **val); -typedef int (*HPMHOOK_post_itemdb_combo_split_atoi) (int retVal___, char *str, int *val); -typedef void (*HPMHOOK_pre_itemdb_read_combos) (void); -typedef void (*HPMHOOK_post_itemdb_read_combos) (void); +typedef bool (*HPMHOOK_pre_itemdb_read_combodb_libconfig) (void); +typedef bool (*HPMHOOK_post_itemdb_read_combodb_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_itemdb_read_combodb_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_itemdb_read_combodb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); typedef int (*HPMHOOK_pre_itemdb_gendercheck) (struct item_data **id); typedef int (*HPMHOOK_post_itemdb_gendercheck) (int retVal___, struct item_data *id); typedef int (*HPMHOOK_pre_itemdb_validate_entry) (struct item_data **entry, int *n, const char **source); @@ -3998,6 +4114,14 @@ typedef bool (*HPMHOOK_pre_itemdb_lookup_const) (const struct config_setting_t * typedef bool (*HPMHOOK_post_itemdb_lookup_const) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); typedef bool (*HPMHOOK_pre_itemdb_lookup_const_mask) (const struct config_setting_t **it, const char **name, int **value); typedef bool (*HPMHOOK_post_itemdb_lookup_const_mask) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); +typedef int (*HPMHOOK_pre_itemdb_addname_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_itemdb_addname_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_lapineddukddak) (void); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_lapineddukddak) (bool retVal___); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_lapineddukddak_sub) (struct config_setting_t **it, const char **source); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_lapineddukddak_sub) (bool retVal___, struct config_setting_t *it, const char *source); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_lapineddukddak_sub_sources) (struct config_setting_t **sources, struct item_data **data); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_lapineddukddak_sub_sources) (bool retVal___, struct config_setting_t *sources, struct item_data *data); #endif // MAP_ITEMDB_H #ifdef LOGIN_LOGIN_H /* lchrif */ typedef void (*HPMHOOK_pre_lchrif_server_init) (int *id); @@ -4056,12 +4180,20 @@ typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) ( typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN_OTP) (int *fd, struct login_session_data **sd); typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN_OTP) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_OTP_CODE) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_OTP_CODE) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_REQ_HASH) (int *fd, struct login_session_data **sd); typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_REQ_HASH) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_CHARSERVERCONNECT) (int *fd, struct login_session_data **sd); typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_CHARSERVERCONNECT) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); #endif // LOGIN_LCLIF_P_H #ifdef COMMON_CONF_H /* libconfig */ +typedef void (*HPMHOOK_pre_libconfig_set_db_path) (const char **db_path); +typedef void (*HPMHOOK_post_libconfig_set_db_path) (const char *db_path); +typedef void (*HPMHOOK_pre_libconfig_format_db_path) (const char **filename, char **path_buf, int *buffer_len); +typedef void (*HPMHOOK_post_libconfig_format_db_path) (const char *filename, char *path_buf, int buffer_len); typedef int (*HPMHOOK_pre_libconfig_read) (struct config_t **config, FILE **stream); typedef int (*HPMHOOK_post_libconfig_read) (int retVal___, struct config_t *config, FILE *stream); typedef void (*HPMHOOK_pre_libconfig_write) (const struct config_t **config, FILE **stream); @@ -4242,8 +4374,8 @@ typedef char (*HPMHOOK_pre_logs_picktype2char) (e_log_pick_type *type); typedef char (*HPMHOOK_post_logs_picktype2char) (char retVal___, e_log_pick_type type); typedef char (*HPMHOOK_pre_logs_chattype2char) (e_log_chat_type *type); typedef char (*HPMHOOK_post_logs_chattype2char) (char retVal___, e_log_chat_type type); -typedef bool (*HPMHOOK_pre_logs_should_log_item) (int *nameid, int *amount, int *refine, struct item_data **id); -typedef bool (*HPMHOOK_post_logs_should_log_item) (bool retVal___, int nameid, int amount, int refine, struct item_data *id); +typedef bool (*HPMHOOK_pre_logs_should_log_item) (int *nameid, int *amount, int *refine_level, struct item_data **id); +typedef bool (*HPMHOOK_post_logs_should_log_item) (bool retVal___, int nameid, int amount, int refine_level, struct item_data *id); #endif // MAP_LOG_H #ifdef LOGIN_LOGIN_H /* login */ typedef int (*HPMHOOK_pre_login_mmo_auth) (struct login_session_data **sd, bool *isServer); @@ -4338,6 +4470,8 @@ typedef bool (*HPMHOOK_pre_login_client_login) (int *fd, struct login_session_da typedef bool (*HPMHOOK_post_login_client_login) (bool retVal___, int fd, struct login_session_data *sd); typedef bool (*HPMHOOK_pre_login_client_login_otp) (int *fd, struct login_session_data **sd); typedef bool (*HPMHOOK_post_login_client_login_otp) (bool retVal___, int fd, struct login_session_data *sd); +typedef void (*HPMHOOK_pre_login_client_login_mobile_otp_request) (int *fd, struct login_session_data **sd); +typedef void (*HPMHOOK_post_login_client_login_mobile_otp_request) (int fd, struct login_session_data *sd); typedef void (*HPMHOOK_pre_login_char_server_connection_status) (int *fd, struct login_session_data **sd, uint8 *status); typedef void (*HPMHOOK_post_login_char_server_connection_status) (int fd, struct login_session_data *sd, uint8 status); typedef void (*HPMHOOK_pre_login_parse_request_connection) (int *fd, struct login_session_data **sd, const char **ip, uint32 *ipl); @@ -4442,6 +4576,8 @@ typedef void (*HPMHOOK_pre_map_zone_init) (void); typedef void (*HPMHOOK_post_map_zone_init) (void); typedef void (*HPMHOOK_pre_map_zone_remove) (int *m); typedef void (*HPMHOOK_post_map_zone_remove) (int m); +typedef void (*HPMHOOK_pre_map_zone_remove_all) (int *m); +typedef void (*HPMHOOK_post_map_zone_remove_all) (int m); typedef void (*HPMHOOK_pre_map_zone_apply) (int *m, struct map_zone_data **zone, const char **start, const char **buffer, const char **filepath); typedef void (*HPMHOOK_post_map_zone_apply) (int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); typedef void (*HPMHOOK_pre_map_zone_change) (int *m, struct map_zone_data **zone, const char **start, const char **buffer, const char **filepath); @@ -4576,8 +4712,8 @@ typedef void (*HPMHOOK_pre_map_addiddb) (struct block_list **bl); typedef void (*HPMHOOK_post_map_addiddb) (struct block_list *bl); typedef void (*HPMHOOK_pre_map_deliddb) (struct block_list **bl); typedef void (*HPMHOOK_post_map_deliddb) (struct block_list *bl); -typedef struct map_session_data* (*HPMHOOK_pre_map_nick2sd) (const char **nick); -typedef struct map_session_data* (*HPMHOOK_post_map_nick2sd) (struct map_session_data* retVal___, const char *nick); +typedef struct map_session_data* (*HPMHOOK_pre_map_nick2sd) (const char **nick, bool *allow_partial); +typedef struct map_session_data* (*HPMHOOK_post_map_nick2sd) (struct map_session_data* retVal___, const char *nick, bool allow_partial); typedef struct mob_data* (*HPMHOOK_pre_map_getmob_boss) (int16 *m); typedef struct mob_data* (*HPMHOOK_post_map_getmob_boss) (struct mob_data* retVal___, int16 m); typedef struct mob_data* (*HPMHOOK_pre_map_id2boss) (int *id); @@ -4700,8 +4836,8 @@ typedef void (*HPMHOOK_pre_map_update_cell_bl) (struct block_list **bl, bool *in typedef void (*HPMHOOK_post_map_update_cell_bl) (struct block_list *bl, bool increase); typedef int (*HPMHOOK_pre_map_get_new_bonus_id) (void); typedef int (*HPMHOOK_post_map_get_new_bonus_id) (int retVal___); -typedef void (*HPMHOOK_pre_map_add_questinfo) (int *m, struct questinfo **qi); -typedef void (*HPMHOOK_post_map_add_questinfo) (int m, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_map_add_questinfo) (int *m, struct npc_data **nd); +typedef bool (*HPMHOOK_post_map_add_questinfo) (bool retVal___, int m, struct npc_data *nd); typedef bool (*HPMHOOK_pre_map_remove_questinfo) (int *m, struct npc_data **nd); typedef bool (*HPMHOOK_post_map_remove_questinfo) (bool retVal___, int m, struct npc_data *nd); typedef struct map_zone_data* (*HPMHOOK_pre_map_merge_zone) (struct map_zone_data **main, struct map_zone_data **other); @@ -4792,8 +4928,6 @@ typedef int (*HPMHOOK_pre_mapif_guild_memberinfoshort) (struct guild **g, int *i typedef int (*HPMHOOK_post_mapif_guild_memberinfoshort) (int retVal___, struct guild *g, int idx); typedef int (*HPMHOOK_pre_mapif_guild_broken) (int *guild_id, int *flag); typedef int (*HPMHOOK_post_mapif_guild_broken) (int retVal___, int guild_id, int flag); -typedef int (*HPMHOOK_pre_mapif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len, int *sfd); -typedef int (*HPMHOOK_post_mapif_guild_message) (int retVal___, int guild_id, int account_id, const char *mes, int len, int sfd); typedef int (*HPMHOOK_pre_mapif_guild_basicinfochanged) (int *guild_id, int *type, const void **data, int *len); typedef int (*HPMHOOK_post_mapif_guild_basicinfochanged) (int retVal___, int guild_id, int type, const void *data, int len); typedef int (*HPMHOOK_pre_mapif_guild_memberinfochanged) (int *guild_id, int *account_id, int *char_id, int *type, const void **data, int *len); @@ -4820,12 +4954,10 @@ typedef int (*HPMHOOK_pre_mapif_parse_GuildAddMember) (int *fd, int *guild_id, c typedef int (*HPMHOOK_post_mapif_parse_GuildAddMember) (int retVal___, int fd, int guild_id, const struct guild_member *m); typedef int (*HPMHOOK_pre_mapif_parse_GuildLeave) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); typedef int (*HPMHOOK_post_mapif_parse_GuildLeave) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); -typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); -typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); +typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class); typedef int (*HPMHOOK_pre_mapif_parse_BreakGuild) (int *fd, int *guild_id); typedef int (*HPMHOOK_post_mapif_parse_BreakGuild) (int retVal___, int fd, int guild_id); -typedef int (*HPMHOOK_pre_mapif_parse_GuildMessage) (int *fd, int *guild_id, int *account_id, const char **mes, int *len); -typedef int (*HPMHOOK_post_mapif_parse_GuildMessage) (int retVal___, int fd, int guild_id, int account_id, const char *mes, int len); typedef int (*HPMHOOK_pre_mapif_parse_GuildBasicInfoChange) (int *fd, int *guild_id, int *type, const void **data, int *len); typedef int (*HPMHOOK_post_mapif_parse_GuildBasicInfoChange) (int retVal___, int fd, int guild_id, int type, const void *data, int len); typedef int (*HPMHOOK_pre_mapif_parse_GuildMemberInfoChange) (int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len); @@ -4920,8 +5052,6 @@ typedef int (*HPMHOOK_pre_mapif_party_membermoved) (struct party **p, int *idx); typedef int (*HPMHOOK_post_mapif_party_membermoved) (int retVal___, struct party *p, int idx); typedef int (*HPMHOOK_pre_mapif_party_broken) (int *party_id, int *flag); typedef int (*HPMHOOK_post_mapif_party_broken) (int retVal___, int party_id, int flag); -typedef int (*HPMHOOK_pre_mapif_party_message) (int *party_id, int *account_id, const char **mes, int *len, int *sfd); -typedef int (*HPMHOOK_post_mapif_party_message) (int retVal___, int party_id, int account_id, const char *mes, int len, int sfd); typedef int (*HPMHOOK_pre_mapif_parse_CreateParty) (int *fd, const char **name, int *item, int *item2, const struct party_member **leader); typedef int (*HPMHOOK_post_mapif_parse_CreateParty) (int retVal___, int fd, const char *name, int item, int item2, const struct party_member *leader); typedef void (*HPMHOOK_pre_mapif_parse_PartyInfo) (int *fd, int *party_id, int *char_id); @@ -4936,8 +5066,6 @@ typedef int (*HPMHOOK_pre_mapif_parse_PartyChangeMap) (int *fd, int *party_id, i typedef int (*HPMHOOK_post_mapif_parse_PartyChangeMap) (int retVal___, int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv); typedef int (*HPMHOOK_pre_mapif_parse_BreakParty) (int *fd, int *party_id); typedef int (*HPMHOOK_post_mapif_parse_BreakParty) (int retVal___, int fd, int party_id); -typedef int (*HPMHOOK_pre_mapif_parse_PartyMessage) (int *fd, int *party_id, int *account_id, const char **mes, int *len); -typedef int (*HPMHOOK_post_mapif_parse_PartyMessage) (int retVal___, int fd, int party_id, int account_id, const char *mes, int len); typedef int (*HPMHOOK_pre_mapif_parse_PartyLeaderChange) (int *fd, int *party_id, int *account_id, int *char_id); typedef int (*HPMHOOK_post_mapif_parse_PartyLeaderChange) (int retVal___, int fd, int party_id, int account_id, int char_id); typedef int (*HPMHOOK_pre_mapif_pet_created) (int *fd, int *account_id, struct s_pet **p); @@ -4986,8 +5114,12 @@ typedef void (*HPMHOOK_pre_mapif_rodex_send) (int *fd, int *sender_id, int *rece typedef void (*HPMHOOK_post_mapif_rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); typedef void (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd); typedef void (*HPMHOOK_post_mapif_parse_rodex_checkname) (int fd); -typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name); -typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); +typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name); +typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name); +typedef void (*HPMHOOK_pre_mapif_rodex_getzenyack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny); +typedef void (*HPMHOOK_post_mapif_rodex_getzenyack) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny); +typedef void (*HPMHOOK_pre_mapif_rodex_getitemsack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items); +typedef void (*HPMHOOK_post_mapif_rodex_getitemsack) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items); typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag); typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag); typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail); @@ -5010,26 +5142,10 @@ typedef void (*HPMHOOK_pre_mapif_parse_ItemBoundRetrieve) (int *fd); typedef void (*HPMHOOK_post_mapif_parse_ItemBoundRetrieve) (int fd); typedef void (*HPMHOOK_pre_mapif_parse_accinfo) (int *fd); typedef void (*HPMHOOK_post_mapif_parse_accinfo) (int fd); -typedef int (*HPMHOOK_pre_mapif_broadcast) (const unsigned char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); -typedef int (*HPMHOOK_post_mapif_broadcast) (int retVal___, const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd); -typedef int (*HPMHOOK_pre_mapif_wis_message) (struct WisData **wd); -typedef int (*HPMHOOK_post_mapif_wis_message) (int retVal___, struct WisData *wd); -typedef void (*HPMHOOK_pre_mapif_wis_response) (int *fd, const unsigned char **src, int *flag); -typedef void (*HPMHOOK_post_mapif_wis_response) (int fd, const unsigned char *src, int flag); -typedef int (*HPMHOOK_pre_mapif_wis_end) (struct WisData **wd, int *flag); -typedef int (*HPMHOOK_post_mapif_wis_end) (int retVal___, struct WisData *wd, int flag); typedef int (*HPMHOOK_pre_mapif_account_reg_reply) (int *fd, int *account_id, int *char_id, int *type); typedef int (*HPMHOOK_post_mapif_account_reg_reply) (int retVal___, int fd, int account_id, int char_id, int type); typedef int (*HPMHOOK_pre_mapif_disconnectplayer) (int *fd, int *account_id, int *char_id, int *reason); typedef int (*HPMHOOK_post_mapif_disconnectplayer) (int retVal___, int fd, int account_id, int char_id, int reason); -typedef int (*HPMHOOK_pre_mapif_parse_broadcast) (int *fd); -typedef int (*HPMHOOK_post_mapif_parse_broadcast) (int retVal___, int fd); -typedef int (*HPMHOOK_pre_mapif_parse_WisRequest) (int *fd); -typedef int (*HPMHOOK_post_mapif_parse_WisRequest) (int retVal___, int fd); -typedef int (*HPMHOOK_pre_mapif_parse_WisReply) (int *fd); -typedef int (*HPMHOOK_post_mapif_parse_WisReply) (int retVal___, int fd); -typedef int (*HPMHOOK_pre_mapif_parse_WisToGM) (int *fd); -typedef int (*HPMHOOK_post_mapif_parse_WisToGM) (int retVal___, int fd); typedef int (*HPMHOOK_pre_mapif_parse_Registry) (int *fd); typedef int (*HPMHOOK_post_mapif_parse_Registry) (int retVal___, int fd); typedef int (*HPMHOOK_pre_mapif_parse_RegistryRequest) (int *fd); @@ -5044,6 +5160,10 @@ typedef int (*HPMHOOK_pre_mapif_parse_ClanMemberCount) (int *fd, int *clan_id, i typedef int (*HPMHOOK_post_mapif_parse_ClanMemberCount) (int retVal___, int fd, int clan_id, int kick_interval); #endif // CHAR_MAPIF_H #ifdef COMMON_MAPINDEX_H /* mapindex */ +typedef bool (*HPMHOOK_pre_mapindex_config_read_dbpath) (const char **filename, const struct config_t **config); +typedef bool (*HPMHOOK_post_mapindex_config_read_dbpath) (bool retVal___, const char *filename, const struct config_t *config); +typedef bool (*HPMHOOK_pre_mapindex_config_read) (void); +typedef bool (*HPMHOOK_post_mapindex_config_read) (bool retVal___); typedef int (*HPMHOOK_pre_mapindex_init) (void); typedef int (*HPMHOOK_post_mapindex_init) (int retVal___); typedef void (*HPMHOOK_pre_mapindex_final) (void); @@ -5172,6 +5292,8 @@ typedef int (*HPMHOOK_pre_mob_final) (void); typedef int (*HPMHOOK_post_mob_final) (int retVal___); typedef void (*HPMHOOK_pre_mob_reload) (void); typedef void (*HPMHOOK_post_mob_reload) (void); +typedef int (*HPMHOOK_pre_mob_reload_sub_mob) (struct mob_data **md, va_list args); +typedef int (*HPMHOOK_post_mob_reload_sub_mob) (int retVal___, struct mob_data *md, va_list args); typedef struct mob_db* (*HPMHOOK_pre_mob_db) (int *index); typedef struct mob_db* (*HPMHOOK_post_mob_db) (struct mob_db* retVal___, int index); typedef struct mob_chat* (*HPMHOOK_pre_mob_chat) (short *id); @@ -5244,6 +5366,8 @@ typedef int (*HPMHOOK_pre_mob_ai_sub_hard_lootsearch) (struct block_list **bl, v typedef int (*HPMHOOK_post_mob_ai_sub_hard_lootsearch) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_mob_warpchase_sub) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_mob_warpchase_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef bool (*HPMHOOK_pre_mob_is_in_battle_state) (const struct mob_data **md); +typedef bool (*HPMHOOK_post_mob_is_in_battle_state) (bool retVal___, const struct mob_data *md); typedef int (*HPMHOOK_pre_mob_ai_sub_hard_slavemob) (struct mob_data **md, int64 *tick); typedef int (*HPMHOOK_post_mob_ai_sub_hard_slavemob) (int retVal___, struct mob_data *md, int64 tick); typedef int (*HPMHOOK_pre_mob_unlocktarget) (struct mob_data **md, int64 *tick); @@ -5264,8 +5388,10 @@ typedef int (*HPMHOOK_pre_mob_ai_lazy) (int *tid, int64 *tick, int *id, intptr_t typedef int (*HPMHOOK_post_mob_ai_lazy) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_mob_ai_hard) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_mob_ai_hard) (int retVal___, int tid, int64 tick, int id, intptr_t data); -typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, int *qty, struct item_data **data); -typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data); +typedef void (*HPMHOOK_pre_mob_setdropitem_options) (struct item **item, struct optdrop_group **options); +typedef void (*HPMHOOK_post_mob_setdropitem_options) (struct item *item, struct optdrop_group *options); +typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data); +typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data); typedef struct item_drop* (*HPMHOOK_pre_mob_setlootitem) (struct item **item); typedef struct item_drop* (*HPMHOOK_post_mob_setlootitem) (struct item_drop* retVal___, struct item *item); typedef int (*HPMHOOK_pre_mob_delay_item_drop) (int *tid, int64 *tick, int *id, intptr_t *data); @@ -5330,6 +5456,14 @@ typedef unsigned int (*HPMHOOK_pre_mob_drop_adjust) (int *baserate, int *rate_ad typedef unsigned int (*HPMHOOK_post_mob_drop_adjust) (unsigned int retVal___, int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max); typedef void (*HPMHOOK_pre_mob_item_dropratio_adjust) (int *nameid, int *mob_id, int **rate_adjust); typedef void (*HPMHOOK_post_mob_item_dropratio_adjust) (int nameid, int mob_id, int *rate_adjust); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_option) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group); +typedef bool (*HPMHOOK_post_mob_read_optdrops_option) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_optslot) (struct config_setting_t **optslot, int *n, int *group_id, const char **group); +typedef bool (*HPMHOOK_post_mob_read_optdrops_optslot) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_group) (struct config_setting_t **group, int *n); +typedef bool (*HPMHOOK_post_mob_read_optdrops_group) (bool retVal___, struct config_setting_t *group, int n); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_db) (void); +typedef bool (*HPMHOOK_post_mob_read_optdrops_db) (bool retVal___); typedef void (*HPMHOOK_pre_mob_readdb) (void); typedef void (*HPMHOOK_post_mob_readdb) (void); typedef bool (*HPMHOOK_pre_mob_lookup_const) (const struct config_setting_t **it, const char **name, int **value); @@ -5350,12 +5484,16 @@ typedef void (*HPMHOOK_pre_mob_read_db_mvpdrops_sub) (struct mob_db **entry, str typedef void (*HPMHOOK_post_mob_read_db_mvpdrops_sub) (struct mob_db *entry, struct config_setting_t *t); typedef uint32 (*HPMHOOK_pre_mob_read_db_mode_sub) (struct mob_db **entry, struct config_setting_t **t); typedef uint32 (*HPMHOOK_post_mob_read_db_mode_sub) (uint32 retVal___, struct mob_db *entry, struct config_setting_t *t); +typedef struct optdrop_group* (*HPMHOOK_pre_mob_read_db_drops_option) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate); +typedef struct optdrop_group* (*HPMHOOK_post_mob_read_db_drops_option) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate); typedef void (*HPMHOOK_pre_mob_read_db_stats_sub) (struct mob_db **entry, struct config_setting_t **t); typedef void (*HPMHOOK_post_mob_read_db_stats_sub) (struct mob_db *entry, struct config_setting_t *t); +typedef void (*HPMHOOK_pre_mob_read_db_viewdata_sub) (struct mob_db **entry, struct config_setting_t **t); +typedef void (*HPMHOOK_post_mob_read_db_viewdata_sub) (struct mob_db *entry, struct config_setting_t *t); typedef void (*HPMHOOK_pre_mob_name_constants) (void); typedef void (*HPMHOOK_post_mob_name_constants) (void); -typedef bool (*HPMHOOK_pre_mob_readdb_mobavail) (char **str[], int *columns, int *current); -typedef bool (*HPMHOOK_post_mob_readdb_mobavail) (bool retVal___, char *str[], int columns, int current); +typedef void (*HPMHOOK_pre_mob_mobavail_removal_notice) (void); +typedef void (*HPMHOOK_post_mob_mobavail_removal_notice) (void); typedef int (*HPMHOOK_pre_mob_read_randommonster) (void); typedef int (*HPMHOOK_post_mob_read_randommonster) (int retVal___); typedef bool (*HPMHOOK_pre_mob_parse_row_chatdb) (char ***str, const char **source, int *line, int **last_msg_id); @@ -5380,6 +5518,8 @@ typedef int (*HPMHOOK_pre_mob_final_ratio_sub) (union DBKey *key, struct DBData typedef int (*HPMHOOK_post_mob_final_ratio_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_mob_destroy_mob_db) (int *index); typedef void (*HPMHOOK_post_mob_destroy_mob_db) (int index); +typedef void (*HPMHOOK_pre_mob_destroy_drop_groups) (void); +typedef void (*HPMHOOK_post_mob_destroy_drop_groups) (void); typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig) (const char **filename, bool *ignore_missing); typedef bool (*HPMHOOK_post_mob_skill_db_libconfig) (bool retVal___, const char *filename, bool ignore_missing); typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig_sub) (struct config_setting_t **it, int *n); @@ -5554,8 +5694,8 @@ typedef int (*HPMHOOK_pre_npc_parseview) (const char **w4, const char **start, c typedef int (*HPMHOOK_post_npc_parseview) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); typedef bool (*HPMHOOK_pre_npc_viewisid) (const char **viewid); typedef bool (*HPMHOOK_post_npc_viewisid) (bool retVal___, const char *viewid); -typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_); -typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_); +typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_); +typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_); typedef struct npc_data* (*HPMHOOK_pre_npc_add_warp) (char **name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); typedef struct npc_data* (*HPMHOOK_post_npc_add_warp) (struct npc_data* retVal___, char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y); typedef const char* (*HPMHOOK_pre_npc_parse_warp) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); @@ -5594,8 +5734,8 @@ typedef void (*HPMHOOK_pre_npc_movenpc) (struct npc_data **nd, int16 *x, int16 * typedef void (*HPMHOOK_post_npc_movenpc) (struct npc_data *nd, int16 x, int16 y); typedef void (*HPMHOOK_pre_npc_setdisplayname) (struct npc_data **nd, const char **newname); typedef void (*HPMHOOK_post_npc_setdisplayname) (struct npc_data *nd, const char *newname); -typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, short *class_); -typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, short class_); +typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, int *class_); +typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, int class_); typedef int (*HPMHOOK_pre_npc_do_atcmd_event) (struct map_session_data **sd, const char **command, const char **message, const char **eventname); typedef int (*HPMHOOK_post_npc_do_atcmd_event) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname); typedef const char* (*HPMHOOK_pre_npc_parse_function) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); @@ -5634,22 +5774,34 @@ typedef bool (*HPMHOOK_pre_npc_trader_pay) (struct npc_data **nd, struct map_ses typedef bool (*HPMHOOK_post_npc_trader_pay) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int price, int points); typedef void (*HPMHOOK_pre_npc_trader_update) (int *master); typedef void (*HPMHOOK_post_npc_trader_update) (int master); -typedef int (*HPMHOOK_pre_npc_market_buylist) (struct map_session_data **sd, struct itemlist **item_list); -typedef int (*HPMHOOK_post_npc_market_buylist) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); +typedef enum market_buy_result (*HPMHOOK_pre_npc_market_buylist) (struct map_session_data **sd, struct itemlist **item_list); +typedef enum market_buy_result (*HPMHOOK_post_npc_market_buylist) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list); +typedef int (*HPMHOOK_pre_npc_barter_buylist) (struct map_session_data **sd, struct barteritemlist **item_list); +typedef int (*HPMHOOK_post_npc_barter_buylist) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); typedef bool (*HPMHOOK_pre_npc_trader_open) (struct map_session_data **sd, struct npc_data **nd); typedef bool (*HPMHOOK_post_npc_trader_open) (bool retVal___, struct map_session_data *sd, struct npc_data *nd); typedef void (*HPMHOOK_pre_npc_market_fromsql) (void); typedef void (*HPMHOOK_post_npc_market_fromsql) (void); -typedef void (*HPMHOOK_pre_npc_market_tosql) (struct npc_data **nd, unsigned short *index); -typedef void (*HPMHOOK_post_npc_market_tosql) (struct npc_data *nd, unsigned short index); -typedef void (*HPMHOOK_pre_npc_market_delfromsql) (struct npc_data **nd, unsigned short *index); -typedef void (*HPMHOOK_post_npc_market_delfromsql) (struct npc_data *nd, unsigned short index); -typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, unsigned short *index); -typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, unsigned short index); +typedef void (*HPMHOOK_pre_npc_market_tosql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_market_tosql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_market_delfromsql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_market_delfromsql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, int *index); +typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, int index); +typedef void (*HPMHOOK_pre_npc_barter_fromsql) (void); +typedef void (*HPMHOOK_post_npc_barter_fromsql) (void); +typedef void (*HPMHOOK_pre_npc_barter_tosql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_barter_tosql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_barter_delfromsql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_barter_delfromsql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_barter_delfromsql_sub) (const char **npcname, int *itemId, int *itemId2, int *amount2); +typedef void (*HPMHOOK_post_npc_barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2); typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id); typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id); typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd); typedef void (*HPMHOOK_post_npc_refresh) (struct npc_data *nd); +typedef void (*HPMHOOK_pre_npc_questinfo_clear) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_questinfo_clear) (struct npc_data *nd); typedef int (*HPMHOOK_pre_npc_secure_timeout_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_npc_secure_timeout_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); #endif // MAP_NPC_H @@ -5657,6 +5809,16 @@ typedef int (*HPMHOOK_post_npc_secure_timeout_timer) (int retVal___, int tid, in typedef void (*HPMHOOK_pre_nullpo_assert_report) (const char **file, int *line, const char **func, const char **targetname, const char **title); typedef void (*HPMHOOK_post_nullpo_assert_report) (const char *file, int line, const char *func, const char *targetname, const char *title); #endif // COMMON_NULLPO_H +#ifdef COMMON_PACKETS_H /* packets */ +typedef void (*HPMHOOK_pre_packets_init) (void); +typedef void (*HPMHOOK_post_packets_init) (void); +typedef void (*HPMHOOK_pre_packets_final) (void); +typedef void (*HPMHOOK_post_packets_final) (void); +typedef void (*HPMHOOK_pre_packets_addLens) (void); +typedef void (*HPMHOOK_post_packets_addLens) (void); +typedef void (*HPMHOOK_pre_packets_addLen) (int *id, int *len); +typedef void (*HPMHOOK_post_packets_addLen) (int id, int len); +#endif // COMMON_PACKETS_H #ifdef MAP_PARTY_H /* party */ typedef void (*HPMHOOK_pre_party_init) (bool *minimal); typedef void (*HPMHOOK_post_party_init) (bool minimal); @@ -5712,8 +5874,6 @@ typedef int (*HPMHOOK_pre_party_send_logout) (struct map_session_data **sd); typedef int (*HPMHOOK_post_party_send_logout) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_party_send_message) (struct map_session_data **sd, const char **mes); typedef int (*HPMHOOK_post_party_send_message) (int retVal___, struct map_session_data *sd, const char *mes); -typedef int (*HPMHOOK_pre_party_recv_message) (int *party_id, int *account_id, const char **mes, int *len); -typedef int (*HPMHOOK_post_party_recv_message) (int retVal___, int party_id, int account_id, const char *mes, int len); typedef int (*HPMHOOK_pre_party_skill_check) (struct map_session_data **sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); typedef int (*HPMHOOK_post_party_skill_check) (int retVal___, struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv); typedef int (*HPMHOOK_pre_party_send_xy_clear) (struct party_data **p); @@ -5820,8 +5980,8 @@ typedef int (*HPMHOOK_pre_pc_setrestartvalue) (struct map_session_data **sd, int typedef int (*HPMHOOK_post_pc_setrestartvalue) (int retVal___, struct map_session_data *sd, int type); typedef int (*HPMHOOK_pre_pc_makesavestatus) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_makesavestatus) (int retVal___, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_pc_respawn) (struct map_session_data **sd, clr_type *clrtype); -typedef void (*HPMHOOK_post_pc_respawn) (struct map_session_data *sd, clr_type clrtype); +typedef void (*HPMHOOK_pre_pc_respawn) (struct map_session_data **sd, enum clr_type *clrtype); +typedef void (*HPMHOOK_post_pc_respawn) (struct map_session_data *sd, enum clr_type clrtype); typedef int (*HPMHOOK_pre_pc_setnewpc) (struct map_session_data **sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); typedef int (*HPMHOOK_post_pc_setnewpc) (int retVal___, struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd); typedef bool (*HPMHOOK_pre_pc_authok) (struct map_session_data **sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus **st, bool *changing_mapservers); @@ -5856,12 +6016,12 @@ typedef int (*HPMHOOK_pre_pc_calc_skilltree_normalize_job) (struct map_session_d typedef int (*HPMHOOK_post_pc_calc_skilltree_normalize_job) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_clean_skilltree) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_clean_skilltree) (int retVal___, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_pc_setpos) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); -typedef int (*HPMHOOK_post_pc_setpos) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype); +typedef int (*HPMHOOK_pre_pc_setpos) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, enum clr_type *clrtype); +typedef int (*HPMHOOK_post_pc_setpos) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype); typedef int (*HPMHOOK_pre_pc_setsavepoint) (struct map_session_data **sd, short *map_index, int *x, int *y); typedef int (*HPMHOOK_post_pc_setsavepoint) (int retVal___, struct map_session_data *sd, short map_index, int x, int y); -typedef int (*HPMHOOK_pre_pc_randomwarp) (struct map_session_data **sd, clr_type *type); -typedef int (*HPMHOOK_post_pc_randomwarp) (int retVal___, struct map_session_data *sd, clr_type type); +typedef int (*HPMHOOK_pre_pc_randomwarp) (struct map_session_data **sd, enum clr_type *type); +typedef int (*HPMHOOK_post_pc_randomwarp) (int retVal___, struct map_session_data *sd, enum clr_type type); typedef int (*HPMHOOK_pre_pc_memo) (struct map_session_data **sd, int *pos); typedef int (*HPMHOOK_post_pc_memo) (int retVal___, struct map_session_data *sd, int pos); typedef int (*HPMHOOK_pre_pc_checkadditem) (struct map_session_data **sd, int *nameid, int *amount); @@ -5872,8 +6032,8 @@ typedef int (*HPMHOOK_pre_pc_search_inventory) (struct map_session_data **sd, in typedef int (*HPMHOOK_post_pc_search_inventory) (int retVal___, struct map_session_data *sd, int item_id); typedef int (*HPMHOOK_pre_pc_payzeny) (struct map_session_data **sd, int *zeny, enum e_log_pick_type *type, struct map_session_data **tsd); typedef int (*HPMHOOK_post_pc_payzeny) (int retVal___, struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd); -typedef int (*HPMHOOK_pre_pc_additem) (struct map_session_data **sd, struct item **item_data, int *amount, e_log_pick_type *log_type); -typedef int (*HPMHOOK_post_pc_additem) (int retVal___, struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type); +typedef int (*HPMHOOK_pre_pc_additem) (struct map_session_data **sd, const struct item **item_data, int *amount, e_log_pick_type *log_type); +typedef int (*HPMHOOK_post_pc_additem) (int retVal___, struct map_session_data *sd, const struct item *item_data, int amount, e_log_pick_type log_type); typedef int (*HPMHOOK_pre_pc_getzeny) (struct map_session_data **sd, int *zeny, enum e_log_pick_type *type, struct map_session_data **tsd); typedef int (*HPMHOOK_post_pc_getzeny) (int retVal___, struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd); typedef int (*HPMHOOK_pre_pc_delitem) (struct map_session_data **sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); @@ -5904,8 +6064,8 @@ typedef bool (*HPMHOOK_pre_pc_adoption) (struct map_session_data **p1_sd, struct typedef bool (*HPMHOOK_post_pc_adoption) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); typedef int (*HPMHOOK_pre_pc_updateweightstatus) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_updateweightstatus) (int retVal___, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_pc_addautobonus) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned short *pos, bool *onskill); -typedef int (*HPMHOOK_post_pc_addautobonus) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill); +typedef int (*HPMHOOK_pre_pc_addautobonus) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned int *pos, bool *onskill); +typedef int (*HPMHOOK_post_pc_addautobonus) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned int pos, bool onskill); typedef int (*HPMHOOK_pre_pc_exeautobonus) (struct map_session_data **sd, struct s_autobonus **bonus); typedef int (*HPMHOOK_post_pc_exeautobonus) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus); typedef int (*HPMHOOK_pre_pc_endautobonus) (int *tid, int64 *tick, int *id, intptr_t *data); @@ -6092,10 +6252,10 @@ typedef void (*HPMHOOK_pre_pc_setstand) (struct map_session_data **sd); typedef void (*HPMHOOK_post_pc_setstand) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_candrop) (struct map_session_data **sd, struct item **item); typedef int (*HPMHOOK_post_pc_candrop) (int retVal___, struct map_session_data *sd, struct item *item); -typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int16 *class); -typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int16 class); -typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned short *class_, int *sex); -typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned short class_, int sex); +typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int *class); +typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int class); +typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned int *class_, int *sex); +typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned int class_, int sex); typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class); typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class); typedef void (*HPMHOOK_pre_pc_setinvincibletimer) (struct map_session_data **sd, int *val); @@ -6178,8 +6338,8 @@ typedef int (*HPMHOOK_pre_pc_bonus_addeff) (struct s_addeffect **effect, int *ma typedef int (*HPMHOOK_post_pc_bonus_addeff) (int retVal___, struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill **effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); -typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate); -typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate); +typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, int *id, bool *is_group, int *race, int *rate); +typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate); typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data); @@ -6264,8 +6424,14 @@ typedef void (*HPMHOOK_pre_pc_update_idle_time) (struct map_session_data **sd, e typedef void (*HPMHOOK_post_pc_update_idle_time) (struct map_session_data *sd, enum e_battle_config_idletime type); typedef int (*HPMHOOK_pre_pc_have_magnifier) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_have_magnifier) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_have_item_chain) (struct map_session_data **sd, enum e_chain_cache *chain_cache_id); +typedef int (*HPMHOOK_post_pc_have_item_chain) (int retVal___, struct map_session_data *sd, enum e_chain_cache chain_cache_id); typedef bool (*HPMHOOK_pre_pc_process_chat_message) (struct map_session_data **sd, const char **message); typedef bool (*HPMHOOK_post_pc_process_chat_message) (bool retVal___, struct map_session_data *sd, const char *message); +typedef int (*HPMHOOK_pre_pc_wis_message_to_gm) (const char **sender_name, int *permission, const char **message); +typedef int (*HPMHOOK_post_pc_wis_message_to_gm) (int retVal___, const char *sender_name, int permission, const char *message); +typedef int (*HPMHOOK_pre_pc_wis_message_to_gm_sub) (struct map_session_data **sd, va_list va); +typedef int (*HPMHOOK_post_pc_wis_message_to_gm_sub) (int retVal___, struct map_session_data *sd, va_list va); typedef void (*HPMHOOK_pre_pc_check_supernovice_call) (struct map_session_data **sd, const char **message); typedef void (*HPMHOOK_post_pc_check_supernovice_call) (struct map_session_data *sd, const char *message); typedef bool (*HPMHOOK_pre_pc_check_basicskill) (struct map_session_data **sd, int *level); @@ -6274,6 +6440,10 @@ typedef bool (*HPMHOOK_pre_pc_isDeathPenaltyJob) (uint16 *job); typedef bool (*HPMHOOK_post_pc_isDeathPenaltyJob) (bool retVal___, uint16 job); typedef bool (*HPMHOOK_pre_pc_has_second_costume) (struct map_session_data **sd); typedef bool (*HPMHOOK_post_pc_has_second_costume) (bool retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_pc_expandInventory) (struct map_session_data **sd, int *adjustSize); +typedef bool (*HPMHOOK_post_pc_expandInventory) (bool retVal___, struct map_session_data *sd, int adjustSize); +typedef bool (*HPMHOOK_pre_pc_auto_exp_insurance) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_pc_auto_exp_insurance) (bool retVal___, struct map_session_data *sd); #endif // MAP_PC_H #ifdef MAP_NPC_H /* libpcre */ typedef pcre* (*HPMHOOK_pre_libpcre_compile) (const char **pattern, int *options, const char ***errptr, int **erroffset, const unsigned char **tableptr); @@ -6334,8 +6504,8 @@ typedef int (*HPMHOOK_pre_pet_catch_process1) (struct map_session_data **sd, int typedef int (*HPMHOOK_post_pet_catch_process1) (int retVal___, struct map_session_data *sd, int target_class); typedef int (*HPMHOOK_pre_pet_catch_process2) (struct map_session_data **sd, int *target_id); typedef int (*HPMHOOK_post_pet_catch_process2) (int retVal___, struct map_session_data *sd, int target_id); -typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, short *pet_class, int *pet_id); -typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, short pet_class, int pet_id); +typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, int *pet_class, int *pet_id); +typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, int pet_class, int pet_id); typedef int (*HPMHOOK_pre_pet_unequipitem) (struct map_session_data **sd, struct pet_data **pd); typedef int (*HPMHOOK_post_pet_unequipitem) (int retVal___, struct map_session_data *sd, struct pet_data *pd); typedef int (*HPMHOOK_pre_pet_food) (struct map_session_data **sd, struct pet_data **pd); @@ -6468,9 +6638,43 @@ typedef bool (*HPMHOOK_pre_quest_questinfo_validate_homunculus_type) (struct map typedef bool (*HPMHOOK_post_quest_questinfo_validate_homunculus_type) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); typedef bool (*HPMHOOK_pre_quest_questinfo_validate_quests) (struct map_session_data **sd, struct questinfo **qi); typedef bool (*HPMHOOK_post_quest_questinfo_validate_quests) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); -typedef void (*HPMHOOK_pre_quest_questinfo_vector_clear) (int *m); -typedef void (*HPMHOOK_post_quest_questinfo_vector_clear) (int m); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_mercenary_class) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_mercenary_class) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); #endif // MAP_QUEST_H +#ifdef MAP_REFINE_H /* refine */ +typedef int (*HPMHOOK_pre_refine_init) (bool *minimal); +typedef int (*HPMHOOK_post_refine_init) (int retVal___, bool minimal); +typedef void (*HPMHOOK_pre_refine_final) (void); +typedef void (*HPMHOOK_post_refine_final) (void); +typedef int (*HPMHOOK_pre_refine_get_refine_chance) (enum refine_type *wlv, int *refine_level, enum refine_chance_type *type); +typedef int (*HPMHOOK_post_refine_get_refine_chance) (int retVal___, enum refine_type wlv, int refine_level, enum refine_chance_type type); +typedef int (*HPMHOOK_pre_refine_get_bonus) (enum refine_type *equipment_type, int *refine_level); +typedef int (*HPMHOOK_post_refine_get_bonus) (int retVal___, enum refine_type equipment_type, int refine_level); +typedef int (*HPMHOOK_pre_refine_get_randombonus_max) (enum refine_type *equipment_type, int *refine_level); +typedef int (*HPMHOOK_post_refine_get_randombonus_max) (int retVal___, enum refine_type equipment_type, int refine_level); +typedef void (*HPMHOOK_pre_refine_refinery_add_item) (struct map_session_data **sd, int *item_index); +typedef void (*HPMHOOK_post_refine_refinery_add_item) (struct map_session_data *sd, int item_index); +typedef void (*HPMHOOK_pre_refine_refinery_refine_request) (struct map_session_data **sd, int *item_index, int *material_id, bool *use_blacksmith_blessing); +typedef void (*HPMHOOK_post_refine_refinery_refine_request) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing); +#endif // MAP_REFINE_H +#ifdef MAP_REFINE_P_H /* PRIV__refine */ +typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refine_libconfig_sub) (struct config_setting_t **r, const char **name, const char **source); +typedef int (*HPMHOOK_post_PRIV__refine_readdb_refine_libconfig_sub) (int retVal___, struct config_setting_t *r, const char *name, const char *source); +typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refine_libconfig) (const char **filename); +typedef int (*HPMHOOK_post_PRIV__refine_readdb_refine_libconfig) (int retVal___, const char *filename); +typedef bool (*HPMHOOK_pre_PRIV__refine_announce_behavior_string2enum) (const char **str, unsigned int **result); +typedef bool (*HPMHOOK_post_PRIV__refine_announce_behavior_string2enum) (bool retVal___, const char *str, unsigned int *result); +typedef bool (*HPMHOOK_pre_PRIV__refine_failure_behavior_string2enum) (const char **str, enum refine_ui_failure_behavior **result); +typedef bool (*HPMHOOK_post_PRIV__refine_failure_behavior_string2enum) (bool retVal___, const char *str, enum refine_ui_failure_behavior *result); +typedef bool (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings_items) (const struct config_setting_t **elem, struct s_refine_requirement **req, const char **name, const char **source); +typedef bool (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings_items) (bool retVal___, const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source); +typedef bool (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings_sub) (const struct config_setting_t **elem, int *type, const char **name, const char **source); +typedef bool (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings_sub) (bool retVal___, const struct config_setting_t *elem, int type, const char *name, const char *source); +typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings) (const struct config_setting_t **r, int *type, const char **name, const char **source); +typedef int (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings) (int retVal___, const struct config_setting_t *r, int type, const char *name, const char *source); +typedef bool (*HPMHOOK_pre_PRIV__refine_is_refinable) (struct map_session_data **sd, int *item_index); +typedef bool (*HPMHOOK_post_PRIV__refine_is_refinable) (bool retVal___, struct map_session_data *sd, int item_index); +#endif // MAP_REFINE_P_H #ifdef COMMON_RANDOM_H /* rnd */ typedef void (*HPMHOOK_pre_rnd_init) (void); typedef void (*HPMHOOK_post_rnd_init) (void); @@ -6506,8 +6710,8 @@ typedef void (*HPMHOOK_pre_rodex_add_item) (struct map_session_data **sd, int16 typedef void (*HPMHOOK_post_rodex_add_item) (struct map_session_data *sd, int16 idx, int16 amount); typedef void (*HPMHOOK_pre_rodex_remove_item) (struct map_session_data **sd, int16 *idx, int16 *amount); typedef void (*HPMHOOK_post_rodex_remove_item) (struct map_session_data *sd, int16 idx, int16 amount); -typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class); -typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class); +typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class); +typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class); typedef int (*HPMHOOK_pre_rodex_send_mail) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny); typedef int (*HPMHOOK_post_rodex_send_mail) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny); typedef void (*HPMHOOK_pre_rodex_send_mail_result) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result); @@ -6524,6 +6728,10 @@ typedef void (*HPMHOOK_pre_rodex_delete_mail) (struct map_session_data **sd, int typedef void (*HPMHOOK_post_rodex_delete_mail) (struct map_session_data *sd, int64 mail_id); typedef void (*HPMHOOK_pre_rodex_clean) (struct map_session_data **sd, int8 *flag); typedef void (*HPMHOOK_post_rodex_clean) (struct map_session_data *sd, int8 flag); +typedef void (*HPMHOOK_pre_rodex_getZenyAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny); +typedef void (*HPMHOOK_post_rodex_getZenyAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny); +typedef void (*HPMHOOK_pre_rodex_getItemsAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items); +typedef void (*HPMHOOK_post_rodex_getItemsAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items); #endif // MAP_RODEX_H #ifdef MAP_SCRIPT_H /* script */ typedef void (*HPMHOOK_pre_script_init) (bool *minimal); @@ -6874,8 +7082,10 @@ typedef void (*HPMHOOK_pre_script_load_translations) (void); typedef void (*HPMHOOK_post_script_load_translations) (void); typedef bool (*HPMHOOK_pre_script_load_translation_addstring) (const char **file, uint8 *lang_id, const char **msgctxt, const struct script_string_buf **msgid, const struct script_string_buf **msgstr); typedef bool (*HPMHOOK_post_script_load_translation_addstring) (bool retVal___, const char *file, uint8 lang_id, const char *msgctxt, const struct script_string_buf *msgid, const struct script_string_buf *msgstr); -typedef int (*HPMHOOK_pre_script_load_translation) (const char **file, uint8 *lang_id); -typedef int (*HPMHOOK_post_script_load_translation) (int retVal___, const char *file, uint8 lang_id); +typedef int (*HPMHOOK_pre_script_load_translation_file) (const char **file, uint8 *lang_id); +typedef int (*HPMHOOK_post_script_load_translation_file) (int retVal___, const char *file, uint8 lang_id); +typedef int (*HPMHOOK_pre_script_load_translation) (const char **directory, uint8 *lang_id); +typedef int (*HPMHOOK_post_script_load_translation) (int retVal___, const char *directory, uint8 lang_id); typedef int (*HPMHOOK_pre_script_translation_db_destroyer) (union DBKey *key, struct DBData **data, va_list ap); typedef int (*HPMHOOK_post_script_translation_db_destroyer) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_script_clear_translations) (bool *reload); @@ -6884,8 +7094,8 @@ typedef int (*HPMHOOK_pre_script_parse_cleanup_timer) (int *tid, int64 *tick, in typedef int (*HPMHOOK_post_script_parse_cleanup_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef uint8 (*HPMHOOK_pre_script_add_language) (const char **name); typedef uint8 (*HPMHOOK_post_script_add_language) (uint8 retVal___, const char *name); -typedef const char* (*HPMHOOK_pre_script_get_translation_file_name) (const char **file); -typedef const char* (*HPMHOOK_post_script_get_translation_file_name) (const char* retVal___, const char *file); +typedef const char* (*HPMHOOK_pre_script_get_translation_dir_name) (const char **directory); +typedef const char* (*HPMHOOK_post_script_get_translation_dir_name) (const char* retVal___, const char *directory); typedef void (*HPMHOOK_pre_script_parser_clean_leftovers) (void); typedef void (*HPMHOOK_post_script_parser_clean_leftovers) (void); typedef void (*HPMHOOK_pre_script_run_use_script) (struct map_session_data **sd, struct item_data **data, int *oid); @@ -6894,6 +7104,12 @@ typedef void (*HPMHOOK_pre_script_run_item_equip_script) (struct map_session_dat typedef void (*HPMHOOK_post_script_run_item_equip_script) (struct map_session_data *sd, struct item_data *data, int oid); typedef void (*HPMHOOK_pre_script_run_item_unequip_script) (struct map_session_data **sd, struct item_data **data, int *oid); typedef void (*HPMHOOK_post_script_run_item_unequip_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef void (*HPMHOOK_pre_script_run_item_rental_end_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_item_rental_end_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef void (*HPMHOOK_pre_script_run_item_rental_start_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_item_rental_start_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef void (*HPMHOOK_pre_script_run_item_lapineddukddak_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_item_lapineddukddak_script) (struct map_session_data *sd, struct item_data *data, int oid); #endif // MAP_SCRIPT_H #ifdef MAP_SEARCHSTORE_H /* searchstore */ typedef bool (*HPMHOOK_pre_searchstore_open) (struct map_session_data **sd, unsigned int *uses, unsigned short *effect); @@ -6914,8 +7130,8 @@ typedef bool (*HPMHOOK_pre_searchstore_queryremote) (struct map_session_data **s typedef bool (*HPMHOOK_post_searchstore_queryremote) (bool retVal___, struct map_session_data *sd, int account_id); typedef void (*HPMHOOK_pre_searchstore_clearremote) (struct map_session_data **sd); typedef void (*HPMHOOK_post_searchstore_clearremote) (struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_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); -typedef bool (*HPMHOOK_post_searchstore_result) (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); +typedef bool (*HPMHOOK_pre_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); +typedef bool (*HPMHOOK_post_searchstore_result) (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); #endif // MAP_SEARCHSTORE_H #ifdef COMMON_SHOWMSG_H /* showmsg */ typedef void (*HPMHOOK_pre_showmsg_init) (void); @@ -7186,6 +7402,8 @@ typedef int (*HPMHOOK_pre_skill_cell_overlap) (struct block_list **bl, va_list a typedef int (*HPMHOOK_post_skill_cell_overlap) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_skill_timerskill) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_skill_timerskill) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_skill_trap_do_splash) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *bl_flag, int64 *tick); +typedef void (*HPMHOOK_post_skill_trap_do_splash) (struct block_list *bl, uint16 skill_id, uint16 skill_lv, int bl_flag, int64 tick); typedef int (*HPMHOOK_pre_skill_trap_splash) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_skill_trap_splash) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_skill_check_condition_mercenary) (struct block_list **bl, int *skill_id, int *lv, int *type); @@ -7432,12 +7650,16 @@ typedef int (*HPMHOOK_pre_sockt_realloc_fifo) (int *fd, unsigned int *rfifo_size typedef int (*HPMHOOK_post_sockt_realloc_fifo) (int retVal___, int fd, unsigned int rfifo_size, unsigned int wfifo_size); typedef int (*HPMHOOK_pre_sockt_realloc_writefifo) (int *fd, size_t *addition); typedef int (*HPMHOOK_post_sockt_realloc_writefifo) (int retVal___, int fd, size_t addition); -typedef int (*HPMHOOK_pre_sockt_wfifoset) (int *fd, size_t *len); -typedef int (*HPMHOOK_post_sockt_wfifoset) (int retVal___, int fd, size_t len); +typedef int (*HPMHOOK_pre_sockt_wfifoset) (int *fd, size_t *len, bool *validate); +typedef int (*HPMHOOK_post_sockt_wfifoset) (int retVal___, int fd, size_t len, bool validate); +typedef void (*HPMHOOK_pre_sockt_wfifohead) (int *fd, size_t *len); +typedef void (*HPMHOOK_post_sockt_wfifohead) (int fd, size_t len); typedef int (*HPMHOOK_pre_sockt_rfifoskip) (int *fd, size_t *len); typedef int (*HPMHOOK_post_sockt_rfifoskip) (int retVal___, int fd, size_t len); typedef void (*HPMHOOK_pre_sockt_close) (int *fd); typedef void (*HPMHOOK_post_sockt_close) (int fd); +typedef void (*HPMHOOK_pre_sockt_validateWfifo) (int *fd, size_t *len); +typedef void (*HPMHOOK_post_sockt_validateWfifo) (int fd, size_t len); typedef bool (*HPMHOOK_pre_sockt_session_is_valid) (int *fd); typedef bool (*HPMHOOK_post_sockt_session_is_valid) (bool retVal___, int fd); typedef bool (*HPMHOOK_pre_sockt_session_is_active) (int *fd); @@ -7446,6 +7668,8 @@ typedef void (*HPMHOOK_pre_sockt_flush) (int *fd); typedef void (*HPMHOOK_post_sockt_flush) (int fd); typedef void (*HPMHOOK_pre_sockt_flush_fifos) (void); typedef void (*HPMHOOK_post_sockt_flush_fifos) (void); +typedef int (*HPMHOOK_pre_sockt_connect_client) (int *listen_fd); +typedef int (*HPMHOOK_post_sockt_connect_client) (int retVal___, int listen_fd); typedef void (*HPMHOOK_pre_sockt_set_nonblocking) (int *fd, unsigned long *yes); typedef void (*HPMHOOK_post_sockt_set_nonblocking) (int fd, unsigned long yes); typedef void (*HPMHOOK_pre_sockt_set_defaultparse) (ParseFunc *defaultparse); @@ -7544,30 +7768,30 @@ typedef int (*HPMHOOK_pre_status_init) (bool *minimal); typedef int (*HPMHOOK_post_status_init) (int retVal___, bool minimal); typedef void (*HPMHOOK_pre_status_final) (void); typedef void (*HPMHOOK_post_status_final) (void); -typedef int (*HPMHOOK_pre_status_get_refine_chance) (enum refine_type *wlv, int *refine, enum refine_chance_type *type); -typedef int (*HPMHOOK_post_status_get_refine_chance) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type); typedef sc_type (*HPMHOOK_pre_status_skill2sc) (int *skill_id); typedef sc_type (*HPMHOOK_post_status_skill2sc) (sc_type retVal___, int skill_id); typedef int (*HPMHOOK_pre_status_sc2skill) (sc_type *sc); typedef int (*HPMHOOK_post_status_sc2skill) (int retVal___, sc_type sc); typedef unsigned int (*HPMHOOK_pre_status_sc2scb_flag) (sc_type *sc); typedef unsigned int (*HPMHOOK_post_status_sc2scb_flag) (unsigned int retVal___, sc_type sc); -typedef int (*HPMHOOK_pre_status_type2relevant_bl_types) (int *type); -typedef int (*HPMHOOK_post_status_type2relevant_bl_types) (int retVal___, int type); +typedef int (*HPMHOOK_pre_status_get_sc_relevant_bl_types) (sc_type *type); +typedef int (*HPMHOOK_post_status_get_sc_relevant_bl_types) (int retVal___, sc_type type); typedef int (*HPMHOOK_pre_status_get_sc_type) (sc_type *idx); typedef int (*HPMHOOK_post_status_get_sc_type) (int retVal___, sc_type idx); +typedef int (*HPMHOOK_pre_status_get_sc_icon) (sc_type *type); +typedef int (*HPMHOOK_post_status_get_sc_icon) (int retVal___, sc_type type); typedef int (*HPMHOOK_pre_status_damage) (struct block_list **src, struct block_list **target, int64 *hp, int64 *sp, int *walkdelay, int *flag); typedef int (*HPMHOOK_post_status_damage) (int retVal___, struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag); typedef int (*HPMHOOK_pre_status_charge) (struct block_list **bl, int64 *hp, int64 *sp); typedef int (*HPMHOOK_post_status_charge) (int retVal___, struct block_list *bl, int64 hp, int64 sp); typedef int (*HPMHOOK_pre_status_percent_change) (struct block_list **src, struct block_list **target, signed char *hp_rate, signed char *sp_rate, int *flag); typedef int (*HPMHOOK_post_status_percent_change) (int retVal___, struct block_list *src, struct block_list *target, signed char hp_rate, signed char sp_rate, int flag); -typedef int (*HPMHOOK_pre_status_set_hp) (struct block_list **bl, unsigned int *hp, int *flag); -typedef int (*HPMHOOK_post_status_set_hp) (int retVal___, struct block_list *bl, unsigned int hp, int flag); -typedef int (*HPMHOOK_pre_status_set_sp) (struct block_list **bl, unsigned int *sp, int *flag); -typedef int (*HPMHOOK_post_status_set_sp) (int retVal___, struct block_list *bl, unsigned int sp, int flag); -typedef int (*HPMHOOK_pre_status_heal) (struct block_list **bl, int64 *hp, int64 *sp, int *flag); -typedef int (*HPMHOOK_post_status_heal) (int retVal___, struct block_list *bl, int64 hp, int64 sp, int flag); +typedef int (*HPMHOOK_pre_status_set_hp) (struct block_list **bl, unsigned int *hp, enum status_heal_flag *flag); +typedef int (*HPMHOOK_post_status_set_hp) (int retVal___, struct block_list *bl, unsigned int hp, enum status_heal_flag flag); +typedef int (*HPMHOOK_pre_status_set_sp) (struct block_list **bl, unsigned int *sp, enum status_heal_flag *flag); +typedef int (*HPMHOOK_post_status_set_sp) (int retVal___, struct block_list *bl, unsigned int sp, enum status_heal_flag flag); +typedef int (*HPMHOOK_pre_status_heal) (struct block_list **bl, int64 *hp, int64 *sp, enum status_heal_flag *flag); +typedef int (*HPMHOOK_post_status_heal) (int retVal___, struct block_list *bl, int64 hp, int64 sp, enum status_heal_flag flag); typedef int (*HPMHOOK_pre_status_revive) (struct block_list **bl, unsigned char *per_hp, unsigned char *per_sp); typedef int (*HPMHOOK_post_status_revive) (int retVal___, struct block_list *bl, unsigned char per_hp, unsigned char per_sp); typedef int (*HPMHOOK_pre_status_fixed_revive) (struct block_list **bl, unsigned int *per_hp, unsigned int *per_sp); @@ -7616,6 +7840,8 @@ typedef int (*HPMHOOK_pre_status_get_sc_def) (struct block_list **src, struct bl typedef int (*HPMHOOK_post_status_get_sc_def) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag); typedef int (*HPMHOOK_pre_status_change_start) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); typedef int (*HPMHOOK_post_status_change_start) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag); +typedef int (*HPMHOOK_pre_status_change_start_sub) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *total_tick, int *flag); +typedef int (*HPMHOOK_post_status_change_start_sub) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int total_tick, int flag); typedef int (*HPMHOOK_pre_status_change_end_) (struct block_list **bl, enum sc_type *type, int *tid, const char **file, int *line); typedef int (*HPMHOOK_post_status_change_end_) (int retVal___, struct block_list *bl, enum sc_type type, int tid, const char *file, int line); typedef bool (*HPMHOOK_pre_status_is_immune_to_status) (struct status_change **sc, enum sc_type *type); @@ -7632,8 +7858,8 @@ typedef int (*HPMHOOK_pre_status_get_val_flag) (enum sc_type *type); typedef int (*HPMHOOK_post_status_get_val_flag) (int retVal___, enum sc_type type); typedef void (*HPMHOOK_pre_status_change_start_display) (struct map_session_data **sd, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); typedef void (*HPMHOOK_post_status_change_start_display) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4); -typedef bool (*HPMHOOK_pre_status_change_start_unknown_sc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); -typedef bool (*HPMHOOK_post_status_change_start_unknown_sc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag); +typedef bool (*HPMHOOK_pre_status_change_start_unknown_sc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *total_tick, int *flag); +typedef bool (*HPMHOOK_post_status_change_start_unknown_sc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag); typedef int (*HPMHOOK_pre_status_kaahi_heal_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_status_kaahi_heal_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_status_change_timer) (int *tid, int64 *tick, int *id, intptr_t *data); @@ -7682,10 +7908,10 @@ typedef defType (*HPMHOOK_pre_status_calc_mdef) (struct block_list **bl, struct typedef defType (*HPMHOOK_post_status_calc_mdef) (defType retVal___, struct block_list *bl, struct status_change *sc, int mdef, bool viewable); typedef short (*HPMHOOK_pre_status_calc_mdef2) (struct block_list **bl, struct status_change **sc, int *mdef2, bool *viewable); typedef short (*HPMHOOK_post_status_calc_mdef2) (short retVal___, struct block_list *bl, struct status_change *sc, int mdef2, bool viewable); -typedef unsigned short (*HPMHOOK_pre_status_calc_batk) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); -typedef unsigned short (*HPMHOOK_post_status_calc_batk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); -typedef unsigned short (*HPMHOOK_pre_status_base_matk) (struct block_list **bl, const struct status_data **st, int *level); -typedef unsigned short (*HPMHOOK_post_status_base_matk) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int level); +typedef int (*HPMHOOK_pre_status_calc_batk) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_batk) (int retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); +typedef int (*HPMHOOK_pre_status_base_matk) (struct block_list **bl, const struct status_data **st, int *level); +typedef int (*HPMHOOK_post_status_base_matk) (int retVal___, struct block_list *bl, const struct status_data *st, int level); typedef int (*HPMHOOK_pre_status_get_weapon_atk) (struct block_list **src, struct weapon_atk **watk, int *flag); typedef int (*HPMHOOK_post_status_get_weapon_atk) (int retVal___, struct block_list *src, struct weapon_atk *watk, int flag); typedef int (*HPMHOOK_pre_status_get_total_mdef) (struct block_list **src); @@ -7704,12 +7930,16 @@ typedef void (*HPMHOOK_pre_status_initDummyData) (void); typedef void (*HPMHOOK_post_status_initDummyData) (void); typedef int (*HPMHOOK_pre_status_base_amotion_pc) (struct map_session_data **sd, struct status_data **st); typedef int (*HPMHOOK_post_status_base_amotion_pc) (int retVal___, struct map_session_data *sd, struct status_data *st); -typedef unsigned short (*HPMHOOK_pre_status_base_atk) (const struct block_list **bl, const struct status_data **st); -typedef unsigned short (*HPMHOOK_post_status_base_atk) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st); +typedef int (*HPMHOOK_pre_status_base_atk) (const struct block_list **bl, const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_atk) (int retVal___, const struct block_list *bl, const struct status_data *st); typedef unsigned int (*HPMHOOK_pre_status_get_base_maxhp) (const struct map_session_data **sd, const struct status_data **st); typedef unsigned int (*HPMHOOK_post_status_get_base_maxhp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); typedef unsigned int (*HPMHOOK_pre_status_get_base_maxsp) (const struct map_session_data **sd, const struct status_data **st); typedef unsigned int (*HPMHOOK_post_status_get_base_maxsp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); +typedef unsigned int (*HPMHOOK_pre_status_get_restart_hp) (const struct map_session_data **sd, const struct status_data **st); +typedef unsigned int (*HPMHOOK_post_status_get_restart_hp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); +typedef unsigned int (*HPMHOOK_pre_status_get_restart_sp) (const struct map_session_data **sd, const struct status_data **st); +typedef unsigned int (*HPMHOOK_post_status_get_restart_sp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); typedef int (*HPMHOOK_pre_status_calc_npc_) (struct npc_data **nd, enum e_status_calc_opt *opt); typedef int (*HPMHOOK_post_status_calc_npc_) (int retVal___, struct npc_data *nd, enum e_status_calc_opt opt); typedef unsigned short (*HPMHOOK_pre_status_calc_str) (struct block_list **bl, struct status_change **sc, int *str); @@ -7724,18 +7954,18 @@ typedef unsigned short (*HPMHOOK_pre_status_calc_dex) (struct block_list **bl, s typedef unsigned short (*HPMHOOK_post_status_calc_dex) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int dex); typedef unsigned short (*HPMHOOK_pre_status_calc_luk) (struct block_list **bl, struct status_change **sc, int *luk); typedef unsigned short (*HPMHOOK_post_status_calc_luk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int luk); -typedef unsigned short (*HPMHOOK_pre_status_calc_watk) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); -typedef unsigned short (*HPMHOOK_post_status_calc_watk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); -typedef unsigned short (*HPMHOOK_pre_status_calc_matk) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); -typedef unsigned short (*HPMHOOK_post_status_calc_matk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); -typedef signed short (*HPMHOOK_pre_status_calc_hit) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); -typedef signed short (*HPMHOOK_post_status_calc_hit) (signed short retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); -typedef signed short (*HPMHOOK_pre_status_calc_critical) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); -typedef signed short (*HPMHOOK_post_status_calc_critical) (signed short retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); -typedef signed short (*HPMHOOK_pre_status_calc_flee) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); -typedef signed short (*HPMHOOK_post_status_calc_flee) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); -typedef signed short (*HPMHOOK_pre_status_calc_flee2) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); -typedef signed short (*HPMHOOK_post_status_calc_flee2) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); +typedef int (*HPMHOOK_pre_status_calc_watk) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_watk) (int retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); +typedef int (*HPMHOOK_pre_status_calc_matk) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_matk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_hit) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_hit) (signed int retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_critical) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_critical) (signed int retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_flee) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_flee) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_flee2) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_flee2) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); typedef unsigned short (*HPMHOOK_pre_status_calc_speed) (struct block_list **bl, struct status_change **sc, int *speed); typedef unsigned short (*HPMHOOK_post_status_calc_speed) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int speed); typedef short (*HPMHOOK_pre_status_calc_aspd_rate) (struct block_list **bl, struct status_change **sc, int *aspd_rate); @@ -7756,8 +7986,8 @@ typedef unsigned char (*HPMHOOK_pre_status_calc_element_lv) (struct block_list * typedef unsigned char (*HPMHOOK_post_status_calc_element_lv) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int lv); typedef uint32 (*HPMHOOK_pre_status_calc_mode) (const struct block_list **bl, const struct status_change **sc, uint32 *mode); typedef uint32 (*HPMHOOK_post_status_calc_mode) (uint32 retVal___, const struct block_list *bl, const struct status_change *sc, uint32 mode); -typedef unsigned short (*HPMHOOK_pre_status_calc_ematk) (struct block_list **bl, struct status_change **sc, int *matk); -typedef unsigned short (*HPMHOOK_post_status_calc_ematk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk); +typedef int (*HPMHOOK_pre_status_calc_ematk) (struct block_list **bl, struct status_change **sc, int *matk); +typedef int (*HPMHOOK_post_status_calc_ematk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk); typedef void (*HPMHOOK_pre_status_calc_bl_main) (struct block_list **bl, int *flag); typedef void (*HPMHOOK_post_status_calc_bl_main) (struct block_list *bl, int flag); typedef void (*HPMHOOK_pre_status_display_add) (struct map_session_data **sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); @@ -7772,24 +8002,26 @@ typedef bool (*HPMHOOK_pre_status_readdb_job2) (char **fields[], int *columns, i typedef bool (*HPMHOOK_post_status_readdb_job2) (bool retVal___, char *fields[], int columns, int current); typedef bool (*HPMHOOK_pre_status_readdb_sizefix) (char **fields[], int *columns, int *current); typedef bool (*HPMHOOK_post_status_readdb_sizefix) (bool retVal___, char *fields[], int columns, int current); -typedef int (*HPMHOOK_pre_status_readdb_refine_libconfig) (const char **filename); -typedef int (*HPMHOOK_post_status_readdb_refine_libconfig) (int retVal___, const char *filename); -typedef int (*HPMHOOK_pre_status_readdb_refine_libconfig_sub) (struct config_setting_t **r, const char **name, const char **source); -typedef int (*HPMHOOK_post_status_readdb_refine_libconfig_sub) (int retVal___, struct config_setting_t *r, const char *name, const char *source); -typedef bool (*HPMHOOK_pre_status_readdb_scconfig) (char **fields[], int *columns, int *current); -typedef bool (*HPMHOOK_post_status_readdb_scconfig) (bool retVal___, char *fields[], int columns, int current); +typedef bool (*HPMHOOK_pre_status_read_scdb_libconfig) (void); +typedef bool (*HPMHOOK_post_status_read_scdb_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_status_read_scdb_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_status_read_scdb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); +typedef bool (*HPMHOOK_pre_status_read_scdb_libconfig_sub_flag) (struct config_setting_t **it, int *type, const char **source); +typedef bool (*HPMHOOK_post_status_read_scdb_libconfig_sub_flag) (bool retVal___, struct config_setting_t *it, int type, const char *source); +typedef bool (*HPMHOOK_pre_status_read_scdb_libconfig_sub_flag_additional) (struct config_setting_t **it, int *type, const char **source); +typedef bool (*HPMHOOK_post_status_read_scdb_libconfig_sub_flag_additional) (bool retVal___, struct config_setting_t *it, int type, const char *source); typedef void (*HPMHOOK_pre_status_read_job_db) (void); typedef void (*HPMHOOK_post_status_read_job_db) (void); typedef void (*HPMHOOK_pre_status_read_job_db_sub) (int *idx, const char **name, struct config_setting_t **jdb); typedef void (*HPMHOOK_post_status_read_job_db_sub) (int idx, const char *name, struct config_setting_t *jdb); -typedef void (*HPMHOOK_pre_status_set_sc) (uint16 *skill_id, sc_type *sc, int *icon, unsigned int *flag); -typedef void (*HPMHOOK_post_status_set_sc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag); +typedef void (*HPMHOOK_pre_status_set_sc) (uint16 *skill_id, sc_type *sc, unsigned int *flag); +typedef void (*HPMHOOK_post_status_set_sc) (uint16 skill_id, sc_type sc, unsigned int flag); typedef void (*HPMHOOK_pre_status_copy) (struct status_data **a, const struct status_data **b); typedef void (*HPMHOOK_post_status_copy) (struct status_data *a, const struct status_data *b); -typedef unsigned short (*HPMHOOK_pre_status_base_matk_min) (const struct status_data **st); -typedef unsigned short (*HPMHOOK_post_status_base_matk_min) (unsigned short retVal___, const struct status_data *st); -typedef unsigned short (*HPMHOOK_pre_status_base_matk_max) (const struct status_data **st); -typedef unsigned short (*HPMHOOK_post_status_base_matk_max) (unsigned short retVal___, const struct status_data *st); +typedef int (*HPMHOOK_pre_status_base_matk_min) (const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_matk_min) (int retVal___, const struct status_data *st); +typedef int (*HPMHOOK_pre_status_base_matk_max) (const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_matk_max) (int retVal___, const struct status_data *st); #endif // MAP_STATUS_H #ifdef MAP_STORAGE_H /* storage */ typedef void (*HPMHOOK_pre_storage_reconnect) (void); @@ -7873,6 +8105,26 @@ typedef int (*HPMHOOK_post_strlib_strline_) (int retVal___, const char *str, siz typedef bool (*HPMHOOK_pre_strlib_bin2hex_) (char **output, const unsigned char **input, size_t *count); typedef bool (*HPMHOOK_post_strlib_bin2hex_) (bool retVal___, char *output, const unsigned char *input, size_t count); #endif // COMMON_STRLIB_H +#ifdef MAP_STYLIST_H /* stylist */ +typedef void (*HPMHOOK_pre_stylist_init) (bool *minimal); +typedef void (*HPMHOOK_post_stylist_init) (bool minimal); +typedef void (*HPMHOOK_pre_stylist_final) (void); +typedef void (*HPMHOOK_post_stylist_final) (void); +typedef void (*HPMHOOK_pre_stylist_vector_init) (void); +typedef void (*HPMHOOK_post_stylist_vector_init) (void); +typedef void (*HPMHOOK_pre_stylist_vector_clear) (void); +typedef void (*HPMHOOK_post_stylist_vector_clear) (void); +typedef bool (*HPMHOOK_pre_stylist_read_db_libconfig) (void); +typedef bool (*HPMHOOK_post_stylist_read_db_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_stylist_read_db_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); +typedef void (*HPMHOOK_pre_stylist_request_style_change) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); +typedef void (*HPMHOOK_post_stylist_request_style_change) (struct map_session_data *sd, int type, int16 idx, bool isitem); +typedef bool (*HPMHOOK_pre_stylist_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx); +typedef bool (*HPMHOOK_post_stylist_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx); +typedef void (*HPMHOOK_pre_stylist_send_rodexitem) (struct map_session_data **sd, int *itemid); +typedef void (*HPMHOOK_post_stylist_send_rodexitem) (struct map_session_data *sd, int itemid); +#endif // MAP_STYLIST_H #ifdef COMMON_STRLIB_H /* sv */ typedef int (*HPMHOOK_pre_sv_parse_next) (struct s_svstate **svstate); typedef int (*HPMHOOK_post_sv_parse_next) (int retVal___, struct s_svstate *svstate); @@ -8038,8 +8290,8 @@ typedef uint8 (*HPMHOOK_pre_unit_getdir) (struct block_list **bl); typedef uint8 (*HPMHOOK_post_unit_getdir) (uint8 retVal___, struct block_list *bl); typedef int (*HPMHOOK_pre_unit_blown) (struct block_list **bl, int *dx, int *dy, int *count, int *flag); typedef int (*HPMHOOK_post_unit_blown) (int retVal___, struct block_list *bl, int dx, int dy, int count, int flag); -typedef int (*HPMHOOK_pre_unit_warp) (struct block_list **bl, short *m, short *x, short *y, clr_type *type); -typedef int (*HPMHOOK_post_unit_warp) (int retVal___, struct block_list *bl, short m, short x, short y, clr_type type); +typedef int (*HPMHOOK_pre_unit_warp) (struct block_list **bl, short *m, short *x, short *y, enum clr_type *type); +typedef int (*HPMHOOK_post_unit_warp) (int retVal___, struct block_list *bl, short m, short x, short y, enum clr_type type); typedef int (*HPMHOOK_pre_unit_stop_walking) (struct block_list **bl, int *type); typedef int (*HPMHOOK_post_unit_stop_walking) (int retVal___, struct block_list *bl, int type); typedef int (*HPMHOOK_pre_unit_skilluse_id) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv); @@ -8090,14 +8342,14 @@ typedef int (*HPMHOOK_pre_unit_fixdamage) (struct block_list **src, struct block typedef int (*HPMHOOK_post_unit_fixdamage) (int retVal___, struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2); typedef int (*HPMHOOK_pre_unit_changeviewsize) (struct block_list **bl, short *size); typedef int (*HPMHOOK_post_unit_changeviewsize) (int retVal___, struct block_list *bl, short size); -typedef int (*HPMHOOK_pre_unit_remove_map) (struct block_list **bl, clr_type *clrtype, const char **file, int *line, const char **func); -typedef int (*HPMHOOK_post_unit_remove_map) (int retVal___, struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func); -typedef void (*HPMHOOK_pre_unit_remove_map_pc) (struct map_session_data **sd, clr_type *clrtype); -typedef void (*HPMHOOK_post_unit_remove_map_pc) (struct map_session_data *sd, clr_type clrtype); +typedef int (*HPMHOOK_pre_unit_remove_map) (struct block_list **bl, enum clr_type *clrtype, const char **file, int *line, const char **func); +typedef int (*HPMHOOK_post_unit_remove_map) (int retVal___, struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func); +typedef void (*HPMHOOK_pre_unit_remove_map_pc) (struct map_session_data **sd, enum clr_type *clrtype); +typedef void (*HPMHOOK_post_unit_remove_map_pc) (struct map_session_data *sd, enum clr_type clrtype); typedef void (*HPMHOOK_pre_unit_free_pc) (struct map_session_data **sd); typedef void (*HPMHOOK_post_unit_free_pc) (struct map_session_data *sd); -typedef int (*HPMHOOK_pre_unit_free) (struct block_list **bl, clr_type *clrtype); -typedef int (*HPMHOOK_post_unit_free) (int retVal___, struct block_list *bl, clr_type clrtype); +typedef int (*HPMHOOK_pre_unit_free) (struct block_list **bl, enum clr_type *clrtype); +typedef int (*HPMHOOK_post_unit_free) (int retVal___, struct block_list *bl, enum clr_type clrtype); #endif // MAP_UNIT_H #ifdef MAP_VENDING_H /* vending */ typedef void (*HPMHOOK_pre_vending_init) (bool *minimal); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index 2b0291453..570e20968 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.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-2020 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 @@ -90,8 +90,10 @@ struct { struct HPMHookPoint *HP_chr_count_users_post; struct HPMHookPoint *HP_chr_mmo_char_tobuf_pre; struct HPMHookPoint *HP_chr_mmo_char_tobuf_post; - struct HPMHookPoint *HP_chr_mmo_char_send099d_pre; - struct HPMHookPoint *HP_chr_mmo_char_send099d_post; + struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre; + struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post; + struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; + struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_pre; struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_post; struct HPMHookPoint *HP_chr_mmo_char_send_slots_info_pre; @@ -608,10 +610,6 @@ struct { struct HPMHookPoint *HP_inter_init_sql_post; struct HPMHookPoint *HP_inter_mapif_init_pre; struct HPMHookPoint *HP_inter_mapif_init_post; - struct HPMHookPoint *HP_inter_check_ttl_wisdata_sub_pre; - struct HPMHookPoint *HP_inter_check_ttl_wisdata_sub_post; - struct HPMHookPoint *HP_inter_check_ttl_wisdata_pre; - struct HPMHookPoint *HP_inter_check_ttl_wisdata_post; struct HPMHookPoint *HP_inter_check_length_pre; struct HPMHookPoint *HP_inter_check_length_post; struct HPMHookPoint *HP_inter_parse_frommap_pre; @@ -628,12 +626,6 @@ struct { struct HPMHookPoint *HP_inter_accinfo_post; struct HPMHookPoint *HP_inter_accinfo2_pre; struct HPMHookPoint *HP_inter_accinfo2_post; - struct HPMHookPoint *HP_inter_add_wisdata_pre; - struct HPMHookPoint *HP_inter_add_wisdata_post; - struct HPMHookPoint *HP_inter_get_wisdata_pre; - struct HPMHookPoint *HP_inter_get_wisdata_post; - struct HPMHookPoint *HP_inter_remove_wisdata_pre; - struct HPMHookPoint *HP_inter_remove_wisdata_post; struct HPMHookPoint *HP_inter_mail_sql_init_pre; struct HPMHookPoint *HP_inter_mail_sql_init_post; struct HPMHookPoint *HP_inter_mail_sql_final_pre; @@ -762,6 +754,10 @@ struct { struct HPMHookPoint *HP_inter_rodex_savemessage_post; struct HPMHookPoint *HP_inter_rodex_updatemail_pre; struct HPMHookPoint *HP_inter_rodex_updatemail_post; + struct HPMHookPoint *HP_inter_rodex_getzeny_pre; + struct HPMHookPoint *HP_inter_rodex_getzeny_post; + struct HPMHookPoint *HP_inter_rodex_getitems_pre; + struct HPMHookPoint *HP_inter_rodex_getitems_post; struct HPMHookPoint *HP_inter_storage_tosql_pre; struct HPMHookPoint *HP_inter_storage_tosql_post; struct HPMHookPoint *HP_inter_storage_fromsql_pre; @@ -782,6 +778,10 @@ struct { struct HPMHookPoint *HP_inter_storage_parse_frommap_post; struct HPMHookPoint *HP_inter_storage_retrieve_bound_items_pre; struct HPMHookPoint *HP_inter_storage_retrieve_bound_items_post; + struct HPMHookPoint *HP_libconfig_set_db_path_pre; + struct HPMHookPoint *HP_libconfig_set_db_path_post; + struct HPMHookPoint *HP_libconfig_format_db_path_pre; + struct HPMHookPoint *HP_libconfig_format_db_path_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -1026,8 +1026,6 @@ struct { struct HPMHookPoint *HP_mapif_guild_memberinfoshort_post; struct HPMHookPoint *HP_mapif_guild_broken_pre; struct HPMHookPoint *HP_mapif_guild_broken_post; - struct HPMHookPoint *HP_mapif_guild_message_pre; - struct HPMHookPoint *HP_mapif_guild_message_post; struct HPMHookPoint *HP_mapif_guild_basicinfochanged_pre; struct HPMHookPoint *HP_mapif_guild_basicinfochanged_post; struct HPMHookPoint *HP_mapif_guild_memberinfochanged_pre; @@ -1058,8 +1056,6 @@ struct { struct HPMHookPoint *HP_mapif_parse_GuildChangeMemberInfoShort_post; struct HPMHookPoint *HP_mapif_parse_BreakGuild_pre; struct HPMHookPoint *HP_mapif_parse_BreakGuild_post; - struct HPMHookPoint *HP_mapif_parse_GuildMessage_pre; - struct HPMHookPoint *HP_mapif_parse_GuildMessage_post; struct HPMHookPoint *HP_mapif_parse_GuildBasicInfoChange_pre; struct HPMHookPoint *HP_mapif_parse_GuildBasicInfoChange_post; struct HPMHookPoint *HP_mapif_parse_GuildMemberInfoChange_pre; @@ -1154,8 +1150,6 @@ struct { struct HPMHookPoint *HP_mapif_party_membermoved_post; struct HPMHookPoint *HP_mapif_party_broken_pre; struct HPMHookPoint *HP_mapif_party_broken_post; - struct HPMHookPoint *HP_mapif_party_message_pre; - struct HPMHookPoint *HP_mapif_party_message_post; struct HPMHookPoint *HP_mapif_parse_CreateParty_pre; struct HPMHookPoint *HP_mapif_parse_CreateParty_post; struct HPMHookPoint *HP_mapif_parse_PartyInfo_pre; @@ -1170,8 +1164,6 @@ struct { struct HPMHookPoint *HP_mapif_parse_PartyChangeMap_post; struct HPMHookPoint *HP_mapif_parse_BreakParty_pre; struct HPMHookPoint *HP_mapif_parse_BreakParty_post; - struct HPMHookPoint *HP_mapif_parse_PartyMessage_pre; - struct HPMHookPoint *HP_mapif_parse_PartyMessage_post; struct HPMHookPoint *HP_mapif_parse_PartyLeaderChange_pre; struct HPMHookPoint *HP_mapif_parse_PartyLeaderChange_post; struct HPMHookPoint *HP_mapif_pet_created_pre; @@ -1222,6 +1214,10 @@ struct { struct HPMHookPoint *HP_mapif_parse_rodex_checkname_post; struct HPMHookPoint *HP_mapif_rodex_checkname_pre; struct HPMHookPoint *HP_mapif_rodex_checkname_post; + struct HPMHookPoint *HP_mapif_rodex_getzenyack_pre; + struct HPMHookPoint *HP_mapif_rodex_getzenyack_post; + struct HPMHookPoint *HP_mapif_rodex_getitemsack_pre; + struct HPMHookPoint *HP_mapif_rodex_getitemsack_post; struct HPMHookPoint *HP_mapif_load_guild_storage_pre; struct HPMHookPoint *HP_mapif_load_guild_storage_post; struct HPMHookPoint *HP_mapif_save_guild_storage_ack_pre; @@ -1244,26 +1240,10 @@ struct { struct HPMHookPoint *HP_mapif_parse_ItemBoundRetrieve_post; struct HPMHookPoint *HP_mapif_parse_accinfo_pre; struct HPMHookPoint *HP_mapif_parse_accinfo_post; - struct HPMHookPoint *HP_mapif_broadcast_pre; - struct HPMHookPoint *HP_mapif_broadcast_post; - struct HPMHookPoint *HP_mapif_wis_message_pre; - struct HPMHookPoint *HP_mapif_wis_message_post; - struct HPMHookPoint *HP_mapif_wis_response_pre; - struct HPMHookPoint *HP_mapif_wis_response_post; - struct HPMHookPoint *HP_mapif_wis_end_pre; - struct HPMHookPoint *HP_mapif_wis_end_post; struct HPMHookPoint *HP_mapif_account_reg_reply_pre; struct HPMHookPoint *HP_mapif_account_reg_reply_post; struct HPMHookPoint *HP_mapif_disconnectplayer_pre; struct HPMHookPoint *HP_mapif_disconnectplayer_post; - struct HPMHookPoint *HP_mapif_parse_broadcast_pre; - struct HPMHookPoint *HP_mapif_parse_broadcast_post; - struct HPMHookPoint *HP_mapif_parse_WisRequest_pre; - struct HPMHookPoint *HP_mapif_parse_WisRequest_post; - struct HPMHookPoint *HP_mapif_parse_WisReply_pre; - struct HPMHookPoint *HP_mapif_parse_WisReply_post; - struct HPMHookPoint *HP_mapif_parse_WisToGM_pre; - struct HPMHookPoint *HP_mapif_parse_WisToGM_post; struct HPMHookPoint *HP_mapif_parse_Registry_pre; struct HPMHookPoint *HP_mapif_parse_Registry_post; struct HPMHookPoint *HP_mapif_parse_RegistryRequest_pre; @@ -1276,6 +1256,10 @@ struct { struct HPMHookPoint *HP_mapif_parse_ClanMemberKick_post; struct HPMHookPoint *HP_mapif_parse_ClanMemberCount_pre; struct HPMHookPoint *HP_mapif_parse_ClanMemberCount_post; + struct HPMHookPoint *HP_mapindex_config_read_dbpath_pre; + struct HPMHookPoint *HP_mapindex_config_read_dbpath_post; + struct HPMHookPoint *HP_mapindex_config_read_pre; + struct HPMHookPoint *HP_mapindex_config_read_post; struct HPMHookPoint *HP_mapindex_init_pre; struct HPMHookPoint *HP_mapindex_init_post; struct HPMHookPoint *HP_mapindex_final_pre; @@ -1322,6 +1306,14 @@ struct { struct HPMHookPoint *HP_mutex_cond_broadcast_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; struct HPMHookPoint *HP_nullpo_assert_report_post; + struct HPMHookPoint *HP_packets_init_pre; + struct HPMHookPoint *HP_packets_init_post; + struct HPMHookPoint *HP_packets_final_pre; + struct HPMHookPoint *HP_packets_final_post; + struct HPMHookPoint *HP_packets_addLens_pre; + struct HPMHookPoint *HP_packets_addLens_post; + struct HPMHookPoint *HP_packets_addLen_pre; + struct HPMHookPoint *HP_packets_addLen_post; struct HPMHookPoint *HP_pincode_handle_pre; struct HPMHookPoint *HP_pincode_handle_post; struct HPMHookPoint *HP_pincode_decrypt_pre; @@ -1396,10 +1388,14 @@ struct { struct HPMHookPoint *HP_sockt_realloc_writefifo_post; struct HPMHookPoint *HP_sockt_wfifoset_pre; struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_wfifohead_pre; + struct HPMHookPoint *HP_sockt_wfifohead_post; struct HPMHookPoint *HP_sockt_rfifoskip_pre; struct HPMHookPoint *HP_sockt_rfifoskip_post; struct HPMHookPoint *HP_sockt_close_pre; struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_validateWfifo_pre; + struct HPMHookPoint *HP_sockt_validateWfifo_post; struct HPMHookPoint *HP_sockt_session_is_valid_pre; struct HPMHookPoint *HP_sockt_session_is_valid_post; struct HPMHookPoint *HP_sockt_session_is_active_pre; @@ -1408,6 +1404,8 @@ struct { struct HPMHookPoint *HP_sockt_flush_post; struct HPMHookPoint *HP_sockt_flush_fifos_pre; struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_connect_client_pre; + struct HPMHookPoint *HP_sockt_connect_client_post; struct HPMHookPoint *HP_sockt_set_nonblocking_pre; struct HPMHookPoint *HP_sockt_set_nonblocking_post; struct HPMHookPoint *HP_sockt_set_defaultparse_pre; @@ -1713,8 +1711,10 @@ struct { int HP_chr_count_users_post; int HP_chr_mmo_char_tobuf_pre; int HP_chr_mmo_char_tobuf_post; - int HP_chr_mmo_char_send099d_pre; - int HP_chr_mmo_char_send099d_post; + int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre; + int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post; + int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; + int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; int HP_chr_mmo_char_send_ban_list_pre; int HP_chr_mmo_char_send_ban_list_post; int HP_chr_mmo_char_send_slots_info_pre; @@ -2231,10 +2231,6 @@ struct { int HP_inter_init_sql_post; int HP_inter_mapif_init_pre; int HP_inter_mapif_init_post; - int HP_inter_check_ttl_wisdata_sub_pre; - int HP_inter_check_ttl_wisdata_sub_post; - int HP_inter_check_ttl_wisdata_pre; - int HP_inter_check_ttl_wisdata_post; int HP_inter_check_length_pre; int HP_inter_check_length_post; int HP_inter_parse_frommap_pre; @@ -2251,12 +2247,6 @@ struct { int HP_inter_accinfo_post; int HP_inter_accinfo2_pre; int HP_inter_accinfo2_post; - int HP_inter_add_wisdata_pre; - int HP_inter_add_wisdata_post; - int HP_inter_get_wisdata_pre; - int HP_inter_get_wisdata_post; - int HP_inter_remove_wisdata_pre; - int HP_inter_remove_wisdata_post; int HP_inter_mail_sql_init_pre; int HP_inter_mail_sql_init_post; int HP_inter_mail_sql_final_pre; @@ -2385,6 +2375,10 @@ struct { int HP_inter_rodex_savemessage_post; int HP_inter_rodex_updatemail_pre; int HP_inter_rodex_updatemail_post; + int HP_inter_rodex_getzeny_pre; + int HP_inter_rodex_getzeny_post; + int HP_inter_rodex_getitems_pre; + int HP_inter_rodex_getitems_post; int HP_inter_storage_tosql_pre; int HP_inter_storage_tosql_post; int HP_inter_storage_fromsql_pre; @@ -2405,6 +2399,10 @@ struct { int HP_inter_storage_parse_frommap_post; int HP_inter_storage_retrieve_bound_items_pre; int HP_inter_storage_retrieve_bound_items_post; + int HP_libconfig_set_db_path_pre; + int HP_libconfig_set_db_path_post; + int HP_libconfig_format_db_path_pre; + int HP_libconfig_format_db_path_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -2649,8 +2647,6 @@ struct { int HP_mapif_guild_memberinfoshort_post; int HP_mapif_guild_broken_pre; int HP_mapif_guild_broken_post; - int HP_mapif_guild_message_pre; - int HP_mapif_guild_message_post; int HP_mapif_guild_basicinfochanged_pre; int HP_mapif_guild_basicinfochanged_post; int HP_mapif_guild_memberinfochanged_pre; @@ -2681,8 +2677,6 @@ struct { int HP_mapif_parse_GuildChangeMemberInfoShort_post; int HP_mapif_parse_BreakGuild_pre; int HP_mapif_parse_BreakGuild_post; - int HP_mapif_parse_GuildMessage_pre; - int HP_mapif_parse_GuildMessage_post; int HP_mapif_parse_GuildBasicInfoChange_pre; int HP_mapif_parse_GuildBasicInfoChange_post; int HP_mapif_parse_GuildMemberInfoChange_pre; @@ -2777,8 +2771,6 @@ struct { int HP_mapif_party_membermoved_post; int HP_mapif_party_broken_pre; int HP_mapif_party_broken_post; - int HP_mapif_party_message_pre; - int HP_mapif_party_message_post; int HP_mapif_parse_CreateParty_pre; int HP_mapif_parse_CreateParty_post; int HP_mapif_parse_PartyInfo_pre; @@ -2793,8 +2785,6 @@ struct { int HP_mapif_parse_PartyChangeMap_post; int HP_mapif_parse_BreakParty_pre; int HP_mapif_parse_BreakParty_post; - int HP_mapif_parse_PartyMessage_pre; - int HP_mapif_parse_PartyMessage_post; int HP_mapif_parse_PartyLeaderChange_pre; int HP_mapif_parse_PartyLeaderChange_post; int HP_mapif_pet_created_pre; @@ -2845,6 +2835,10 @@ struct { int HP_mapif_parse_rodex_checkname_post; int HP_mapif_rodex_checkname_pre; int HP_mapif_rodex_checkname_post; + int HP_mapif_rodex_getzenyack_pre; + int HP_mapif_rodex_getzenyack_post; + int HP_mapif_rodex_getitemsack_pre; + int HP_mapif_rodex_getitemsack_post; int HP_mapif_load_guild_storage_pre; int HP_mapif_load_guild_storage_post; int HP_mapif_save_guild_storage_ack_pre; @@ -2867,26 +2861,10 @@ struct { int HP_mapif_parse_ItemBoundRetrieve_post; int HP_mapif_parse_accinfo_pre; int HP_mapif_parse_accinfo_post; - int HP_mapif_broadcast_pre; - int HP_mapif_broadcast_post; - int HP_mapif_wis_message_pre; - int HP_mapif_wis_message_post; - int HP_mapif_wis_response_pre; - int HP_mapif_wis_response_post; - int HP_mapif_wis_end_pre; - int HP_mapif_wis_end_post; int HP_mapif_account_reg_reply_pre; int HP_mapif_account_reg_reply_post; int HP_mapif_disconnectplayer_pre; int HP_mapif_disconnectplayer_post; - int HP_mapif_parse_broadcast_pre; - int HP_mapif_parse_broadcast_post; - int HP_mapif_parse_WisRequest_pre; - int HP_mapif_parse_WisRequest_post; - int HP_mapif_parse_WisReply_pre; - int HP_mapif_parse_WisReply_post; - int HP_mapif_parse_WisToGM_pre; - int HP_mapif_parse_WisToGM_post; int HP_mapif_parse_Registry_pre; int HP_mapif_parse_Registry_post; int HP_mapif_parse_RegistryRequest_pre; @@ -2899,6 +2877,10 @@ struct { int HP_mapif_parse_ClanMemberKick_post; int HP_mapif_parse_ClanMemberCount_pre; int HP_mapif_parse_ClanMemberCount_post; + int HP_mapindex_config_read_dbpath_pre; + int HP_mapindex_config_read_dbpath_post; + int HP_mapindex_config_read_pre; + int HP_mapindex_config_read_post; int HP_mapindex_init_pre; int HP_mapindex_init_post; int HP_mapindex_final_pre; @@ -2945,6 +2927,14 @@ struct { int HP_mutex_cond_broadcast_post; int HP_nullpo_assert_report_pre; int HP_nullpo_assert_report_post; + int HP_packets_init_pre; + int HP_packets_init_post; + int HP_packets_final_pre; + int HP_packets_final_post; + int HP_packets_addLens_pre; + int HP_packets_addLens_post; + int HP_packets_addLen_pre; + int HP_packets_addLen_post; int HP_pincode_handle_pre; int HP_pincode_handle_post; int HP_pincode_decrypt_pre; @@ -3019,10 +3009,14 @@ struct { int HP_sockt_realloc_writefifo_post; int HP_sockt_wfifoset_pre; int HP_sockt_wfifoset_post; + int HP_sockt_wfifohead_pre; + int HP_sockt_wfifohead_post; int HP_sockt_rfifoskip_pre; int HP_sockt_rfifoskip_post; int HP_sockt_close_pre; int HP_sockt_close_post; + int HP_sockt_validateWfifo_pre; + int HP_sockt_validateWfifo_post; int HP_sockt_session_is_valid_pre; int HP_sockt_session_is_valid_post; int HP_sockt_session_is_active_pre; @@ -3031,6 +3025,8 @@ struct { int HP_sockt_flush_post; int HP_sockt_flush_fifos_pre; int HP_sockt_flush_fifos_post; + int HP_sockt_connect_client_pre; + int HP_sockt_connect_client_post; int HP_sockt_set_nonblocking_pre; int HP_sockt_set_nonblocking_post; int HP_sockt_set_defaultparse_pre; @@ -3301,6 +3297,7 @@ struct { struct md5_interface md5; struct mutex_interface mutex; struct nullpo_interface nullpo; + struct packets_interface packets; struct pincode_interface pincode; struct rnd_interface rnd; struct showmsg_interface showmsg; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index cb6ae1bb8..48f24fcab 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.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-2020 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 @@ -60,7 +60,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->divorce_char_sql, HP_chr_divorce_char_sql) }, { HP_POP(chr->count_users, HP_chr_count_users) }, { HP_POP(chr->mmo_char_tobuf, HP_chr_mmo_char_tobuf) }, - { HP_POP(chr->mmo_char_send099d, HP_chr_mmo_char_send099d) }, + { HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE) }, + { HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE_tail, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) }, { HP_POP(chr->mmo_char_send_ban_list, HP_chr_mmo_char_send_ban_list) }, { HP_POP(chr->mmo_char_send_slots_info, HP_chr_mmo_char_send_slots_info) }, { HP_POP(chr->mmo_char_send_characters, HP_chr_mmo_char_send_characters) }, @@ -332,8 +333,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter->vlog, HP_inter_vlog) }, { HP_POP(inter->init_sql, HP_inter_init_sql) }, { HP_POP(inter->mapif_init, HP_inter_mapif_init) }, - { HP_POP(inter->check_ttl_wisdata_sub, HP_inter_check_ttl_wisdata_sub) }, - { HP_POP(inter->check_ttl_wisdata, HP_inter_check_ttl_wisdata) }, { HP_POP(inter->check_length, HP_inter_check_length) }, { HP_POP(inter->parse_frommap, HP_inter_parse_frommap) }, { HP_POP(inter->final, HP_inter_final) }, @@ -342,9 +341,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter->config_read_connection, HP_inter_config_read_connection) }, { HP_POP(inter->accinfo, HP_inter_accinfo) }, { HP_POP(inter->accinfo2, HP_inter_accinfo2) }, - { HP_POP(inter->add_wisdata, HP_inter_add_wisdata) }, - { HP_POP(inter->get_wisdata, HP_inter_get_wisdata) }, - { HP_POP(inter->remove_wisdata, HP_inter_remove_wisdata) }, /* inter_mail_interface */ { HP_POP(inter_mail->sql_init, HP_inter_mail_sql_init) }, { HP_POP(inter_mail->sql_final, HP_inter_mail_sql_final) }, @@ -415,6 +411,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_rodex->checkname, HP_inter_rodex_checkname) }, { HP_POP(inter_rodex->savemessage, HP_inter_rodex_savemessage) }, { HP_POP(inter_rodex->updatemail, HP_inter_rodex_updatemail) }, + { HP_POP(inter_rodex->getzeny, HP_inter_rodex_getzeny) }, + { HP_POP(inter_rodex->getitems, HP_inter_rodex_getitems) }, /* inter_storage_interface */ { HP_POP(inter_storage->tosql, HP_inter_storage_tosql) }, { HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) }, @@ -427,6 +425,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_storage->parse_frommap, HP_inter_storage_parse_frommap) }, { HP_POP(inter_storage->retrieve_bound_items, HP_inter_storage_retrieve_bound_items) }, /* libconfig_interface */ + { HP_POP(libconfig->set_db_path, HP_libconfig_set_db_path) }, + { HP_POP(libconfig->format_db_path, HP_libconfig_format_db_path) }, { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -551,7 +551,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->guild_withdraw, HP_mapif_guild_withdraw) }, { HP_POP(mapif->guild_memberinfoshort, HP_mapif_guild_memberinfoshort) }, { HP_POP(mapif->guild_broken, HP_mapif_guild_broken) }, - { HP_POP(mapif->guild_message, HP_mapif_guild_message) }, { HP_POP(mapif->guild_basicinfochanged, HP_mapif_guild_basicinfochanged) }, { HP_POP(mapif->guild_memberinfochanged, HP_mapif_guild_memberinfochanged) }, { HP_POP(mapif->guild_skillupack, HP_mapif_guild_skillupack) }, @@ -567,7 +566,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_GuildLeave, HP_mapif_parse_GuildLeave) }, { HP_POP(mapif->parse_GuildChangeMemberInfoShort, HP_mapif_parse_GuildChangeMemberInfoShort) }, { HP_POP(mapif->parse_BreakGuild, HP_mapif_parse_BreakGuild) }, - { HP_POP(mapif->parse_GuildMessage, HP_mapif_parse_GuildMessage) }, { HP_POP(mapif->parse_GuildBasicInfoChange, HP_mapif_parse_GuildBasicInfoChange) }, { HP_POP(mapif->parse_GuildMemberInfoChange, HP_mapif_parse_GuildMemberInfoChange) }, { HP_POP(mapif->parse_GuildPosition, HP_mapif_parse_GuildPosition) }, @@ -615,7 +613,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->party_withdraw, HP_mapif_party_withdraw) }, { HP_POP(mapif->party_membermoved, HP_mapif_party_membermoved) }, { HP_POP(mapif->party_broken, HP_mapif_party_broken) }, - { HP_POP(mapif->party_message, HP_mapif_party_message) }, { HP_POP(mapif->parse_CreateParty, HP_mapif_parse_CreateParty) }, { HP_POP(mapif->parse_PartyInfo, HP_mapif_parse_PartyInfo) }, { HP_POP(mapif->parse_PartyAddMember, HP_mapif_parse_PartyAddMember) }, @@ -623,7 +620,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_PartyLeave, HP_mapif_parse_PartyLeave) }, { HP_POP(mapif->parse_PartyChangeMap, HP_mapif_parse_PartyChangeMap) }, { HP_POP(mapif->parse_BreakParty, HP_mapif_parse_BreakParty) }, - { HP_POP(mapif->parse_PartyMessage, HP_mapif_parse_PartyMessage) }, { HP_POP(mapif->parse_PartyLeaderChange, HP_mapif_parse_PartyLeaderChange) }, { HP_POP(mapif->pet_created, HP_mapif_pet_created) }, { HP_POP(mapif->pet_info, HP_mapif_pet_info) }, @@ -649,6 +645,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->rodex_send, HP_mapif_rodex_send) }, { HP_POP(mapif->parse_rodex_checkname, HP_mapif_parse_rodex_checkname) }, { HP_POP(mapif->rodex_checkname, HP_mapif_rodex_checkname) }, + { HP_POP(mapif->rodex_getzenyack, HP_mapif_rodex_getzenyack) }, + { HP_POP(mapif->rodex_getitemsack, HP_mapif_rodex_getitemsack) }, { HP_POP(mapif->load_guild_storage, HP_mapif_load_guild_storage) }, { HP_POP(mapif->save_guild_storage_ack, HP_mapif_save_guild_storage_ack) }, { HP_POP(mapif->parse_LoadGuildStorage, HP_mapif_parse_LoadGuildStorage) }, @@ -660,16 +658,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->itembound_ack, HP_mapif_itembound_ack) }, { HP_POP(mapif->parse_ItemBoundRetrieve, HP_mapif_parse_ItemBoundRetrieve) }, { HP_POP(mapif->parse_accinfo, HP_mapif_parse_accinfo) }, - { HP_POP(mapif->broadcast, HP_mapif_broadcast) }, - { HP_POP(mapif->wis_message, HP_mapif_wis_message) }, - { HP_POP(mapif->wis_response, HP_mapif_wis_response) }, - { HP_POP(mapif->wis_end, HP_mapif_wis_end) }, { HP_POP(mapif->account_reg_reply, HP_mapif_account_reg_reply) }, { HP_POP(mapif->disconnectplayer, HP_mapif_disconnectplayer) }, - { HP_POP(mapif->parse_broadcast, HP_mapif_parse_broadcast) }, - { HP_POP(mapif->parse_WisRequest, HP_mapif_parse_WisRequest) }, - { HP_POP(mapif->parse_WisReply, HP_mapif_parse_WisReply) }, - { HP_POP(mapif->parse_WisToGM, HP_mapif_parse_WisToGM) }, { HP_POP(mapif->parse_Registry, HP_mapif_parse_Registry) }, { HP_POP(mapif->parse_RegistryRequest, HP_mapif_parse_RegistryRequest) }, { HP_POP(mapif->namechange_ack, HP_mapif_namechange_ack) }, @@ -677,6 +667,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_ClanMemberKick, HP_mapif_parse_ClanMemberKick) }, { HP_POP(mapif->parse_ClanMemberCount, HP_mapif_parse_ClanMemberCount) }, /* mapindex_interface */ + { HP_POP(mapindex->config_read_dbpath, HP_mapindex_config_read_dbpath) }, + { HP_POP(mapindex->config_read, HP_mapindex_config_read) }, { HP_POP(mapindex->init, HP_mapindex_init) }, { HP_POP(mapindex->final, HP_mapindex_final) }, { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, @@ -703,6 +695,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mutex->cond_broadcast, HP_mutex_cond_broadcast) }, /* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, +/* packets_interface */ + { HP_POP(packets->init, HP_packets_init) }, + { HP_POP(packets->final, HP_packets_final) }, + { HP_POP(packets->addLens, HP_packets_addLens) }, + { HP_POP(packets->addLen, HP_packets_addLen) }, /* pincode_interface */ { HP_POP(pincode->handle, HP_pincode_handle) }, { HP_POP(pincode->decrypt, HP_pincode_decrypt) }, @@ -744,12 +741,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) }, { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) }, { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, { HP_POP(sockt->flush, HP_sockt_flush) }, { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->connect_client, HP_sockt_connect_client) }, { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index 767c7d24e..49fe48aac 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.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-2020 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 @@ -609,15 +609,15 @@ int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_chars } return retVal___; } -int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { +int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf, int *count) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_chr_mmo_chars_fromsql_pre > 0) { - int (*preHookFunc) (struct char_session_data **sd, uint8 **buf); + int (*preHookFunc) (struct char_session_data **sd, uint8 **buf, int **count); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_chars_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &buf); + retVal___ = preHookFunc(&sd, &buf, &count); } if (*HPMforce_return) { *HPMforce_return = false; @@ -625,13 +625,13 @@ int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { } } { - retVal___ = HPMHooks.source.chr.mmo_chars_fromsql(sd, buf); + retVal___ = HPMHooks.source.chr.mmo_chars_fromsql(sd, buf, count); } if (HPMHooks.count.HP_chr_mmo_chars_fromsql_post > 0) { - int (*postHookFunc) (int retVal___, struct char_session_data *sd, uint8 *buf); + int (*postHookFunc) (int retVal___, struct char_session_data *sd, uint8 *buf, int *count); for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_chars_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, buf); + retVal___ = postHookFunc(retVal___, sd, buf, count); } } return retVal___; @@ -798,11 +798,11 @@ int HP_chr_check_char_name(const char *name, const char *esc_name) { } return retVal___; } -int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex) { +int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_chr_make_new_char_sql_pre > 0) { - int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex); + int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_pre[hIndex].func; @@ -817,7 +817,7 @@ int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, in retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); } if (HPMHooks.count.HP_chr_make_new_char_sql_post > 0) { - int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex); + int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex); for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); @@ -906,13 +906,13 @@ int HP_chr_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p) { } return retVal___; } -void HP_chr_mmo_char_send099d(int fd, struct char_session_data *sd) { +void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE(int fd, struct char_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_chr_mmo_char_send099d_pre > 0) { + if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_chr_mmo_char_send099d_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre[hIndex].func; preHookFunc(&fd, &sd); } if (*HPMforce_return) { @@ -921,12 +921,38 @@ void HP_chr_mmo_char_send099d(int fd, struct char_session_data *sd) { } } { - HPMHooks.source.chr.mmo_char_send099d(fd, sd); + HPMHooks.source.chr.send_HC_ACK_CHARINFO_PER_PAGE(fd, sd); } - if (HPMHooks.count.HP_chr_mmo_char_send099d_post > 0) { + if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_chr_mmo_char_send099d_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail(int fd, struct char_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chr.send_HC_ACK_CHARINFO_PER_PAGE_tail(fd, sd); + } + if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post[hIndex].func; postHookFunc(fd, sd); } } @@ -7005,11 +7031,11 @@ bool HP_inter_guild_leave(int guild_id, int account_id, int char_id, int flag, c } return retVal___; } -bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { +bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int class) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_inter_guild_update_member_info_short_pre > 0) { - bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); + bool (*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_inter_guild_update_member_info_short_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_pre[hIndex].func; @@ -7024,7 +7050,7 @@ bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int c retVal___ = HPMHooks.source.inter_guild.update_member_info_short(guild_id, account_id, char_id, online, lv, class); } if (HPMHooks.count.HP_inter_guild_update_member_info_short_post > 0) { - bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); + bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); @@ -7825,66 +7851,6 @@ int HP_inter_mapif_init(int fd) { } return retVal___; } -int HP_inter_check_ttl_wisdata_sub(union DBKey key, struct DBData *data, va_list ap) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre > 0) { - int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre; hIndex++) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_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.inter.check_ttl_wisdata_sub(key, data, ap___copy); - va_end(ap___copy); - } - if (HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post > 0) { - int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post; hIndex++) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, key, data, ap___copy); - va_end(ap___copy); - } - } - return retVal___; -} -int HP_inter_check_ttl_wisdata(void) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_inter_check_ttl_wisdata_pre > 0) { - int (*preHookFunc) (void); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_pre[hIndex].func; - retVal___ = preHookFunc(); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.inter.check_ttl_wisdata(); - } - if (HPMHooks.count.HP_inter_check_ttl_wisdata_post > 0) { - int (*postHookFunc) (int retVal___); - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___); - } - } - return retVal___; -} int HP_inter_check_length(int fd, int length) { int hIndex = 0; int retVal___ = 0; @@ -8098,86 +8064,6 @@ void HP_inter_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int accoun } return; } -struct WisData* HP_inter_add_wisdata(int fd, const unsigned char *src, const unsigned char *dst, const unsigned char *msg, int msg_len) { - int hIndex = 0; - struct WisData* retVal___ = NULL; - if (HPMHooks.count.HP_inter_add_wisdata_pre > 0) { - struct WisData* (*preHookFunc) (int *fd, const unsigned char **src, const unsigned char **dst, const unsigned char **msg, int *msg_len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_add_wisdata_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_inter_add_wisdata_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &src, &dst, &msg, &msg_len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.inter.add_wisdata(fd, src, dst, msg, msg_len); - } - if (HPMHooks.count.HP_inter_add_wisdata_post > 0) { - struct WisData* (*postHookFunc) (struct WisData* retVal___, int fd, const unsigned char *src, const unsigned char *dst, const unsigned char *msg, int msg_len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_add_wisdata_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_inter_add_wisdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd, src, dst, msg, msg_len); - } - } - return retVal___; -} -struct WisData* HP_inter_get_wisdata(int id) { - int hIndex = 0; - struct WisData* retVal___ = NULL; - if (HPMHooks.count.HP_inter_get_wisdata_pre > 0) { - struct WisData* (*preHookFunc) (int *id); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_get_wisdata_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_inter_get_wisdata_pre[hIndex].func; - retVal___ = preHookFunc(&id); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.inter.get_wisdata(id); - } - if (HPMHooks.count.HP_inter_get_wisdata_post > 0) { - struct WisData* (*postHookFunc) (struct WisData* retVal___, int id); - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_get_wisdata_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_inter_get_wisdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___, id); - } - } - return retVal___; -} -void HP_inter_remove_wisdata(int id) { - int hIndex = 0; - if (HPMHooks.count.HP_inter_remove_wisdata_pre > 0) { - void (*preHookFunc) (int *id); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_remove_wisdata_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_inter_remove_wisdata_pre[hIndex].func; - preHookFunc(&id); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.inter.remove_wisdata(id); - } - if (HPMHooks.count.HP_inter_remove_wisdata_post > 0) { - void (*postHookFunc) (int id); - for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_remove_wisdata_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_inter_remove_wisdata_post[hIndex].func; - postHookFunc(id); - } - } - return; -} /* inter_mail_interface */ int HP_inter_mail_sql_init(void) { int hIndex = 0; @@ -9472,11 +9358,11 @@ int HP_inter_pet_parse_frommap(int fd) { } return retVal___; } -struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { +struct s_pet* HP_inter_pet_create(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { int hIndex = 0; struct s_pet* retVal___ = NULL; if (HPMHooks.count.HP_inter_pet_create_pre > 0) { - struct s_pet* (*preHookFunc) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); + struct s_pet* (*preHookFunc) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_create_pre[hIndex].func; @@ -9491,7 +9377,7 @@ struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, retVal___ = HPMHooks.source.inter_pet.create(account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } if (HPMHooks.count.HP_inter_pet_create_post > 0) { - struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); + struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); @@ -9824,11 +9710,11 @@ bool HP_inter_rodex_hasnew(int char_id, int account_id) { } return retVal___; } -bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level) { +bool HP_inter_rodex_checkname(const char *name, int *target_char_id, int *target_class, int *target_level) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_inter_rodex_checkname_pre > 0) { - bool (*preHookFunc) (const char **name, int **target_char_id, short **target_class, int **target_level); + bool (*preHookFunc) (const char **name, int **target_char_id, int **target_class, int **target_level); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_rodex_checkname_pre[hIndex].func; @@ -9843,7 +9729,7 @@ bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *targ retVal___ = HPMHooks.source.inter_rodex.checkname(name, target_char_id, target_class, target_level); } if (HPMHooks.count.HP_inter_rodex_checkname_post > 0) { - bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level); + bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_rodex_checkname_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, target_char_id, target_class, target_level); @@ -9878,15 +9764,15 @@ int64 HP_inter_rodex_savemessage(struct rodex_message *msg) { } return retVal___; } -bool HP_inter_rodex_updatemail(int64 mail_id, int8 flag) { +bool HP_inter_rodex_updatemail(int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_inter_rodex_updatemail_pre > 0) { - bool (*preHookFunc) (int64 *mail_id, int8 *flag); + bool (*preHookFunc) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_pre[hIndex].func; - retVal___ = preHookFunc(&mail_id, &flag); + retVal___ = preHookFunc(&fd, &account_id, &char_id, &mail_id, &opentype, &flag); } if (*HPMforce_return) { *HPMforce_return = false; @@ -9894,13 +9780,67 @@ bool HP_inter_rodex_updatemail(int64 mail_id, int8 flag) { } } { - retVal___ = HPMHooks.source.inter_rodex.updatemail(mail_id, flag); + retVal___ = HPMHooks.source.inter_rodex.updatemail(fd, account_id, char_id, mail_id, opentype, flag); } if (HPMHooks.count.HP_inter_rodex_updatemail_post > 0) { - bool (*postHookFunc) (bool retVal___, int64 mail_id, int8 flag); + bool (*postHookFunc) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mail_id, flag); + retVal___ = postHookFunc(retVal___, fd, account_id, char_id, mail_id, opentype, flag); + } + } + return retVal___; +} +int64 HP_inter_rodex_getzeny(int64 mail_id) { + int hIndex = 0; + int64 retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_getzeny_pre > 0) { + int64 (*preHookFunc) (int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.getzeny(mail_id); + } + if (HPMHooks.count.HP_inter_rodex_getzeny_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mail_id); + } + } + return retVal___; +} +int HP_inter_rodex_getitems(int64 mail_id, struct rodex_item *items) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_getitems_pre > 0) { + int (*preHookFunc) (int64 *mail_id, struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_getitems_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.getitems(mail_id, items); + } + if (HPMHooks.count.HP_inter_rodex_getitems_post > 0) { + int (*postHookFunc) (int retVal___, int64 mail_id, struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_getitems_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mail_id, items); } } return retVal___; @@ -10176,6 +10116,58 @@ bool HP_inter_storage_retrieve_bound_items(int char_id, int account_id, int guil return retVal___; } /* libconfig_interface */ +void HP_libconfig_set_db_path(const char *db_path) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_set_db_path_pre > 0) { + void (*preHookFunc) (const char **db_path); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_set_db_path_pre[hIndex].func; + preHookFunc(&db_path); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_db_path(db_path); + } + if (HPMHooks.count.HP_libconfig_set_db_path_post > 0) { + void (*postHookFunc) (const char *db_path); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_set_db_path_post[hIndex].func; + postHookFunc(db_path); + } + } + return; +} +void HP_libconfig_format_db_path(const char *filename, char *path_buf, int buffer_len) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_format_db_path_pre > 0) { + void (*preHookFunc) (const char **filename, char **path_buf, int *buffer_len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_format_db_path_pre[hIndex].func; + preHookFunc(&filename, &path_buf, &buffer_len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.format_db_path(filename, path_buf, buffer_len); + } + if (HPMHooks.count.HP_libconfig_format_db_path_post > 0) { + void (*postHookFunc) (const char *filename, char *path_buf, int buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_format_db_path_post[hIndex].func; + postHookFunc(filename, path_buf, buffer_len); + } + } + return; +} int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; @@ -13418,33 +13410,6 @@ int HP_mapif_guild_broken(int guild_id, int flag) { } return retVal___; } -int HP_mapif_guild_message(int guild_id, int account_id, const char *mes, int len, int sfd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_guild_message_pre > 0) { - int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len, int *sfd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_guild_message_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &mes, &len, &sfd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.guild_message(guild_id, account_id, mes, len, sfd); - } - if (HPMHooks.count.HP_mapif_guild_message_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, const char *mes, int len, int sfd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_guild_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, guild_id, account_id, mes, len, sfd); - } - } - return retVal___; -} int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; @@ -13796,11 +13761,11 @@ int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, } return retVal___; } -int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class) { +int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, 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_mapif_parse_GuildChangeMemberInfoShort_pre > 0) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); + int (*preHookFunc) (int *fd, 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_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_pre[hIndex].func; @@ -13815,7 +13780,7 @@ int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_ retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class); } if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post > 0) { - int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); + int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class); for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class); @@ -13850,33 +13815,6 @@ int HP_mapif_parse_BreakGuild(int fd, int guild_id) { } return retVal___; } -int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_parse_GuildMessage_pre > 0) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, const char **mes, int *len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &mes, &len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_GuildMessage(fd, guild_id, account_id, mes, len); - } - if (HPMHooks.count.HP_mapif_parse_GuildMessage_post > 0) { - int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, const char *mes, int len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, mes, len); - } - } - return retVal___; -} int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; @@ -15115,33 +15053,6 @@ int HP_mapif_party_broken(int party_id, int flag) { } return retVal___; } -int HP_mapif_party_message(int party_id, int account_id, const char *mes, int len, int sfd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_party_message_pre > 0) { - int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len, int *sfd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_party_message_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &mes, &len, &sfd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.party_message(party_id, account_id, mes, len, sfd); - } - if (HPMHooks.count.HP_mapif_party_message_post > 0) { - int (*postHookFunc) (int retVal___, int party_id, int account_id, const char *mes, int len, int sfd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_party_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, party_id, account_id, mes, len, sfd); - } - } - return retVal___; -} int HP_mapif_parse_CreateParty(int fd, const char *name, int item, int item2, const struct party_member *leader) { int hIndex = 0; int retVal___ = 0; @@ -15330,33 +15241,6 @@ int HP_mapif_parse_BreakParty(int fd, int party_id) { } return retVal___; } -int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char *mes, int len) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_parse_PartyMessage_pre > 0) { - int (*preHookFunc) (int *fd, int *party_id, int *account_id, const char **mes, int *len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, &account_id, &mes, &len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_PartyMessage(fd, party_id, account_id, mes, len); - } - if (HPMHooks.count.HP_mapif_parse_PartyMessage_post > 0) { - int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, const char *mes, int len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd, party_id, account_id, mes, len); - } - } - return retVal___; -} int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; @@ -15995,10 +15879,10 @@ void HP_mapif_parse_rodex_checkname(int fd) { } return; } -void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name) { +void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name) { int hIndex = 0; if (HPMHooks.count.HP_mapif_rodex_checkname_pre > 0) { - void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name); + void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_pre[hIndex].func; @@ -16013,7 +15897,7 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short HPMHooks.source.mapif.rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, name); } if (HPMHooks.count.HP_mapif_rodex_checkname_post > 0) { - void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); + void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name); for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_post[hIndex].func; postHookFunc(fd, reqchar_id, target_char_id, target_class, target_level, name); @@ -16021,6 +15905,58 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short } return; } +void HP_mapif_rodex_getzenyack(int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_getzenyack_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id, &opentype, &zeny); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_getzenyack(fd, char_id, mail_id, opentype, zeny); + } + if (HPMHooks.count.HP_mapif_rodex_getzenyack_post > 0) { + void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_post[hIndex].func; + postHookFunc(fd, char_id, mail_id, opentype, zeny); + } + } + return; +} +void HP_mapif_rodex_getitemsack(int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_getitemsack_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id, &opentype, &count, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_getitemsack(fd, char_id, mail_id, opentype, count, items); + } + if (HPMHooks.count.HP_mapif_rodex_getitemsack_post > 0) { + void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_post[hIndex].func; + postHookFunc(fd, char_id, mail_id, opentype, count, items); + } + } + return; +} int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) { int hIndex = 0; int retVal___ = 0; @@ -16315,113 +16251,6 @@ void HP_mapif_parse_accinfo(int fd) { } return; } -int HP_mapif_broadcast(const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_broadcast_pre > 0) { - int (*preHookFunc) (const unsigned char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_broadcast_pre[hIndex].func; - retVal___ = preHookFunc(&mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.broadcast(mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd); - } - if (HPMHooks.count.HP_mapif_broadcast_post > 0) { - int (*postHookFunc) (int retVal___, const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_broadcast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd); - } - } - return retVal___; -} -int HP_mapif_wis_message(struct WisData *wd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_wis_message_pre > 0) { - int (*preHookFunc) (struct WisData **wd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_wis_message_pre[hIndex].func; - retVal___ = preHookFunc(&wd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.wis_message(wd); - } - if (HPMHooks.count.HP_mapif_wis_message_post > 0) { - int (*postHookFunc) (int retVal___, struct WisData *wd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_wis_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wd); - } - } - return retVal___; -} -void HP_mapif_wis_response(int fd, const unsigned char *src, int flag) { - int hIndex = 0; - if (HPMHooks.count.HP_mapif_wis_response_pre > 0) { - void (*preHookFunc) (int *fd, const unsigned char **src, int *flag); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_wis_response_pre[hIndex].func; - preHookFunc(&fd, &src, &flag); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.mapif.wis_response(fd, src, flag); - } - if (HPMHooks.count.HP_mapif_wis_response_post > 0) { - void (*postHookFunc) (int fd, const unsigned char *src, int flag); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_wis_response_post[hIndex].func; - postHookFunc(fd, src, flag); - } - } - return; -} -int HP_mapif_wis_end(struct WisData *wd, int flag) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_wis_end_pre > 0) { - int (*preHookFunc) (struct WisData **wd, int *flag); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_wis_end_pre[hIndex].func; - retVal___ = preHookFunc(&wd, &flag); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.wis_end(wd, flag); - } - if (HPMHooks.count.HP_mapif_wis_end_post > 0) { - int (*postHookFunc) (int retVal___, struct WisData *wd, int flag); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_wis_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wd, flag); - } - } - return retVal___; -} int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { int hIndex = 0; int retVal___ = 0; @@ -16476,114 +16305,6 @@ int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { } return retVal___; } -int HP_mapif_parse_broadcast(int fd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_parse_broadcast_pre > 0) { - int (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_pre[hIndex].func; - retVal___ = preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_broadcast(fd); - } - if (HPMHooks.count.HP_mapif_parse_broadcast_post > 0) { - int (*postHookFunc) (int retVal___, int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd); - } - } - return retVal___; -} -int HP_mapif_parse_WisRequest(int fd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_parse_WisRequest_pre > 0) { - int (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_pre[hIndex].func; - retVal___ = preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_WisRequest(fd); - } - if (HPMHooks.count.HP_mapif_parse_WisRequest_post > 0) { - int (*postHookFunc) (int retVal___, int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd); - } - } - return retVal___; -} -int HP_mapif_parse_WisReply(int fd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_parse_WisReply_pre > 0) { - int (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_pre[hIndex].func; - retVal___ = preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_WisReply(fd); - } - if (HPMHooks.count.HP_mapif_parse_WisReply_post > 0) { - int (*postHookFunc) (int retVal___, int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd); - } - } - return retVal___; -} -int HP_mapif_parse_WisToGM(int fd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_parse_WisToGM_pre > 0) { - int (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_pre[hIndex].func; - retVal___ = preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_WisToGM(fd); - } - if (HPMHooks.count.HP_mapif_parse_WisToGM_post > 0) { - int (*postHookFunc) (int retVal___, int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd); - } - } - return retVal___; -} int HP_mapif_parse_Registry(int fd) { int hIndex = 0; int retVal___ = 0; @@ -16746,6 +16467,60 @@ int HP_mapif_parse_ClanMemberCount(int fd, int clan_id, int kick_interval) { return retVal___; } /* mapindex_interface */ +bool HP_mapindex_config_read_dbpath(const char *filename, const struct config_t *config) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mapindex_config_read_dbpath_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_dbpath_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapindex_config_read_dbpath_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.config_read_dbpath(filename, config); + } + if (HPMHooks.count.HP_mapindex_config_read_dbpath_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_dbpath_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapindex_config_read_dbpath_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config); + } + } + return retVal___; +} +bool HP_mapindex_config_read(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mapindex_config_read_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapindex_config_read_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.config_read(); + } + if (HPMHooks.count.HP_mapindex_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapindex_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} int HP_mapindex_init(void) { int hIndex = 0; int retVal___ = 0; @@ -17357,6 +17132,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; +} /* pincode_interface */ void HP_pincode_handle(int fd, struct char_session_data *sd) { int hIndex = 0; @@ -18317,15 +18197,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; @@ -18333,17 +18213,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; @@ -18397,6 +18303,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; @@ -18503,6 +18435,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) { diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc index 0d69cd755..9e723d83b 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.sources.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-2020 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 @@ -54,6 +54,7 @@ HPMHooks.source.mapindex = *mapindex; HPMHooks.source.md5 = *md5; HPMHooks.source.mutex = *mutex; HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.packets = *packets; HPMHooks.source.pincode = *pincode; HPMHooks.source.rnd = *rnd; HPMHooks.source.showmsg = *showmsg; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index 5300ca3a6..c81d42da8 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.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-2020 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 @@ -204,10 +204,18 @@ struct { struct HPMHookPoint *HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre; struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_OTP_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_OTP_CODE_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_OTP_CODE_post; struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_pre; struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_post; struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; + struct HPMHookPoint *HP_libconfig_set_db_path_pre; + struct HPMHookPoint *HP_libconfig_set_db_path_post; + struct HPMHookPoint *HP_libconfig_format_db_path_pre; + struct HPMHookPoint *HP_libconfig_format_db_path_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -436,6 +444,8 @@ struct { struct HPMHookPoint *HP_login_client_login_post; struct HPMHookPoint *HP_login_client_login_otp_pre; struct HPMHookPoint *HP_login_client_login_otp_post; + struct HPMHookPoint *HP_login_client_login_mobile_otp_request_pre; + struct HPMHookPoint *HP_login_client_login_mobile_otp_request_post; struct HPMHookPoint *HP_login_char_server_connection_status_pre; struct HPMHookPoint *HP_login_char_server_connection_status_post; struct HPMHookPoint *HP_login_parse_request_connection_pre; @@ -512,6 +522,14 @@ struct { struct HPMHookPoint *HP_mutex_cond_broadcast_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; struct HPMHookPoint *HP_nullpo_assert_report_post; + struct HPMHookPoint *HP_packets_init_pre; + struct HPMHookPoint *HP_packets_init_post; + struct HPMHookPoint *HP_packets_final_pre; + struct HPMHookPoint *HP_packets_final_post; + struct HPMHookPoint *HP_packets_addLens_pre; + struct HPMHookPoint *HP_packets_addLens_post; + struct HPMHookPoint *HP_packets_addLen_pre; + struct HPMHookPoint *HP_packets_addLen_post; struct HPMHookPoint *HP_rnd_init_pre; struct HPMHookPoint *HP_rnd_init_post; struct HPMHookPoint *HP_rnd_final_pre; @@ -554,10 +572,14 @@ struct { struct HPMHookPoint *HP_sockt_realloc_writefifo_post; struct HPMHookPoint *HP_sockt_wfifoset_pre; struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_wfifohead_pre; + struct HPMHookPoint *HP_sockt_wfifohead_post; struct HPMHookPoint *HP_sockt_rfifoskip_pre; struct HPMHookPoint *HP_sockt_rfifoskip_post; struct HPMHookPoint *HP_sockt_close_pre; struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_validateWfifo_pre; + struct HPMHookPoint *HP_sockt_validateWfifo_post; struct HPMHookPoint *HP_sockt_session_is_valid_pre; struct HPMHookPoint *HP_sockt_session_is_valid_post; struct HPMHookPoint *HP_sockt_session_is_active_pre; @@ -566,6 +588,8 @@ struct { struct HPMHookPoint *HP_sockt_flush_post; struct HPMHookPoint *HP_sockt_flush_fifos_pre; struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_connect_client_pre; + struct HPMHookPoint *HP_sockt_connect_client_post; struct HPMHookPoint *HP_sockt_set_nonblocking_pre; struct HPMHookPoint *HP_sockt_set_nonblocking_post; struct HPMHookPoint *HP_sockt_set_defaultparse_pre; @@ -985,10 +1009,18 @@ struct { int HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; int HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre; int HP_PRIV__lclif_parse_CA_LOGIN_OTP_post; + int HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre; + int HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post; + int HP_PRIV__lclif_parse_CA_OTP_CODE_pre; + int HP_PRIV__lclif_parse_CA_OTP_CODE_post; int HP_PRIV__lclif_parse_CA_REQ_HASH_pre; int HP_PRIV__lclif_parse_CA_REQ_HASH_post; int HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; int HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; + int HP_libconfig_set_db_path_pre; + int HP_libconfig_set_db_path_post; + int HP_libconfig_format_db_path_pre; + int HP_libconfig_format_db_path_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -1217,6 +1249,8 @@ struct { int HP_login_client_login_post; int HP_login_client_login_otp_pre; int HP_login_client_login_otp_post; + int HP_login_client_login_mobile_otp_request_pre; + int HP_login_client_login_mobile_otp_request_post; int HP_login_char_server_connection_status_pre; int HP_login_char_server_connection_status_post; int HP_login_parse_request_connection_pre; @@ -1293,6 +1327,14 @@ struct { int HP_mutex_cond_broadcast_post; int HP_nullpo_assert_report_pre; int HP_nullpo_assert_report_post; + int HP_packets_init_pre; + int HP_packets_init_post; + int HP_packets_final_pre; + int HP_packets_final_post; + int HP_packets_addLens_pre; + int HP_packets_addLens_post; + int HP_packets_addLen_pre; + int HP_packets_addLen_post; int HP_rnd_init_pre; int HP_rnd_init_post; int HP_rnd_final_pre; @@ -1335,10 +1377,14 @@ struct { int HP_sockt_realloc_writefifo_post; int HP_sockt_wfifoset_pre; int HP_sockt_wfifoset_post; + int HP_sockt_wfifohead_pre; + int HP_sockt_wfifohead_post; int HP_sockt_rfifoskip_pre; int HP_sockt_rfifoskip_post; int HP_sockt_close_pre; int HP_sockt_close_post; + int HP_sockt_validateWfifo_pre; + int HP_sockt_validateWfifo_post; int HP_sockt_session_is_valid_pre; int HP_sockt_session_is_valid_post; int HP_sockt_session_is_active_pre; @@ -1347,6 +1393,8 @@ struct { int HP_sockt_flush_post; int HP_sockt_flush_fifos_pre; int HP_sockt_flush_fifos_post; + int HP_sockt_connect_client_pre; + int HP_sockt_connect_client_post; int HP_sockt_set_nonblocking_pre; int HP_sockt_set_nonblocking_post; int HP_sockt_set_defaultparse_pre; @@ -1605,6 +1653,7 @@ struct { struct md5_interface md5; struct mutex_interface mutex; struct nullpo_interface nullpo; + struct packets_interface packets; struct rnd_interface rnd; struct showmsg_interface showmsg; struct socket_interface sockt; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index 6eb2e8121..790c8a3a5 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.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-2020 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 @@ -126,9 +126,13 @@ struct HookingPointData HookingPoints[] = { { HP_POP(lclif->p->parse_CA_LOGIN_HAN, HP_PRIV__lclif_parse_CA_LOGIN_HAN) }, { HP_POP(lclif->p->parse_CA_SSO_LOGIN_REQ, HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) }, { HP_POP(lclif->p->parse_CA_LOGIN_OTP, HP_PRIV__lclif_parse_CA_LOGIN_OTP) }, + { HP_POP(lclif->p->parse_CA_ACK_MOBILE_OTP, HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) }, + { HP_POP(lclif->p->parse_CA_OTP_CODE, HP_PRIV__lclif_parse_CA_OTP_CODE) }, { HP_POP(lclif->p->parse_CA_REQ_HASH, HP_PRIV__lclif_parse_CA_REQ_HASH) }, { HP_POP(lclif->p->parse_CA_CHARSERVERCONNECT, HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT) }, /* libconfig_interface */ + { HP_POP(libconfig->set_db_path, HP_libconfig_set_db_path) }, + { HP_POP(libconfig->format_db_path, HP_libconfig_format_db_path) }, { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -244,6 +248,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(login->auth_failed, HP_login_auth_failed) }, { HP_POP(login->client_login, HP_login_client_login) }, { HP_POP(login->client_login_otp, HP_login_client_login_otp) }, + { HP_POP(login->client_login_mobile_otp_request, HP_login_client_login_mobile_otp_request) }, { HP_POP(login->char_server_connection_status, HP_login_char_server_connection_status) }, { HP_POP(login->parse_request_connection, HP_login_parse_request_connection) }, { HP_POP(login->config_set_defaults, HP_login_config_set_defaults) }, @@ -286,6 +291,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mutex->cond_broadcast, HP_mutex_cond_broadcast) }, /* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, +/* packets_interface */ + { HP_POP(packets->init, HP_packets_init) }, + { HP_POP(packets->final, HP_packets_final) }, + { HP_POP(packets->addLens, HP_packets_addLens) }, + { HP_POP(packets->addLen, HP_packets_addLen) }, /* rnd_interface */ { HP_POP(rnd->init, HP_rnd_init) }, { HP_POP(rnd->final, HP_rnd_final) }, @@ -310,12 +320,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) }, { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) }, { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, { HP_POP(sockt->flush, HP_sockt_flush) }, { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->connect_client, HP_sockt_connect_client) }, { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index e432da70d..7eab86a08 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.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-2020 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 @@ -2409,6 +2409,60 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_OTP(int fd, struct login_sess } return retVal___; } +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_ACK_MOBILE_OTP(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_OTP_CODE(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} enum parsefunc_rcode HP_PRIV__lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; @@ -2464,6 +2518,58 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT(int fd, struct lo return retVal___; } /* libconfig_interface */ +void HP_libconfig_set_db_path(const char *db_path) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_set_db_path_pre > 0) { + void (*preHookFunc) (const char **db_path); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_set_db_path_pre[hIndex].func; + preHookFunc(&db_path); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_db_path(db_path); + } + if (HPMHooks.count.HP_libconfig_set_db_path_post > 0) { + void (*postHookFunc) (const char *db_path); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_set_db_path_post[hIndex].func; + postHookFunc(db_path); + } + } + return; +} +void HP_libconfig_format_db_path(const char *filename, char *path_buf, int buffer_len) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_format_db_path_pre > 0) { + void (*preHookFunc) (const char **filename, char **path_buf, int *buffer_len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_format_db_path_pre[hIndex].func; + preHookFunc(&filename, &path_buf, &buffer_len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.format_db_path(filename, path_buf, buffer_len); + } + if (HPMHooks.count.HP_libconfig_format_db_path_post > 0) { + void (*postHookFunc) (const char *filename, char *path_buf, int buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_format_db_path_post[hIndex].func; + postHookFunc(filename, path_buf, buffer_len); + } + } + return; +} int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; @@ -5521,6 +5627,32 @@ bool HP_login_client_login_otp(int fd, struct login_session_data *sd) { } return retVal___; } +void HP_login_client_login_mobile_otp_request(int fd, struct login_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_login_client_login_mobile_otp_request_pre > 0) { + void (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.client_login_mobile_otp_request(fd, sd); + } + if (HPMHooks.count.HP_login_client_login_mobile_otp_request_post > 0) { + void (*postHookFunc) (int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) { int hIndex = 0; if (HPMHooks.count.HP_login_char_server_connection_status_pre > 0) { @@ -6532,6 +6664,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; +} /* rnd_interface */ void HP_rnd_init(void) { int hIndex = 0; @@ -7072,15 +7309,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; @@ -7088,17 +7325,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; @@ -7152,6 +7415,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; @@ -7258,6 +7547,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) { diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc index 78c506043..576796779 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.sources.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-2020 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 @@ -42,6 +42,7 @@ HPMHooks.source.loginlog = *loginlog; HPMHooks.source.md5 = *md5; HPMHooks.source.mutex = *mutex; HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.packets = *packets; HPMHooks.source.rnd = *rnd; HPMHooks.source.showmsg = *showmsg; HPMHooks.source.sockt = *sockt; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 8762975e1..16de79ecb 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.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-2020 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 @@ -136,6 +136,10 @@ struct { struct HPMHookPoint *HP_achievement_check_title_post; struct HPMHookPoint *HP_achievement_get_rewards_pre; struct HPMHookPoint *HP_achievement_get_rewards_post; + struct HPMHookPoint *HP_achievement_get_rewards_buffs_pre; + struct HPMHookPoint *HP_achievement_get_rewards_buffs_post; + struct HPMHookPoint *HP_achievement_get_rewards_items_pre; + struct HPMHookPoint *HP_achievement_get_rewards_items_post; struct HPMHookPoint *HP_atcommand_init_pre; struct HPMHookPoint *HP_atcommand_init_post; struct HPMHookPoint *HP_atcommand_final_pre; @@ -232,6 +236,8 @@ struct { struct HPMHookPoint *HP_battle_drain_post; struct HPMHookPoint *HP_battle_reflect_damage_pre; struct HPMHookPoint *HP_battle_reflect_damage_post; + struct HPMHookPoint *HP_battle_reflect_trap_pre; + struct HPMHookPoint *HP_battle_reflect_trap_post; struct HPMHookPoint *HP_battle_attr_ratio_pre; struct HPMHookPoint *HP_battle_attr_ratio_post; struct HPMHookPoint *HP_battle_attr_fix_pre; @@ -880,12 +886,18 @@ struct { struct HPMHookPoint *HP_clif_fame_taekwon_post; struct HPMHookPoint *HP_clif_ranklist_pre; struct HPMHookPoint *HP_clif_ranklist_post; + struct HPMHookPoint *HP_clif_ranklist_sub_pre; + struct HPMHookPoint *HP_clif_ranklist_sub_post; + struct HPMHookPoint *HP_clif_ranklist_sub2_pre; + struct HPMHookPoint *HP_clif_ranklist_sub2_post; struct HPMHookPoint *HP_clif_update_rankingpoint_pre; struct HPMHookPoint *HP_clif_update_rankingpoint_post; struct HPMHookPoint *HP_clif_pRanklist_pre; struct HPMHookPoint *HP_clif_pRanklist_post; struct HPMHookPoint *HP_clif_hotkeys_pre; struct HPMHookPoint *HP_clif_hotkeys_post; + struct HPMHookPoint *HP_clif_hotkeysAll_pre; + struct HPMHookPoint *HP_clif_hotkeysAll_post; struct HPMHookPoint *HP_clif_insight_pre; struct HPMHookPoint *HP_clif_insight_post; struct HPMHookPoint *HP_clif_outsight_pre; @@ -910,6 +922,8 @@ struct { struct HPMHookPoint *HP_clif_combo_delay_post; struct HPMHookPoint *HP_clif_status_change_pre; struct HPMHookPoint *HP_clif_status_change_post; + struct HPMHookPoint *HP_clif_status_change_sub_pre; + struct HPMHookPoint *HP_clif_status_change_sub_post; struct HPMHookPoint *HP_clif_insert_card_pre; struct HPMHookPoint *HP_clif_insert_card_post; struct HPMHookPoint *HP_clif_inventoryList_pre; @@ -924,6 +938,18 @@ struct { struct HPMHookPoint *HP_clif_cartList_post; struct HPMHookPoint *HP_clif_cartItems_pre; struct HPMHookPoint *HP_clif_cartItems_post; + struct HPMHookPoint *HP_clif_inventoryExpansionInfo_pre; + struct HPMHookPoint *HP_clif_inventoryExpansionInfo_post; + struct HPMHookPoint *HP_clif_inventoryExpandAck_pre; + struct HPMHookPoint *HP_clif_inventoryExpandAck_post; + struct HPMHookPoint *HP_clif_inventoryExpandResult_pre; + struct HPMHookPoint *HP_clif_inventoryExpandResult_post; + struct HPMHookPoint *HP_clif_pInventoryExpansion_pre; + struct HPMHookPoint *HP_clif_pInventoryExpansion_post; + struct HPMHookPoint *HP_clif_pInventoryExpansionConfirmed_pre; + struct HPMHookPoint *HP_clif_pInventoryExpansionConfirmed_post; + struct HPMHookPoint *HP_clif_pInventoryExpansionRejected_pre; + struct HPMHookPoint *HP_clif_pInventoryExpansionRejected_post; struct HPMHookPoint *HP_clif_favorite_item_pre; struct HPMHookPoint *HP_clif_favorite_item_post; struct HPMHookPoint *HP_clif_clearcart_pre; @@ -950,8 +976,32 @@ struct { struct HPMHookPoint *HP_clif_mvp_noitem_post; struct HPMHookPoint *HP_clif_changed_dir_pre; struct HPMHookPoint *HP_clif_changed_dir_post; - struct HPMHookPoint *HP_clif_charnameack_pre; - struct HPMHookPoint *HP_clif_charnameack_post; + struct HPMHookPoint *HP_clif_blname_ack_pre; + struct HPMHookPoint *HP_clif_blname_ack_post; + struct HPMHookPoint *HP_clif_pcname_ack_pre; + struct HPMHookPoint *HP_clif_pcname_ack_post; + struct HPMHookPoint *HP_clif_homname_ack_pre; + struct HPMHookPoint *HP_clif_homname_ack_post; + struct HPMHookPoint *HP_clif_mername_ack_pre; + struct HPMHookPoint *HP_clif_mername_ack_post; + struct HPMHookPoint *HP_clif_petname_ack_pre; + struct HPMHookPoint *HP_clif_petname_ack_post; + struct HPMHookPoint *HP_clif_npcname_ack_pre; + struct HPMHookPoint *HP_clif_npcname_ack_post; + struct HPMHookPoint *HP_clif_mobname_ack_pre; + struct HPMHookPoint *HP_clif_mobname_ack_post; + struct HPMHookPoint *HP_clif_mobname_guardian_ack_pre; + struct HPMHookPoint *HP_clif_mobname_guardian_ack_post; + struct HPMHookPoint *HP_clif_mobname_additional_ack_pre; + struct HPMHookPoint *HP_clif_mobname_additional_ack_post; + struct HPMHookPoint *HP_clif_mobname_normal_ack_pre; + struct HPMHookPoint *HP_clif_mobname_normal_ack_post; + struct HPMHookPoint *HP_clif_chatname_ack_pre; + struct HPMHookPoint *HP_clif_chatname_ack_post; + struct HPMHookPoint *HP_clif_elemname_ack_pre; + struct HPMHookPoint *HP_clif_elemname_ack_post; + struct HPMHookPoint *HP_clif_unknownname_ack_pre; + struct HPMHookPoint *HP_clif_unknownname_ack_post; struct HPMHookPoint *HP_clif_monster_hp_bar_pre; struct HPMHookPoint *HP_clif_monster_hp_bar_post; struct HPMHookPoint *HP_clif_hpmeter_pre; @@ -1104,6 +1154,12 @@ struct { struct HPMHookPoint *HP_clif_specialeffect_single_post; struct HPMHookPoint *HP_clif_specialeffect_value_pre; struct HPMHookPoint *HP_clif_specialeffect_value_post; + struct HPMHookPoint *HP_clif_specialeffect_value_single_pre; + struct HPMHookPoint *HP_clif_specialeffect_value_single_post; + struct HPMHookPoint *HP_clif_removeSpecialEffect_pre; + struct HPMHookPoint *HP_clif_removeSpecialEffect_post; + struct HPMHookPoint *HP_clif_removeSpecialEffect_single_pre; + struct HPMHookPoint *HP_clif_removeSpecialEffect_single_post; struct HPMHookPoint *HP_clif_millenniumshield_pre; struct HPMHookPoint *HP_clif_millenniumshield_post; struct HPMHookPoint *HP_clif_spiritcharm_pre; @@ -1134,6 +1190,8 @@ struct { struct HPMHookPoint *HP_clif_addchat_post; struct HPMHookPoint *HP_clif_changechatowner_pre; struct HPMHookPoint *HP_clif_changechatowner_post; + struct HPMHookPoint *HP_clif_chatRoleChange_pre; + struct HPMHookPoint *HP_clif_chatRoleChange_post; struct HPMHookPoint *HP_clif_clearchat_pre; struct HPMHookPoint *HP_clif_clearchat_post; struct HPMHookPoint *HP_clif_leavechat_pre; @@ -1154,6 +1212,8 @@ struct { struct HPMHookPoint *HP_clif_messagecolor_self_post; struct HPMHookPoint *HP_clif_messagecolor_pre; struct HPMHookPoint *HP_clif_messagecolor_post; + struct HPMHookPoint *HP_clif_serviceMessageColor_pre; + struct HPMHookPoint *HP_clif_serviceMessageColor_post; struct HPMHookPoint *HP_clif_disp_overhead_pre; struct HPMHookPoint *HP_clif_disp_overhead_post; struct HPMHookPoint *HP_clif_notify_playerchat_pre; @@ -1246,6 +1306,8 @@ struct { struct HPMHookPoint *HP_clif_addskill_post; struct HPMHookPoint *HP_clif_deleteskill_pre; struct HPMHookPoint *HP_clif_deleteskill_post; + struct HPMHookPoint *HP_clif_playerSkillToPacket_pre; + struct HPMHookPoint *HP_clif_playerSkillToPacket_post; struct HPMHookPoint *HP_clif_party_created_pre; struct HPMHookPoint *HP_clif_party_created_post; struct HPMHookPoint *HP_clif_party_member_info_pre; @@ -1288,6 +1350,10 @@ struct { struct HPMHookPoint *HP_clif_guild_basicinfo_post; struct HPMHookPoint *HP_clif_guild_allianceinfo_pre; struct HPMHookPoint *HP_clif_guild_allianceinfo_post; + struct HPMHookPoint *HP_clif_guild_castlelist_pre; + struct HPMHookPoint *HP_clif_guild_castlelist_post; + struct HPMHookPoint *HP_clif_guild_castleinfo_pre; + struct HPMHookPoint *HP_clif_guild_castleinfo_post; struct HPMHookPoint *HP_clif_guild_memberlist_pre; struct HPMHookPoint *HP_clif_guild_memberlist_post; struct HPMHookPoint *HP_clif_guild_skillinfo_pre; @@ -1590,6 +1656,8 @@ struct { struct HPMHookPoint *HP_clif_parse_roulette_db_post; struct HPMHookPoint *HP_clif_roulette_generate_ack_pre; struct HPMHookPoint *HP_clif_roulette_generate_ack_post; + struct HPMHookPoint *HP_clif_roulette_close_pre; + struct HPMHookPoint *HP_clif_roulette_close_post; struct HPMHookPoint *HP_clif_openmergeitem_pre; struct HPMHookPoint *HP_clif_openmergeitem_post; struct HPMHookPoint *HP_clif_cancelmergeitem_pre; @@ -1598,6 +1666,8 @@ struct { struct HPMHookPoint *HP_clif_comparemergeitem_post; struct HPMHookPoint *HP_clif_ackmergeitems_pre; struct HPMHookPoint *HP_clif_ackmergeitems_post; + struct HPMHookPoint *HP_clif_mergeitems_pre; + struct HPMHookPoint *HP_clif_mergeitems_post; struct HPMHookPoint *HP_clif_isdisguised_pre; struct HPMHookPoint *HP_clif_isdisguised_post; struct HPMHookPoint *HP_clif_navigate_to_pre; @@ -1622,8 +1692,10 @@ struct { struct HPMHookPoint *HP_clif_pLoadEndAck_post; struct HPMHookPoint *HP_clif_pTickSend_pre; struct HPMHookPoint *HP_clif_pTickSend_post; - struct HPMHookPoint *HP_clif_pHotkey_pre; - struct HPMHookPoint *HP_clif_pHotkey_post; + struct HPMHookPoint *HP_clif_pHotkey1_pre; + struct HPMHookPoint *HP_clif_pHotkey1_post; + struct HPMHookPoint *HP_clif_pHotkey2_pre; + struct HPMHookPoint *HP_clif_pHotkey2_post; struct HPMHookPoint *HP_clif_pProgressbar_pre; struct HPMHookPoint *HP_clif_pProgressbar_post; struct HPMHookPoint *HP_clif_pWalkToXY_pre; @@ -1708,8 +1780,14 @@ struct { struct HPMHookPoint *HP_clif_pStatusUp_post; struct HPMHookPoint *HP_clif_pSkillUp_pre; struct HPMHookPoint *HP_clif_pSkillUp_post; + struct HPMHookPoint *HP_clif_useSkillToIdReal_pre; + struct HPMHookPoint *HP_clif_useSkillToIdReal_post; struct HPMHookPoint *HP_clif_pUseSkillToId_pre; struct HPMHookPoint *HP_clif_pUseSkillToId_post; + struct HPMHookPoint *HP_clif_pStartUseSkillToId_pre; + struct HPMHookPoint *HP_clif_pStartUseSkillToId_post; + struct HPMHookPoint *HP_clif_pStopUseSkillToId_pre; + struct HPMHookPoint *HP_clif_pStopUseSkillToId_post; struct HPMHookPoint *HP_clif_pUseSkillToId_homun_pre; struct HPMHookPoint *HP_clif_pUseSkillToId_homun_post; struct HPMHookPoint *HP_clif_pUseSkillToId_mercenary_pre; @@ -2022,8 +2100,12 @@ struct { struct HPMHookPoint *HP_clif_pBGQueueRevokeReq_post; struct HPMHookPoint *HP_clif_pBGQueueBattleBeginAck_pre; struct HPMHookPoint *HP_clif_pBGQueueBattleBeginAck_post; - struct HPMHookPoint *HP_clif_pCashShopOpen_pre; - struct HPMHookPoint *HP_clif_pCashShopOpen_post; + struct HPMHookPoint *HP_clif_pCashShopOpen1_pre; + struct HPMHookPoint *HP_clif_pCashShopOpen1_post; + struct HPMHookPoint *HP_clif_pCashShopOpen2_pre; + struct HPMHookPoint *HP_clif_pCashShopOpen2_post; + struct HPMHookPoint *HP_clif_pCashShopLimitedReq_pre; + struct HPMHookPoint *HP_clif_pCashShopLimitedReq_post; struct HPMHookPoint *HP_clif_pCashShopClose_pre; struct HPMHookPoint *HP_clif_pCashShopClose_post; struct HPMHookPoint *HP_clif_pCashShopReqTab_pre; @@ -2036,6 +2118,10 @@ struct { struct HPMHookPoint *HP_clif_pPartyTick_post; struct HPMHookPoint *HP_clif_pGuildInvite2_pre; struct HPMHookPoint *HP_clif_pGuildInvite2_post; + struct HPMHookPoint *HP_clif_cashShopBuyAck_pre; + struct HPMHookPoint *HP_clif_cashShopBuyAck_post; + struct HPMHookPoint *HP_clif_cashShopOpen_pre; + struct HPMHookPoint *HP_clif_cashShopOpen_post; struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_pre; struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_post; struct HPMHookPoint *HP_clif_pPartyBookingSubFilter_pre; @@ -2074,8 +2160,10 @@ struct { struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post; struct HPMHookPoint *HP_clif_add_item_options_pre; struct HPMHookPoint *HP_clif_add_item_options_post; - struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre; - struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; + struct HPMHookPoint *HP_clif_pHotkeyRowShift1_pre; + struct HPMHookPoint *HP_clif_pHotkeyRowShift1_post; + struct HPMHookPoint *HP_clif_pHotkeyRowShift2_pre; + struct HPMHookPoint *HP_clif_pHotkeyRowShift2_post; struct HPMHookPoint *HP_clif_dressroom_open_pre; struct HPMHookPoint *HP_clif_dressroom_open_post; struct HPMHookPoint *HP_clif_pOneClick_ItemIdentify_pre; @@ -2180,24 +2268,12 @@ struct { struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_post; struct HPMHookPoint *HP_clif_PrivateAirshipResponse_pre; struct HPMHookPoint *HP_clif_PrivateAirshipResponse_post; - struct HPMHookPoint *HP_clif_stylist_vector_init_pre; - struct HPMHookPoint *HP_clif_stylist_vector_init_post; - struct HPMHookPoint *HP_clif_stylist_vector_clear_pre; - struct HPMHookPoint *HP_clif_stylist_vector_clear_post; - struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_pre; - struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_post; - struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_sub_pre; - struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_sub_post; - struct HPMHookPoint *HP_clif_style_change_validate_requirements_pre; - struct HPMHookPoint *HP_clif_style_change_validate_requirements_post; - struct HPMHookPoint *HP_clif_stylist_send_rodexitem_pre; - struct HPMHookPoint *HP_clif_stylist_send_rodexitem_post; struct HPMHookPoint *HP_clif_pReqStyleChange_pre; struct HPMHookPoint *HP_clif_pReqStyleChange_post; struct HPMHookPoint *HP_clif_pReqStyleChange2_pre; struct HPMHookPoint *HP_clif_pReqStyleChange2_post; - struct HPMHookPoint *HP_clif_cz_req_style_change_sub_pre; - struct HPMHookPoint *HP_clif_cz_req_style_change_sub_post; + struct HPMHookPoint *HP_clif_pStyleClose_pre; + struct HPMHookPoint *HP_clif_pStyleClose_post; struct HPMHookPoint *HP_clif_style_change_response_pre; struct HPMHookPoint *HP_clif_style_change_response_post; struct HPMHookPoint *HP_clif_pPetEvolution_pre; @@ -2208,6 +2284,68 @@ struct { struct HPMHookPoint *HP_clif_party_dead_notification_post; struct HPMHookPoint *HP_clif_pMemorialDungeonCommand_pre; struct HPMHookPoint *HP_clif_pMemorialDungeonCommand_post; + struct HPMHookPoint *HP_clif_camera_showWindow_pre; + struct HPMHookPoint *HP_clif_camera_showWindow_post; + struct HPMHookPoint *HP_clif_camera_change_pre; + struct HPMHookPoint *HP_clif_camera_change_post; + struct HPMHookPoint *HP_clif_pCameraInfo_pre; + struct HPMHookPoint *HP_clif_pCameraInfo_post; + struct HPMHookPoint *HP_clif_item_preview_pre; + struct HPMHookPoint *HP_clif_item_preview_post; + struct HPMHookPoint *HP_clif_enchant_equipment_pre; + struct HPMHookPoint *HP_clif_enchant_equipment_post; + struct HPMHookPoint *HP_clif_pReqRemainTime_pre; + struct HPMHookPoint *HP_clif_pReqRemainTime_post; + struct HPMHookPoint *HP_clif_npc_barter_open_pre; + struct HPMHookPoint *HP_clif_npc_barter_open_post; + struct HPMHookPoint *HP_clif_pNPCBarterClosed_pre; + struct HPMHookPoint *HP_clif_pNPCBarterClosed_post; + struct HPMHookPoint *HP_clif_pNPCBarterPurchase_pre; + struct HPMHookPoint *HP_clif_pNPCBarterPurchase_post; + struct HPMHookPoint *HP_clif_pClientVersion_pre; + struct HPMHookPoint *HP_clif_pClientVersion_post; + struct HPMHookPoint *HP_clif_pPing_pre; + struct HPMHookPoint *HP_clif_pPing_post; + struct HPMHookPoint *HP_clif_ping_pre; + struct HPMHookPoint *HP_clif_ping_post; + struct HPMHookPoint *HP_clif_pingTimer_pre; + struct HPMHookPoint *HP_clif_pingTimer_post; + struct HPMHookPoint *HP_clif_pingTimerSub_pre; + struct HPMHookPoint *HP_clif_pingTimerSub_post; + struct HPMHookPoint *HP_clif_pResetCooldown_pre; + struct HPMHookPoint *HP_clif_pResetCooldown_post; + struct HPMHookPoint *HP_clif_loadConfirm_pre; + struct HPMHookPoint *HP_clif_loadConfirm_post; + struct HPMHookPoint *HP_clif_send_selforarea_pre; + struct HPMHookPoint *HP_clif_send_selforarea_post; + struct HPMHookPoint *HP_clif_OpenRefineryUI_pre; + struct HPMHookPoint *HP_clif_OpenRefineryUI_post; + struct HPMHookPoint *HP_clif_pAddItemRefineryUI_pre; + struct HPMHookPoint *HP_clif_pAddItemRefineryUI_post; + struct HPMHookPoint *HP_clif_AddItemRefineryUIAck_pre; + struct HPMHookPoint *HP_clif_AddItemRefineryUIAck_post; + struct HPMHookPoint *HP_clif_pRefineryUIClose_pre; + struct HPMHookPoint *HP_clif_pRefineryUIClose_post; + struct HPMHookPoint *HP_clif_pRefineryUIRefine_pre; + struct HPMHookPoint *HP_clif_pRefineryUIRefine_post; + struct HPMHookPoint *HP_clif_announce_refine_status_pre; + struct HPMHookPoint *HP_clif_announce_refine_status_post; + struct HPMHookPoint *HP_clif_pGuildCastleTeleportRequest_pre; + struct HPMHookPoint *HP_clif_pGuildCastleTeleportRequest_post; + struct HPMHookPoint *HP_clif_pGuildCastleInfoRequest_pre; + struct HPMHookPoint *HP_clif_pGuildCastleInfoRequest_post; + struct HPMHookPoint *HP_clif_guild_castleteleport_res_pre; + struct HPMHookPoint *HP_clif_guild_castleteleport_res_post; + struct HPMHookPoint *HP_clif_lapineDdukDdak_open_pre; + struct HPMHookPoint *HP_clif_lapineDdukDdak_open_post; + struct HPMHookPoint *HP_clif_lapineDdukDdak_result_pre; + struct HPMHookPoint *HP_clif_lapineDdukDdak_result_post; + struct HPMHookPoint *HP_clif_plapineDdukDdak_ack_pre; + struct HPMHookPoint *HP_clif_plapineDdukDdak_ack_post; + struct HPMHookPoint *HP_clif_plapineDdukDdak_close_pre; + struct HPMHookPoint *HP_clif_plapineDdukDdak_close_post; + struct HPMHookPoint *HP_clif_pReqGearOff_pre; + struct HPMHookPoint *HP_clif_pReqGearOff_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -2466,8 +2604,6 @@ struct { struct HPMHookPoint *HP_guild_emblem_changed_post; struct HPMHookPoint *HP_guild_send_message_pre; struct HPMHookPoint *HP_guild_send_message_post; - struct HPMHookPoint *HP_guild_recv_message_pre; - struct HPMHookPoint *HP_guild_recv_message_post; struct HPMHookPoint *HP_guild_send_dot_remove_pre; struct HPMHookPoint *HP_guild_send_dot_remove_post; struct HPMHookPoint *HP_guild_skillupack_pre; @@ -2512,8 +2648,12 @@ struct { struct HPMHookPoint *HP_guild_sd_check_post; struct HPMHookPoint *HP_guild_read_guildskill_tree_db_pre; struct HPMHookPoint *HP_guild_read_guildskill_tree_db_post; - struct HPMHookPoint *HP_guild_read_castledb_pre; - struct HPMHookPoint *HP_guild_read_castledb_post; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_pre; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_post; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_pre; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_post; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_warp_pre; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_warp_post; struct HPMHookPoint *HP_guild_payexp_timer_sub_pre; struct HPMHookPoint *HP_guild_payexp_timer_sub_post; struct HPMHookPoint *HP_guild_send_xy_timer_sub_pre; @@ -2610,6 +2750,8 @@ struct { struct HPMHookPoint *HP_homun_mutate_post; struct HPMHookPoint *HP_homun_gainexp_pre; struct HPMHookPoint *HP_homun_gainexp_post; + struct HPMHookPoint *HP_homun_gainexp_real_pre; + struct HPMHookPoint *HP_homun_gainexp_real_post; struct HPMHookPoint *HP_homun_add_intimacy_pre; struct HPMHookPoint *HP_homun_add_intimacy_post; struct HPMHookPoint *HP_homun_consume_intimacy_pre; @@ -2708,16 +2850,6 @@ struct { struct HPMHookPoint *HP_intif_parse_post; struct HPMHookPoint *HP_intif_create_pet_pre; struct HPMHookPoint *HP_intif_create_pet_post; - struct HPMHookPoint *HP_intif_broadcast_pre; - struct HPMHookPoint *HP_intif_broadcast_post; - struct HPMHookPoint *HP_intif_broadcast2_pre; - struct HPMHookPoint *HP_intif_broadcast2_post; - struct HPMHookPoint *HP_intif_main_message_pre; - struct HPMHookPoint *HP_intif_main_message_post; - struct HPMHookPoint *HP_intif_wis_message_pre; - struct HPMHookPoint *HP_intif_wis_message_post; - struct HPMHookPoint *HP_intif_wis_message_to_gm_pre; - struct HPMHookPoint *HP_intif_wis_message_to_gm_post; struct HPMHookPoint *HP_intif_saveregistry_pre; struct HPMHookPoint *HP_intif_saveregistry_post; struct HPMHookPoint *HP_intif_request_registry_pre; @@ -2744,8 +2876,6 @@ struct { struct HPMHookPoint *HP_intif_party_changemap_post; struct HPMHookPoint *HP_intif_break_party_pre; struct HPMHookPoint *HP_intif_break_party_post; - struct HPMHookPoint *HP_intif_party_message_pre; - struct HPMHookPoint *HP_intif_party_message_post; struct HPMHookPoint *HP_intif_party_leaderchange_pre; struct HPMHookPoint *HP_intif_party_leaderchange_post; struct HPMHookPoint *HP_intif_guild_create_pre; @@ -2760,8 +2890,6 @@ struct { struct HPMHookPoint *HP_intif_guild_memberinfoshort_post; struct HPMHookPoint *HP_intif_guild_break_pre; struct HPMHookPoint *HP_intif_guild_break_post; - struct HPMHookPoint *HP_intif_guild_message_pre; - struct HPMHookPoint *HP_intif_guild_message_post; struct HPMHookPoint *HP_intif_guild_change_gm_pre; struct HPMHookPoint *HP_intif_guild_change_gm_post; struct HPMHookPoint *HP_intif_guild_change_basicinfo_pre; @@ -2852,6 +2980,10 @@ struct { struct HPMHookPoint *HP_intif_rodex_sendmail_post; struct HPMHookPoint *HP_intif_rodex_checkname_pre; struct HPMHookPoint *HP_intif_rodex_checkname_post; + struct HPMHookPoint *HP_intif_pGetZenyAck_pre; + struct HPMHookPoint *HP_intif_pGetZenyAck_post; + struct HPMHookPoint *HP_intif_pGetItemsAck_pre; + struct HPMHookPoint *HP_intif_pGetItemsAck_post; struct HPMHookPoint *HP_intif_clan_kickoffline_pre; struct HPMHookPoint *HP_intif_clan_kickoffline_post; struct HPMHookPoint *HP_intif_clan_membercount_pre; @@ -2864,14 +2996,6 @@ struct { struct HPMHookPoint *HP_intif_achievements_request_post; struct HPMHookPoint *HP_intif_achievements_save_pre; struct HPMHookPoint *HP_intif_achievements_save_post; - struct HPMHookPoint *HP_intif_pWisMessage_pre; - struct HPMHookPoint *HP_intif_pWisMessage_post; - struct HPMHookPoint *HP_intif_pWisEnd_pre; - struct HPMHookPoint *HP_intif_pWisEnd_post; - struct HPMHookPoint *HP_intif_pWisToGM_sub_pre; - struct HPMHookPoint *HP_intif_pWisToGM_sub_post; - struct HPMHookPoint *HP_intif_pWisToGM_pre; - struct HPMHookPoint *HP_intif_pWisToGM_post; struct HPMHookPoint *HP_intif_pRegisters_pre; struct HPMHookPoint *HP_intif_pRegisters_post; struct HPMHookPoint *HP_intif_pAccountStorage_pre; @@ -2900,8 +3024,6 @@ struct { struct HPMHookPoint *HP_intif_pPartyMove_post; struct HPMHookPoint *HP_intif_pPartyBroken_pre; struct HPMHookPoint *HP_intif_pPartyBroken_post; - struct HPMHookPoint *HP_intif_pPartyMessage_pre; - struct HPMHookPoint *HP_intif_pPartyMessage_post; struct HPMHookPoint *HP_intif_pGuildCreated_pre; struct HPMHookPoint *HP_intif_pGuildCreated_post; struct HPMHookPoint *HP_intif_pGuildInfo_pre; @@ -2914,8 +3036,6 @@ struct { struct HPMHookPoint *HP_intif_pGuildMemberInfoShort_post; struct HPMHookPoint *HP_intif_pGuildBroken_pre; struct HPMHookPoint *HP_intif_pGuildBroken_post; - struct HPMHookPoint *HP_intif_pGuildMessage_pre; - struct HPMHookPoint *HP_intif_pGuildMessage_post; struct HPMHookPoint *HP_intif_pGuildBasicInfoChanged_pre; struct HPMHookPoint *HP_intif_pGuildBasicInfoChanged_post; struct HPMHookPoint *HP_intif_pGuildMemberInfoChanged_pre; @@ -3132,10 +3252,10 @@ struct { struct HPMHookPoint *HP_itemdb_isidentified_post; struct HPMHookPoint *HP_itemdb_isidentified2_pre; struct HPMHookPoint *HP_itemdb_isidentified2_post; - struct HPMHookPoint *HP_itemdb_combo_split_atoi_pre; - struct HPMHookPoint *HP_itemdb_combo_split_atoi_post; - struct HPMHookPoint *HP_itemdb_read_combos_pre; - struct HPMHookPoint *HP_itemdb_read_combos_post; + struct HPMHookPoint *HP_itemdb_read_combodb_libconfig_pre; + struct HPMHookPoint *HP_itemdb_read_combodb_libconfig_post; + struct HPMHookPoint *HP_itemdb_read_combodb_libconfig_sub_pre; + struct HPMHookPoint *HP_itemdb_read_combodb_libconfig_sub_post; struct HPMHookPoint *HP_itemdb_gendercheck_pre; struct HPMHookPoint *HP_itemdb_gendercheck_post; struct HPMHookPoint *HP_itemdb_validate_entry_pre; @@ -3170,6 +3290,18 @@ struct { struct HPMHookPoint *HP_itemdb_lookup_const_post; struct HPMHookPoint *HP_itemdb_lookup_const_mask_pre; struct HPMHookPoint *HP_itemdb_lookup_const_mask_post; + struct HPMHookPoint *HP_itemdb_addname_sub_pre; + struct HPMHookPoint *HP_itemdb_addname_sub_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_sub_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_sub_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post; + struct HPMHookPoint *HP_libconfig_set_db_path_pre; + struct HPMHookPoint *HP_libconfig_set_db_path_post; + struct HPMHookPoint *HP_libconfig_format_db_path_pre; + struct HPMHookPoint *HP_libconfig_format_db_path_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -3372,6 +3504,8 @@ struct { struct HPMHookPoint *HP_map_zone_init_post; struct HPMHookPoint *HP_map_zone_remove_pre; struct HPMHookPoint *HP_map_zone_remove_post; + struct HPMHookPoint *HP_map_zone_remove_all_pre; + struct HPMHookPoint *HP_map_zone_remove_all_post; struct HPMHookPoint *HP_map_zone_apply_pre; struct HPMHookPoint *HP_map_zone_apply_post; struct HPMHookPoint *HP_map_zone_change_pre; @@ -3638,6 +3772,10 @@ struct { struct HPMHookPoint *HP_map_merge_zone_post; struct HPMHookPoint *HP_map_zone_clear_single_pre; struct HPMHookPoint *HP_map_zone_clear_single_post; + struct HPMHookPoint *HP_mapindex_config_read_dbpath_pre; + struct HPMHookPoint *HP_mapindex_config_read_dbpath_post; + struct HPMHookPoint *HP_mapindex_config_read_pre; + struct HPMHookPoint *HP_mapindex_config_read_post; struct HPMHookPoint *HP_mapindex_init_pre; struct HPMHookPoint *HP_mapindex_init_post; struct HPMHookPoint *HP_mapindex_final_pre; @@ -3756,6 +3894,8 @@ struct { struct HPMHookPoint *HP_mob_final_post; struct HPMHookPoint *HP_mob_reload_pre; struct HPMHookPoint *HP_mob_reload_post; + struct HPMHookPoint *HP_mob_reload_sub_mob_pre; + struct HPMHookPoint *HP_mob_reload_sub_mob_post; struct HPMHookPoint *HP_mob_db_pre; struct HPMHookPoint *HP_mob_db_post; struct HPMHookPoint *HP_mob_chat_pre; @@ -3828,6 +3968,8 @@ struct { struct HPMHookPoint *HP_mob_ai_sub_hard_lootsearch_post; struct HPMHookPoint *HP_mob_warpchase_sub_pre; struct HPMHookPoint *HP_mob_warpchase_sub_post; + struct HPMHookPoint *HP_mob_is_in_battle_state_pre; + struct HPMHookPoint *HP_mob_is_in_battle_state_post; struct HPMHookPoint *HP_mob_ai_sub_hard_slavemob_pre; struct HPMHookPoint *HP_mob_ai_sub_hard_slavemob_post; struct HPMHookPoint *HP_mob_unlocktarget_pre; @@ -3848,6 +3990,8 @@ struct { struct HPMHookPoint *HP_mob_ai_lazy_post; struct HPMHookPoint *HP_mob_ai_hard_pre; struct HPMHookPoint *HP_mob_ai_hard_post; + struct HPMHookPoint *HP_mob_setdropitem_options_pre; + struct HPMHookPoint *HP_mob_setdropitem_options_post; struct HPMHookPoint *HP_mob_setdropitem_pre; struct HPMHookPoint *HP_mob_setdropitem_post; struct HPMHookPoint *HP_mob_setlootitem_pre; @@ -3914,6 +4058,14 @@ struct { struct HPMHookPoint *HP_mob_drop_adjust_post; struct HPMHookPoint *HP_mob_item_dropratio_adjust_pre; struct HPMHookPoint *HP_mob_item_dropratio_adjust_post; + struct HPMHookPoint *HP_mob_read_optdrops_option_pre; + struct HPMHookPoint *HP_mob_read_optdrops_option_post; + struct HPMHookPoint *HP_mob_read_optdrops_optslot_pre; + struct HPMHookPoint *HP_mob_read_optdrops_optslot_post; + struct HPMHookPoint *HP_mob_read_optdrops_group_pre; + struct HPMHookPoint *HP_mob_read_optdrops_group_post; + struct HPMHookPoint *HP_mob_read_optdrops_db_pre; + struct HPMHookPoint *HP_mob_read_optdrops_db_post; struct HPMHookPoint *HP_mob_readdb_pre; struct HPMHookPoint *HP_mob_readdb_post; struct HPMHookPoint *HP_mob_lookup_const_pre; @@ -3934,12 +4086,16 @@ struct { struct HPMHookPoint *HP_mob_read_db_mvpdrops_sub_post; struct HPMHookPoint *HP_mob_read_db_mode_sub_pre; struct HPMHookPoint *HP_mob_read_db_mode_sub_post; + struct HPMHookPoint *HP_mob_read_db_drops_option_pre; + struct HPMHookPoint *HP_mob_read_db_drops_option_post; struct HPMHookPoint *HP_mob_read_db_stats_sub_pre; struct HPMHookPoint *HP_mob_read_db_stats_sub_post; + struct HPMHookPoint *HP_mob_read_db_viewdata_sub_pre; + struct HPMHookPoint *HP_mob_read_db_viewdata_sub_post; struct HPMHookPoint *HP_mob_name_constants_pre; struct HPMHookPoint *HP_mob_name_constants_post; - struct HPMHookPoint *HP_mob_readdb_mobavail_pre; - struct HPMHookPoint *HP_mob_readdb_mobavail_post; + struct HPMHookPoint *HP_mob_mobavail_removal_notice_pre; + struct HPMHookPoint *HP_mob_mobavail_removal_notice_post; struct HPMHookPoint *HP_mob_read_randommonster_pre; struct HPMHookPoint *HP_mob_read_randommonster_post; struct HPMHookPoint *HP_mob_parse_row_chatdb_pre; @@ -3964,6 +4120,8 @@ struct { struct HPMHookPoint *HP_mob_final_ratio_sub_post; struct HPMHookPoint *HP_mob_destroy_mob_db_pre; struct HPMHookPoint *HP_mob_destroy_mob_db_post; + struct HPMHookPoint *HP_mob_destroy_drop_groups_pre; + struct HPMHookPoint *HP_mob_destroy_drop_groups_post; struct HPMHookPoint *HP_mob_skill_db_libconfig_pre; struct HPMHookPoint *HP_mob_skill_db_libconfig_post; struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_pre; @@ -4214,6 +4372,8 @@ struct { struct HPMHookPoint *HP_npc_trader_update_post; struct HPMHookPoint *HP_npc_market_buylist_pre; struct HPMHookPoint *HP_npc_market_buylist_post; + struct HPMHookPoint *HP_npc_barter_buylist_pre; + struct HPMHookPoint *HP_npc_barter_buylist_post; struct HPMHookPoint *HP_npc_trader_open_pre; struct HPMHookPoint *HP_npc_trader_open_post; struct HPMHookPoint *HP_npc_market_fromsql_pre; @@ -4224,14 +4384,32 @@ struct { struct HPMHookPoint *HP_npc_market_delfromsql_post; struct HPMHookPoint *HP_npc_market_delfromsql_sub_pre; struct HPMHookPoint *HP_npc_market_delfromsql_sub_post; + struct HPMHookPoint *HP_npc_barter_fromsql_pre; + struct HPMHookPoint *HP_npc_barter_fromsql_post; + struct HPMHookPoint *HP_npc_barter_tosql_pre; + struct HPMHookPoint *HP_npc_barter_tosql_post; + struct HPMHookPoint *HP_npc_barter_delfromsql_pre; + struct HPMHookPoint *HP_npc_barter_delfromsql_post; + struct HPMHookPoint *HP_npc_barter_delfromsql_sub_pre; + struct HPMHookPoint *HP_npc_barter_delfromsql_sub_post; struct HPMHookPoint *HP_npc_db_checkid_pre; struct HPMHookPoint *HP_npc_db_checkid_post; struct HPMHookPoint *HP_npc_refresh_pre; struct HPMHookPoint *HP_npc_refresh_post; + struct HPMHookPoint *HP_npc_questinfo_clear_pre; + struct HPMHookPoint *HP_npc_questinfo_clear_post; struct HPMHookPoint *HP_npc_secure_timeout_timer_pre; struct HPMHookPoint *HP_npc_secure_timeout_timer_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; struct HPMHookPoint *HP_nullpo_assert_report_post; + struct HPMHookPoint *HP_packets_init_pre; + struct HPMHookPoint *HP_packets_init_post; + struct HPMHookPoint *HP_packets_final_pre; + struct HPMHookPoint *HP_packets_final_post; + struct HPMHookPoint *HP_packets_addLens_pre; + struct HPMHookPoint *HP_packets_addLens_post; + struct HPMHookPoint *HP_packets_addLen_pre; + struct HPMHookPoint *HP_packets_addLen_post; struct HPMHookPoint *HP_party_init_pre; struct HPMHookPoint *HP_party_init_post; struct HPMHookPoint *HP_party_final_pre; @@ -4286,8 +4464,6 @@ struct { struct HPMHookPoint *HP_party_send_logout_post; struct HPMHookPoint *HP_party_send_message_pre; struct HPMHookPoint *HP_party_send_message_post; - struct HPMHookPoint *HP_party_recv_message_pre; - struct HPMHookPoint *HP_party_recv_message_post; struct HPMHookPoint *HP_party_skill_check_pre; struct HPMHookPoint *HP_party_skill_check_post; struct HPMHookPoint *HP_party_send_xy_clear_pre; @@ -4832,8 +5008,14 @@ struct { struct HPMHookPoint *HP_pc_update_idle_time_post; struct HPMHookPoint *HP_pc_have_magnifier_pre; struct HPMHookPoint *HP_pc_have_magnifier_post; + struct HPMHookPoint *HP_pc_have_item_chain_pre; + struct HPMHookPoint *HP_pc_have_item_chain_post; struct HPMHookPoint *HP_pc_process_chat_message_pre; struct HPMHookPoint *HP_pc_process_chat_message_post; + struct HPMHookPoint *HP_pc_wis_message_to_gm_pre; + struct HPMHookPoint *HP_pc_wis_message_to_gm_post; + struct HPMHookPoint *HP_pc_wis_message_to_gm_sub_pre; + struct HPMHookPoint *HP_pc_wis_message_to_gm_sub_post; struct HPMHookPoint *HP_pc_check_supernovice_call_pre; struct HPMHookPoint *HP_pc_check_supernovice_call_post; struct HPMHookPoint *HP_pc_check_basicskill_pre; @@ -4842,6 +5024,10 @@ struct { struct HPMHookPoint *HP_pc_isDeathPenaltyJob_post; struct HPMHookPoint *HP_pc_has_second_costume_pre; struct HPMHookPoint *HP_pc_has_second_costume_post; + struct HPMHookPoint *HP_pc_expandInventory_pre; + struct HPMHookPoint *HP_pc_expandInventory_post; + struct HPMHookPoint *HP_pc_auto_exp_insurance_pre; + struct HPMHookPoint *HP_pc_auto_exp_insurance_post; struct HPMHookPoint *HP_libpcre_compile_pre; struct HPMHookPoint *HP_libpcre_compile_post; struct HPMHookPoint *HP_libpcre_study_pre; @@ -4996,8 +5182,38 @@ struct { struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_type_post; struct HPMHookPoint *HP_quest_questinfo_validate_quests_pre; struct HPMHookPoint *HP_quest_questinfo_validate_quests_post; - struct HPMHookPoint *HP_quest_questinfo_vector_clear_pre; - struct HPMHookPoint *HP_quest_questinfo_vector_clear_post; + struct HPMHookPoint *HP_quest_questinfo_validate_mercenary_class_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_mercenary_class_post; + struct HPMHookPoint *HP_refine_init_pre; + struct HPMHookPoint *HP_refine_init_post; + struct HPMHookPoint *HP_refine_final_pre; + struct HPMHookPoint *HP_refine_final_post; + struct HPMHookPoint *HP_refine_get_refine_chance_pre; + struct HPMHookPoint *HP_refine_get_refine_chance_post; + struct HPMHookPoint *HP_refine_get_bonus_pre; + struct HPMHookPoint *HP_refine_get_bonus_post; + struct HPMHookPoint *HP_refine_get_randombonus_max_pre; + struct HPMHookPoint *HP_refine_get_randombonus_max_post; + struct HPMHookPoint *HP_refine_refinery_add_item_pre; + struct HPMHookPoint *HP_refine_refinery_add_item_post; + struct HPMHookPoint *HP_refine_refinery_refine_request_pre; + struct HPMHookPoint *HP_refine_refinery_refine_request_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_sub_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_sub_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_post; + struct HPMHookPoint *HP_PRIV__refine_announce_behavior_string2enum_pre; + struct HPMHookPoint *HP_PRIV__refine_announce_behavior_string2enum_post; + struct HPMHookPoint *HP_PRIV__refine_failure_behavior_string2enum_pre; + struct HPMHookPoint *HP_PRIV__refine_failure_behavior_string2enum_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_items_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_items_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_sub_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_post; + struct HPMHookPoint *HP_PRIV__refine_is_refinable_pre; + struct HPMHookPoint *HP_PRIV__refine_is_refinable_post; struct HPMHookPoint *HP_rnd_init_pre; struct HPMHookPoint *HP_rnd_init_post; struct HPMHookPoint *HP_rnd_final_pre; @@ -5048,6 +5264,10 @@ struct { struct HPMHookPoint *HP_rodex_delete_mail_post; struct HPMHookPoint *HP_rodex_clean_pre; struct HPMHookPoint *HP_rodex_clean_post; + struct HPMHookPoint *HP_rodex_getZenyAck_pre; + struct HPMHookPoint *HP_rodex_getZenyAck_post; + struct HPMHookPoint *HP_rodex_getItemsAck_pre; + struct HPMHookPoint *HP_rodex_getItemsAck_post; struct HPMHookPoint *HP_script_init_pre; struct HPMHookPoint *HP_script_init_post; struct HPMHookPoint *HP_script_final_pre; @@ -5396,6 +5616,8 @@ struct { struct HPMHookPoint *HP_script_load_translations_post; struct HPMHookPoint *HP_script_load_translation_addstring_pre; struct HPMHookPoint *HP_script_load_translation_addstring_post; + struct HPMHookPoint *HP_script_load_translation_file_pre; + struct HPMHookPoint *HP_script_load_translation_file_post; struct HPMHookPoint *HP_script_load_translation_pre; struct HPMHookPoint *HP_script_load_translation_post; struct HPMHookPoint *HP_script_translation_db_destroyer_pre; @@ -5406,8 +5628,8 @@ struct { struct HPMHookPoint *HP_script_parse_cleanup_timer_post; struct HPMHookPoint *HP_script_add_language_pre; struct HPMHookPoint *HP_script_add_language_post; - struct HPMHookPoint *HP_script_get_translation_file_name_pre; - struct HPMHookPoint *HP_script_get_translation_file_name_post; + struct HPMHookPoint *HP_script_get_translation_dir_name_pre; + struct HPMHookPoint *HP_script_get_translation_dir_name_post; struct HPMHookPoint *HP_script_parser_clean_leftovers_pre; struct HPMHookPoint *HP_script_parser_clean_leftovers_post; struct HPMHookPoint *HP_script_run_use_script_pre; @@ -5416,6 +5638,12 @@ struct { struct HPMHookPoint *HP_script_run_item_equip_script_post; struct HPMHookPoint *HP_script_run_item_unequip_script_pre; struct HPMHookPoint *HP_script_run_item_unequip_script_post; + struct HPMHookPoint *HP_script_run_item_rental_end_script_pre; + struct HPMHookPoint *HP_script_run_item_rental_end_script_post; + struct HPMHookPoint *HP_script_run_item_rental_start_script_pre; + struct HPMHookPoint *HP_script_run_item_rental_start_script_post; + struct HPMHookPoint *HP_script_run_item_lapineddukddak_script_pre; + struct HPMHookPoint *HP_script_run_item_lapineddukddak_script_post; struct HPMHookPoint *HP_searchstore_open_pre; struct HPMHookPoint *HP_searchstore_open_post; struct HPMHookPoint *HP_searchstore_query_pre; @@ -5702,6 +5930,8 @@ struct { struct HPMHookPoint *HP_skill_cell_overlap_post; struct HPMHookPoint *HP_skill_timerskill_pre; struct HPMHookPoint *HP_skill_timerskill_post; + struct HPMHookPoint *HP_skill_trap_do_splash_pre; + struct HPMHookPoint *HP_skill_trap_do_splash_post; struct HPMHookPoint *HP_skill_trap_splash_pre; struct HPMHookPoint *HP_skill_trap_splash_post; struct HPMHookPoint *HP_skill_check_condition_mercenary_pre; @@ -5948,10 +6178,14 @@ struct { struct HPMHookPoint *HP_sockt_realloc_writefifo_post; struct HPMHookPoint *HP_sockt_wfifoset_pre; struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_wfifohead_pre; + struct HPMHookPoint *HP_sockt_wfifohead_post; struct HPMHookPoint *HP_sockt_rfifoskip_pre; struct HPMHookPoint *HP_sockt_rfifoskip_post; struct HPMHookPoint *HP_sockt_close_pre; struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_validateWfifo_pre; + struct HPMHookPoint *HP_sockt_validateWfifo_post; struct HPMHookPoint *HP_sockt_session_is_valid_pre; struct HPMHookPoint *HP_sockt_session_is_valid_post; struct HPMHookPoint *HP_sockt_session_is_active_pre; @@ -5960,6 +6194,8 @@ struct { struct HPMHookPoint *HP_sockt_flush_post; struct HPMHookPoint *HP_sockt_flush_fifos_pre; struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_connect_client_pre; + struct HPMHookPoint *HP_sockt_connect_client_post; struct HPMHookPoint *HP_sockt_set_nonblocking_pre; struct HPMHookPoint *HP_sockt_set_nonblocking_post; struct HPMHookPoint *HP_sockt_set_defaultparse_pre; @@ -6054,18 +6290,18 @@ struct { struct HPMHookPoint *HP_status_init_post; struct HPMHookPoint *HP_status_final_pre; struct HPMHookPoint *HP_status_final_post; - struct HPMHookPoint *HP_status_get_refine_chance_pre; - struct HPMHookPoint *HP_status_get_refine_chance_post; struct HPMHookPoint *HP_status_skill2sc_pre; struct HPMHookPoint *HP_status_skill2sc_post; struct HPMHookPoint *HP_status_sc2skill_pre; struct HPMHookPoint *HP_status_sc2skill_post; struct HPMHookPoint *HP_status_sc2scb_flag_pre; struct HPMHookPoint *HP_status_sc2scb_flag_post; - struct HPMHookPoint *HP_status_type2relevant_bl_types_pre; - struct HPMHookPoint *HP_status_type2relevant_bl_types_post; + struct HPMHookPoint *HP_status_get_sc_relevant_bl_types_pre; + struct HPMHookPoint *HP_status_get_sc_relevant_bl_types_post; struct HPMHookPoint *HP_status_get_sc_type_pre; struct HPMHookPoint *HP_status_get_sc_type_post; + struct HPMHookPoint *HP_status_get_sc_icon_pre; + struct HPMHookPoint *HP_status_get_sc_icon_post; struct HPMHookPoint *HP_status_damage_pre; struct HPMHookPoint *HP_status_damage_post; struct HPMHookPoint *HP_status_charge_pre; @@ -6126,6 +6362,8 @@ struct { struct HPMHookPoint *HP_status_get_sc_def_post; struct HPMHookPoint *HP_status_change_start_pre; struct HPMHookPoint *HP_status_change_start_post; + struct HPMHookPoint *HP_status_change_start_sub_pre; + struct HPMHookPoint *HP_status_change_start_sub_post; struct HPMHookPoint *HP_status_change_end__pre; struct HPMHookPoint *HP_status_change_end__post; struct HPMHookPoint *HP_status_is_immune_to_status_pre; @@ -6220,6 +6458,10 @@ struct { struct HPMHookPoint *HP_status_get_base_maxhp_post; struct HPMHookPoint *HP_status_get_base_maxsp_pre; struct HPMHookPoint *HP_status_get_base_maxsp_post; + struct HPMHookPoint *HP_status_get_restart_hp_pre; + struct HPMHookPoint *HP_status_get_restart_hp_post; + struct HPMHookPoint *HP_status_get_restart_sp_pre; + struct HPMHookPoint *HP_status_get_restart_sp_post; struct HPMHookPoint *HP_status_calc_npc__pre; struct HPMHookPoint *HP_status_calc_npc__post; struct HPMHookPoint *HP_status_calc_str_pre; @@ -6282,12 +6524,14 @@ struct { struct HPMHookPoint *HP_status_readdb_job2_post; struct HPMHookPoint *HP_status_readdb_sizefix_pre; struct HPMHookPoint *HP_status_readdb_sizefix_post; - struct HPMHookPoint *HP_status_readdb_refine_libconfig_pre; - struct HPMHookPoint *HP_status_readdb_refine_libconfig_post; - struct HPMHookPoint *HP_status_readdb_refine_libconfig_sub_pre; - struct HPMHookPoint *HP_status_readdb_refine_libconfig_sub_post; - struct HPMHookPoint *HP_status_readdb_scconfig_pre; - struct HPMHookPoint *HP_status_readdb_scconfig_post; + struct HPMHookPoint *HP_status_read_scdb_libconfig_pre; + struct HPMHookPoint *HP_status_read_scdb_libconfig_post; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_pre; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_post; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_flag_pre; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_flag_post; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_flag_additional_pre; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_flag_additional_post; struct HPMHookPoint *HP_status_read_job_db_pre; struct HPMHookPoint *HP_status_read_job_db_post; struct HPMHookPoint *HP_status_read_job_db_sub_pre; @@ -6376,6 +6620,24 @@ struct { struct HPMHookPoint *HP_strlib_strline__post; struct HPMHookPoint *HP_strlib_bin2hex__pre; struct HPMHookPoint *HP_strlib_bin2hex__post; + struct HPMHookPoint *HP_stylist_init_pre; + struct HPMHookPoint *HP_stylist_init_post; + struct HPMHookPoint *HP_stylist_final_pre; + struct HPMHookPoint *HP_stylist_final_post; + struct HPMHookPoint *HP_stylist_vector_init_pre; + struct HPMHookPoint *HP_stylist_vector_init_post; + struct HPMHookPoint *HP_stylist_vector_clear_pre; + struct HPMHookPoint *HP_stylist_vector_clear_post; + struct HPMHookPoint *HP_stylist_read_db_libconfig_pre; + struct HPMHookPoint *HP_stylist_read_db_libconfig_post; + struct HPMHookPoint *HP_stylist_read_db_libconfig_sub_pre; + struct HPMHookPoint *HP_stylist_read_db_libconfig_sub_post; + struct HPMHookPoint *HP_stylist_request_style_change_pre; + struct HPMHookPoint *HP_stylist_request_style_change_post; + struct HPMHookPoint *HP_stylist_validate_requirements_pre; + struct HPMHookPoint *HP_stylist_validate_requirements_post; + struct HPMHookPoint *HP_stylist_send_rodexitem_pre; + struct HPMHookPoint *HP_stylist_send_rodexitem_post; struct HPMHookPoint *HP_sv_parse_next_pre; struct HPMHookPoint *HP_sv_parse_next_post; struct HPMHookPoint *HP_sv_parse_pre; @@ -6719,6 +6981,10 @@ struct { int HP_achievement_check_title_post; int HP_achievement_get_rewards_pre; int HP_achievement_get_rewards_post; + int HP_achievement_get_rewards_buffs_pre; + int HP_achievement_get_rewards_buffs_post; + int HP_achievement_get_rewards_items_pre; + int HP_achievement_get_rewards_items_post; int HP_atcommand_init_pre; int HP_atcommand_init_post; int HP_atcommand_final_pre; @@ -6815,6 +7081,8 @@ struct { int HP_battle_drain_post; int HP_battle_reflect_damage_pre; int HP_battle_reflect_damage_post; + int HP_battle_reflect_trap_pre; + int HP_battle_reflect_trap_post; int HP_battle_attr_ratio_pre; int HP_battle_attr_ratio_post; int HP_battle_attr_fix_pre; @@ -7463,12 +7731,18 @@ struct { int HP_clif_fame_taekwon_post; int HP_clif_ranklist_pre; int HP_clif_ranklist_post; + int HP_clif_ranklist_sub_pre; + int HP_clif_ranklist_sub_post; + int HP_clif_ranklist_sub2_pre; + int HP_clif_ranklist_sub2_post; int HP_clif_update_rankingpoint_pre; int HP_clif_update_rankingpoint_post; int HP_clif_pRanklist_pre; int HP_clif_pRanklist_post; int HP_clif_hotkeys_pre; int HP_clif_hotkeys_post; + int HP_clif_hotkeysAll_pre; + int HP_clif_hotkeysAll_post; int HP_clif_insight_pre; int HP_clif_insight_post; int HP_clif_outsight_pre; @@ -7493,6 +7767,8 @@ struct { int HP_clif_combo_delay_post; int HP_clif_status_change_pre; int HP_clif_status_change_post; + int HP_clif_status_change_sub_pre; + int HP_clif_status_change_sub_post; int HP_clif_insert_card_pre; int HP_clif_insert_card_post; int HP_clif_inventoryList_pre; @@ -7507,6 +7783,18 @@ struct { int HP_clif_cartList_post; int HP_clif_cartItems_pre; int HP_clif_cartItems_post; + int HP_clif_inventoryExpansionInfo_pre; + int HP_clif_inventoryExpansionInfo_post; + int HP_clif_inventoryExpandAck_pre; + int HP_clif_inventoryExpandAck_post; + int HP_clif_inventoryExpandResult_pre; + int HP_clif_inventoryExpandResult_post; + int HP_clif_pInventoryExpansion_pre; + int HP_clif_pInventoryExpansion_post; + int HP_clif_pInventoryExpansionConfirmed_pre; + int HP_clif_pInventoryExpansionConfirmed_post; + int HP_clif_pInventoryExpansionRejected_pre; + int HP_clif_pInventoryExpansionRejected_post; int HP_clif_favorite_item_pre; int HP_clif_favorite_item_post; int HP_clif_clearcart_pre; @@ -7533,8 +7821,32 @@ struct { int HP_clif_mvp_noitem_post; int HP_clif_changed_dir_pre; int HP_clif_changed_dir_post; - int HP_clif_charnameack_pre; - int HP_clif_charnameack_post; + int HP_clif_blname_ack_pre; + int HP_clif_blname_ack_post; + int HP_clif_pcname_ack_pre; + int HP_clif_pcname_ack_post; + int HP_clif_homname_ack_pre; + int HP_clif_homname_ack_post; + int HP_clif_mername_ack_pre; + int HP_clif_mername_ack_post; + int HP_clif_petname_ack_pre; + int HP_clif_petname_ack_post; + int HP_clif_npcname_ack_pre; + int HP_clif_npcname_ack_post; + int HP_clif_mobname_ack_pre; + int HP_clif_mobname_ack_post; + int HP_clif_mobname_guardian_ack_pre; + int HP_clif_mobname_guardian_ack_post; + int HP_clif_mobname_additional_ack_pre; + int HP_clif_mobname_additional_ack_post; + int HP_clif_mobname_normal_ack_pre; + int HP_clif_mobname_normal_ack_post; + int HP_clif_chatname_ack_pre; + int HP_clif_chatname_ack_post; + int HP_clif_elemname_ack_pre; + int HP_clif_elemname_ack_post; + int HP_clif_unknownname_ack_pre; + int HP_clif_unknownname_ack_post; int HP_clif_monster_hp_bar_pre; int HP_clif_monster_hp_bar_post; int HP_clif_hpmeter_pre; @@ -7687,6 +7999,12 @@ struct { int HP_clif_specialeffect_single_post; int HP_clif_specialeffect_value_pre; int HP_clif_specialeffect_value_post; + int HP_clif_specialeffect_value_single_pre; + int HP_clif_specialeffect_value_single_post; + int HP_clif_removeSpecialEffect_pre; + int HP_clif_removeSpecialEffect_post; + int HP_clif_removeSpecialEffect_single_pre; + int HP_clif_removeSpecialEffect_single_post; int HP_clif_millenniumshield_pre; int HP_clif_millenniumshield_post; int HP_clif_spiritcharm_pre; @@ -7717,6 +8035,8 @@ struct { int HP_clif_addchat_post; int HP_clif_changechatowner_pre; int HP_clif_changechatowner_post; + int HP_clif_chatRoleChange_pre; + int HP_clif_chatRoleChange_post; int HP_clif_clearchat_pre; int HP_clif_clearchat_post; int HP_clif_leavechat_pre; @@ -7737,6 +8057,8 @@ struct { int HP_clif_messagecolor_self_post; int HP_clif_messagecolor_pre; int HP_clif_messagecolor_post; + int HP_clif_serviceMessageColor_pre; + int HP_clif_serviceMessageColor_post; int HP_clif_disp_overhead_pre; int HP_clif_disp_overhead_post; int HP_clif_notify_playerchat_pre; @@ -7829,6 +8151,8 @@ struct { int HP_clif_addskill_post; int HP_clif_deleteskill_pre; int HP_clif_deleteskill_post; + int HP_clif_playerSkillToPacket_pre; + int HP_clif_playerSkillToPacket_post; int HP_clif_party_created_pre; int HP_clif_party_created_post; int HP_clif_party_member_info_pre; @@ -7871,6 +8195,10 @@ struct { int HP_clif_guild_basicinfo_post; int HP_clif_guild_allianceinfo_pre; int HP_clif_guild_allianceinfo_post; + int HP_clif_guild_castlelist_pre; + int HP_clif_guild_castlelist_post; + int HP_clif_guild_castleinfo_pre; + int HP_clif_guild_castleinfo_post; int HP_clif_guild_memberlist_pre; int HP_clif_guild_memberlist_post; int HP_clif_guild_skillinfo_pre; @@ -8173,6 +8501,8 @@ struct { int HP_clif_parse_roulette_db_post; int HP_clif_roulette_generate_ack_pre; int HP_clif_roulette_generate_ack_post; + int HP_clif_roulette_close_pre; + int HP_clif_roulette_close_post; int HP_clif_openmergeitem_pre; int HP_clif_openmergeitem_post; int HP_clif_cancelmergeitem_pre; @@ -8181,6 +8511,8 @@ struct { int HP_clif_comparemergeitem_post; int HP_clif_ackmergeitems_pre; int HP_clif_ackmergeitems_post; + int HP_clif_mergeitems_pre; + int HP_clif_mergeitems_post; int HP_clif_isdisguised_pre; int HP_clif_isdisguised_post; int HP_clif_navigate_to_pre; @@ -8205,8 +8537,10 @@ struct { int HP_clif_pLoadEndAck_post; int HP_clif_pTickSend_pre; int HP_clif_pTickSend_post; - int HP_clif_pHotkey_pre; - int HP_clif_pHotkey_post; + int HP_clif_pHotkey1_pre; + int HP_clif_pHotkey1_post; + int HP_clif_pHotkey2_pre; + int HP_clif_pHotkey2_post; int HP_clif_pProgressbar_pre; int HP_clif_pProgressbar_post; int HP_clif_pWalkToXY_pre; @@ -8291,8 +8625,14 @@ struct { int HP_clif_pStatusUp_post; int HP_clif_pSkillUp_pre; int HP_clif_pSkillUp_post; + int HP_clif_useSkillToIdReal_pre; + int HP_clif_useSkillToIdReal_post; int HP_clif_pUseSkillToId_pre; int HP_clif_pUseSkillToId_post; + int HP_clif_pStartUseSkillToId_pre; + int HP_clif_pStartUseSkillToId_post; + int HP_clif_pStopUseSkillToId_pre; + int HP_clif_pStopUseSkillToId_post; int HP_clif_pUseSkillToId_homun_pre; int HP_clif_pUseSkillToId_homun_post; int HP_clif_pUseSkillToId_mercenary_pre; @@ -8605,8 +8945,12 @@ struct { int HP_clif_pBGQueueRevokeReq_post; int HP_clif_pBGQueueBattleBeginAck_pre; int HP_clif_pBGQueueBattleBeginAck_post; - int HP_clif_pCashShopOpen_pre; - int HP_clif_pCashShopOpen_post; + int HP_clif_pCashShopOpen1_pre; + int HP_clif_pCashShopOpen1_post; + int HP_clif_pCashShopOpen2_pre; + int HP_clif_pCashShopOpen2_post; + int HP_clif_pCashShopLimitedReq_pre; + int HP_clif_pCashShopLimitedReq_post; int HP_clif_pCashShopClose_pre; int HP_clif_pCashShopClose_post; int HP_clif_pCashShopReqTab_pre; @@ -8619,6 +8963,10 @@ struct { int HP_clif_pPartyTick_post; int HP_clif_pGuildInvite2_pre; int HP_clif_pGuildInvite2_post; + int HP_clif_cashShopBuyAck_pre; + int HP_clif_cashShopBuyAck_post; + int HP_clif_cashShopOpen_pre; + int HP_clif_cashShopOpen_post; int HP_clif_pPartyBookingAddFilter_pre; int HP_clif_pPartyBookingAddFilter_post; int HP_clif_pPartyBookingSubFilter_pre; @@ -8657,8 +9005,10 @@ struct { int HP_clif_pNPCMarketPurchase_post; int HP_clif_add_item_options_pre; int HP_clif_add_item_options_post; - int HP_clif_pHotkeyRowShift_pre; - int HP_clif_pHotkeyRowShift_post; + int HP_clif_pHotkeyRowShift1_pre; + int HP_clif_pHotkeyRowShift1_post; + int HP_clif_pHotkeyRowShift2_pre; + int HP_clif_pHotkeyRowShift2_post; int HP_clif_dressroom_open_pre; int HP_clif_dressroom_open_post; int HP_clif_pOneClick_ItemIdentify_pre; @@ -8763,24 +9113,12 @@ struct { int HP_clif_pPrivateAirshipRequest_post; int HP_clif_PrivateAirshipResponse_pre; int HP_clif_PrivateAirshipResponse_post; - int HP_clif_stylist_vector_init_pre; - int HP_clif_stylist_vector_init_post; - int HP_clif_stylist_vector_clear_pre; - int HP_clif_stylist_vector_clear_post; - int HP_clif_stylist_read_db_libconfig_pre; - int HP_clif_stylist_read_db_libconfig_post; - int HP_clif_stylist_read_db_libconfig_sub_pre; - int HP_clif_stylist_read_db_libconfig_sub_post; - int HP_clif_style_change_validate_requirements_pre; - int HP_clif_style_change_validate_requirements_post; - int HP_clif_stylist_send_rodexitem_pre; - int HP_clif_stylist_send_rodexitem_post; int HP_clif_pReqStyleChange_pre; int HP_clif_pReqStyleChange_post; int HP_clif_pReqStyleChange2_pre; int HP_clif_pReqStyleChange2_post; - int HP_clif_cz_req_style_change_sub_pre; - int HP_clif_cz_req_style_change_sub_post; + int HP_clif_pStyleClose_pre; + int HP_clif_pStyleClose_post; int HP_clif_style_change_response_pre; int HP_clif_style_change_response_post; int HP_clif_pPetEvolution_pre; @@ -8791,6 +9129,68 @@ struct { int HP_clif_party_dead_notification_post; int HP_clif_pMemorialDungeonCommand_pre; int HP_clif_pMemorialDungeonCommand_post; + int HP_clif_camera_showWindow_pre; + int HP_clif_camera_showWindow_post; + int HP_clif_camera_change_pre; + int HP_clif_camera_change_post; + int HP_clif_pCameraInfo_pre; + int HP_clif_pCameraInfo_post; + int HP_clif_item_preview_pre; + int HP_clif_item_preview_post; + int HP_clif_enchant_equipment_pre; + int HP_clif_enchant_equipment_post; + int HP_clif_pReqRemainTime_pre; + int HP_clif_pReqRemainTime_post; + int HP_clif_npc_barter_open_pre; + int HP_clif_npc_barter_open_post; + int HP_clif_pNPCBarterClosed_pre; + int HP_clif_pNPCBarterClosed_post; + int HP_clif_pNPCBarterPurchase_pre; + int HP_clif_pNPCBarterPurchase_post; + int HP_clif_pClientVersion_pre; + int HP_clif_pClientVersion_post; + int HP_clif_pPing_pre; + int HP_clif_pPing_post; + int HP_clif_ping_pre; + int HP_clif_ping_post; + int HP_clif_pingTimer_pre; + int HP_clif_pingTimer_post; + int HP_clif_pingTimerSub_pre; + int HP_clif_pingTimerSub_post; + int HP_clif_pResetCooldown_pre; + int HP_clif_pResetCooldown_post; + int HP_clif_loadConfirm_pre; + int HP_clif_loadConfirm_post; + int HP_clif_send_selforarea_pre; + int HP_clif_send_selforarea_post; + int HP_clif_OpenRefineryUI_pre; + int HP_clif_OpenRefineryUI_post; + int HP_clif_pAddItemRefineryUI_pre; + int HP_clif_pAddItemRefineryUI_post; + int HP_clif_AddItemRefineryUIAck_pre; + int HP_clif_AddItemRefineryUIAck_post; + int HP_clif_pRefineryUIClose_pre; + int HP_clif_pRefineryUIClose_post; + int HP_clif_pRefineryUIRefine_pre; + int HP_clif_pRefineryUIRefine_post; + int HP_clif_announce_refine_status_pre; + int HP_clif_announce_refine_status_post; + int HP_clif_pGuildCastleTeleportRequest_pre; + int HP_clif_pGuildCastleTeleportRequest_post; + int HP_clif_pGuildCastleInfoRequest_pre; + int HP_clif_pGuildCastleInfoRequest_post; + int HP_clif_guild_castleteleport_res_pre; + int HP_clif_guild_castleteleport_res_post; + int HP_clif_lapineDdukDdak_open_pre; + int HP_clif_lapineDdukDdak_open_post; + int HP_clif_lapineDdukDdak_result_pre; + int HP_clif_lapineDdukDdak_result_post; + int HP_clif_plapineDdukDdak_ack_pre; + int HP_clif_plapineDdukDdak_ack_post; + int HP_clif_plapineDdukDdak_close_pre; + int HP_clif_plapineDdukDdak_close_post; + int HP_clif_pReqGearOff_pre; + int HP_clif_pReqGearOff_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -9049,8 +9449,6 @@ struct { int HP_guild_emblem_changed_post; int HP_guild_send_message_pre; int HP_guild_send_message_post; - int HP_guild_recv_message_pre; - int HP_guild_recv_message_post; int HP_guild_send_dot_remove_pre; int HP_guild_send_dot_remove_post; int HP_guild_skillupack_pre; @@ -9095,8 +9493,12 @@ struct { int HP_guild_sd_check_post; int HP_guild_read_guildskill_tree_db_pre; int HP_guild_read_guildskill_tree_db_post; - int HP_guild_read_castledb_pre; - int HP_guild_read_castledb_post; + int HP_guild_read_castledb_libconfig_pre; + int HP_guild_read_castledb_libconfig_post; + int HP_guild_read_castledb_libconfig_sub_pre; + int HP_guild_read_castledb_libconfig_sub_post; + int HP_guild_read_castledb_libconfig_sub_warp_pre; + int HP_guild_read_castledb_libconfig_sub_warp_post; int HP_guild_payexp_timer_sub_pre; int HP_guild_payexp_timer_sub_post; int HP_guild_send_xy_timer_sub_pre; @@ -9193,6 +9595,8 @@ struct { int HP_homun_mutate_post; int HP_homun_gainexp_pre; int HP_homun_gainexp_post; + int HP_homun_gainexp_real_pre; + int HP_homun_gainexp_real_post; int HP_homun_add_intimacy_pre; int HP_homun_add_intimacy_post; int HP_homun_consume_intimacy_pre; @@ -9291,16 +9695,6 @@ struct { int HP_intif_parse_post; int HP_intif_create_pet_pre; int HP_intif_create_pet_post; - int HP_intif_broadcast_pre; - int HP_intif_broadcast_post; - int HP_intif_broadcast2_pre; - int HP_intif_broadcast2_post; - int HP_intif_main_message_pre; - int HP_intif_main_message_post; - int HP_intif_wis_message_pre; - int HP_intif_wis_message_post; - int HP_intif_wis_message_to_gm_pre; - int HP_intif_wis_message_to_gm_post; int HP_intif_saveregistry_pre; int HP_intif_saveregistry_post; int HP_intif_request_registry_pre; @@ -9327,8 +9721,6 @@ struct { int HP_intif_party_changemap_post; int HP_intif_break_party_pre; int HP_intif_break_party_post; - int HP_intif_party_message_pre; - int HP_intif_party_message_post; int HP_intif_party_leaderchange_pre; int HP_intif_party_leaderchange_post; int HP_intif_guild_create_pre; @@ -9343,8 +9735,6 @@ struct { int HP_intif_guild_memberinfoshort_post; int HP_intif_guild_break_pre; int HP_intif_guild_break_post; - int HP_intif_guild_message_pre; - int HP_intif_guild_message_post; int HP_intif_guild_change_gm_pre; int HP_intif_guild_change_gm_post; int HP_intif_guild_change_basicinfo_pre; @@ -9435,6 +9825,10 @@ struct { int HP_intif_rodex_sendmail_post; int HP_intif_rodex_checkname_pre; int HP_intif_rodex_checkname_post; + int HP_intif_pGetZenyAck_pre; + int HP_intif_pGetZenyAck_post; + int HP_intif_pGetItemsAck_pre; + int HP_intif_pGetItemsAck_post; int HP_intif_clan_kickoffline_pre; int HP_intif_clan_kickoffline_post; int HP_intif_clan_membercount_pre; @@ -9447,14 +9841,6 @@ struct { int HP_intif_achievements_request_post; int HP_intif_achievements_save_pre; int HP_intif_achievements_save_post; - int HP_intif_pWisMessage_pre; - int HP_intif_pWisMessage_post; - int HP_intif_pWisEnd_pre; - int HP_intif_pWisEnd_post; - int HP_intif_pWisToGM_sub_pre; - int HP_intif_pWisToGM_sub_post; - int HP_intif_pWisToGM_pre; - int HP_intif_pWisToGM_post; int HP_intif_pRegisters_pre; int HP_intif_pRegisters_post; int HP_intif_pAccountStorage_pre; @@ -9483,8 +9869,6 @@ struct { int HP_intif_pPartyMove_post; int HP_intif_pPartyBroken_pre; int HP_intif_pPartyBroken_post; - int HP_intif_pPartyMessage_pre; - int HP_intif_pPartyMessage_post; int HP_intif_pGuildCreated_pre; int HP_intif_pGuildCreated_post; int HP_intif_pGuildInfo_pre; @@ -9497,8 +9881,6 @@ struct { int HP_intif_pGuildMemberInfoShort_post; int HP_intif_pGuildBroken_pre; int HP_intif_pGuildBroken_post; - int HP_intif_pGuildMessage_pre; - int HP_intif_pGuildMessage_post; int HP_intif_pGuildBasicInfoChanged_pre; int HP_intif_pGuildBasicInfoChanged_post; int HP_intif_pGuildMemberInfoChanged_pre; @@ -9715,10 +10097,10 @@ struct { int HP_itemdb_isidentified_post; int HP_itemdb_isidentified2_pre; int HP_itemdb_isidentified2_post; - int HP_itemdb_combo_split_atoi_pre; - int HP_itemdb_combo_split_atoi_post; - int HP_itemdb_read_combos_pre; - int HP_itemdb_read_combos_post; + int HP_itemdb_read_combodb_libconfig_pre; + int HP_itemdb_read_combodb_libconfig_post; + int HP_itemdb_read_combodb_libconfig_sub_pre; + int HP_itemdb_read_combodb_libconfig_sub_post; int HP_itemdb_gendercheck_pre; int HP_itemdb_gendercheck_post; int HP_itemdb_validate_entry_pre; @@ -9753,6 +10135,18 @@ struct { int HP_itemdb_lookup_const_post; int HP_itemdb_lookup_const_mask_pre; int HP_itemdb_lookup_const_mask_post; + int HP_itemdb_addname_sub_pre; + int HP_itemdb_addname_sub_post; + int HP_itemdb_read_libconfig_lapineddukddak_pre; + int HP_itemdb_read_libconfig_lapineddukddak_post; + int HP_itemdb_read_libconfig_lapineddukddak_sub_pre; + int HP_itemdb_read_libconfig_lapineddukddak_sub_post; + int HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre; + int HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post; + int HP_libconfig_set_db_path_pre; + int HP_libconfig_set_db_path_post; + int HP_libconfig_format_db_path_pre; + int HP_libconfig_format_db_path_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -9955,6 +10349,8 @@ struct { int HP_map_zone_init_post; int HP_map_zone_remove_pre; int HP_map_zone_remove_post; + int HP_map_zone_remove_all_pre; + int HP_map_zone_remove_all_post; int HP_map_zone_apply_pre; int HP_map_zone_apply_post; int HP_map_zone_change_pre; @@ -10221,6 +10617,10 @@ struct { int HP_map_merge_zone_post; int HP_map_zone_clear_single_pre; int HP_map_zone_clear_single_post; + int HP_mapindex_config_read_dbpath_pre; + int HP_mapindex_config_read_dbpath_post; + int HP_mapindex_config_read_pre; + int HP_mapindex_config_read_post; int HP_mapindex_init_pre; int HP_mapindex_init_post; int HP_mapindex_final_pre; @@ -10339,6 +10739,8 @@ struct { int HP_mob_final_post; int HP_mob_reload_pre; int HP_mob_reload_post; + int HP_mob_reload_sub_mob_pre; + int HP_mob_reload_sub_mob_post; int HP_mob_db_pre; int HP_mob_db_post; int HP_mob_chat_pre; @@ -10411,6 +10813,8 @@ struct { int HP_mob_ai_sub_hard_lootsearch_post; int HP_mob_warpchase_sub_pre; int HP_mob_warpchase_sub_post; + int HP_mob_is_in_battle_state_pre; + int HP_mob_is_in_battle_state_post; int HP_mob_ai_sub_hard_slavemob_pre; int HP_mob_ai_sub_hard_slavemob_post; int HP_mob_unlocktarget_pre; @@ -10431,6 +10835,8 @@ struct { int HP_mob_ai_lazy_post; int HP_mob_ai_hard_pre; int HP_mob_ai_hard_post; + int HP_mob_setdropitem_options_pre; + int HP_mob_setdropitem_options_post; int HP_mob_setdropitem_pre; int HP_mob_setdropitem_post; int HP_mob_setlootitem_pre; @@ -10497,6 +10903,14 @@ struct { int HP_mob_drop_adjust_post; int HP_mob_item_dropratio_adjust_pre; int HP_mob_item_dropratio_adjust_post; + int HP_mob_read_optdrops_option_pre; + int HP_mob_read_optdrops_option_post; + int HP_mob_read_optdrops_optslot_pre; + int HP_mob_read_optdrops_optslot_post; + int HP_mob_read_optdrops_group_pre; + int HP_mob_read_optdrops_group_post; + int HP_mob_read_optdrops_db_pre; + int HP_mob_read_optdrops_db_post; int HP_mob_readdb_pre; int HP_mob_readdb_post; int HP_mob_lookup_const_pre; @@ -10517,12 +10931,16 @@ struct { int HP_mob_read_db_mvpdrops_sub_post; int HP_mob_read_db_mode_sub_pre; int HP_mob_read_db_mode_sub_post; + int HP_mob_read_db_drops_option_pre; + int HP_mob_read_db_drops_option_post; int HP_mob_read_db_stats_sub_pre; int HP_mob_read_db_stats_sub_post; + int HP_mob_read_db_viewdata_sub_pre; + int HP_mob_read_db_viewdata_sub_post; int HP_mob_name_constants_pre; int HP_mob_name_constants_post; - int HP_mob_readdb_mobavail_pre; - int HP_mob_readdb_mobavail_post; + int HP_mob_mobavail_removal_notice_pre; + int HP_mob_mobavail_removal_notice_post; int HP_mob_read_randommonster_pre; int HP_mob_read_randommonster_post; int HP_mob_parse_row_chatdb_pre; @@ -10547,6 +10965,8 @@ struct { int HP_mob_final_ratio_sub_post; int HP_mob_destroy_mob_db_pre; int HP_mob_destroy_mob_db_post; + int HP_mob_destroy_drop_groups_pre; + int HP_mob_destroy_drop_groups_post; int HP_mob_skill_db_libconfig_pre; int HP_mob_skill_db_libconfig_post; int HP_mob_skill_db_libconfig_sub_pre; @@ -10797,6 +11217,8 @@ struct { int HP_npc_trader_update_post; int HP_npc_market_buylist_pre; int HP_npc_market_buylist_post; + int HP_npc_barter_buylist_pre; + int HP_npc_barter_buylist_post; int HP_npc_trader_open_pre; int HP_npc_trader_open_post; int HP_npc_market_fromsql_pre; @@ -10807,14 +11229,32 @@ struct { int HP_npc_market_delfromsql_post; int HP_npc_market_delfromsql_sub_pre; int HP_npc_market_delfromsql_sub_post; + int HP_npc_barter_fromsql_pre; + int HP_npc_barter_fromsql_post; + int HP_npc_barter_tosql_pre; + int HP_npc_barter_tosql_post; + int HP_npc_barter_delfromsql_pre; + int HP_npc_barter_delfromsql_post; + int HP_npc_barter_delfromsql_sub_pre; + int HP_npc_barter_delfromsql_sub_post; int HP_npc_db_checkid_pre; int HP_npc_db_checkid_post; int HP_npc_refresh_pre; int HP_npc_refresh_post; + int HP_npc_questinfo_clear_pre; + int HP_npc_questinfo_clear_post; int HP_npc_secure_timeout_timer_pre; int HP_npc_secure_timeout_timer_post; int HP_nullpo_assert_report_pre; int HP_nullpo_assert_report_post; + int HP_packets_init_pre; + int HP_packets_init_post; + int HP_packets_final_pre; + int HP_packets_final_post; + int HP_packets_addLens_pre; + int HP_packets_addLens_post; + int HP_packets_addLen_pre; + int HP_packets_addLen_post; int HP_party_init_pre; int HP_party_init_post; int HP_party_final_pre; @@ -10869,8 +11309,6 @@ struct { int HP_party_send_logout_post; int HP_party_send_message_pre; int HP_party_send_message_post; - int HP_party_recv_message_pre; - int HP_party_recv_message_post; int HP_party_skill_check_pre; int HP_party_skill_check_post; int HP_party_send_xy_clear_pre; @@ -11415,8 +11853,14 @@ struct { int HP_pc_update_idle_time_post; int HP_pc_have_magnifier_pre; int HP_pc_have_magnifier_post; + int HP_pc_have_item_chain_pre; + int HP_pc_have_item_chain_post; int HP_pc_process_chat_message_pre; int HP_pc_process_chat_message_post; + int HP_pc_wis_message_to_gm_pre; + int HP_pc_wis_message_to_gm_post; + int HP_pc_wis_message_to_gm_sub_pre; + int HP_pc_wis_message_to_gm_sub_post; int HP_pc_check_supernovice_call_pre; int HP_pc_check_supernovice_call_post; int HP_pc_check_basicskill_pre; @@ -11425,6 +11869,10 @@ struct { int HP_pc_isDeathPenaltyJob_post; int HP_pc_has_second_costume_pre; int HP_pc_has_second_costume_post; + int HP_pc_expandInventory_pre; + int HP_pc_expandInventory_post; + int HP_pc_auto_exp_insurance_pre; + int HP_pc_auto_exp_insurance_post; int HP_libpcre_compile_pre; int HP_libpcre_compile_post; int HP_libpcre_study_pre; @@ -11579,8 +12027,38 @@ struct { int HP_quest_questinfo_validate_homunculus_type_post; int HP_quest_questinfo_validate_quests_pre; int HP_quest_questinfo_validate_quests_post; - int HP_quest_questinfo_vector_clear_pre; - int HP_quest_questinfo_vector_clear_post; + int HP_quest_questinfo_validate_mercenary_class_pre; + int HP_quest_questinfo_validate_mercenary_class_post; + int HP_refine_init_pre; + int HP_refine_init_post; + int HP_refine_final_pre; + int HP_refine_final_post; + int HP_refine_get_refine_chance_pre; + int HP_refine_get_refine_chance_post; + int HP_refine_get_bonus_pre; + int HP_refine_get_bonus_post; + int HP_refine_get_randombonus_max_pre; + int HP_refine_get_randombonus_max_post; + int HP_refine_refinery_add_item_pre; + int HP_refine_refinery_add_item_post; + int HP_refine_refinery_refine_request_pre; + int HP_refine_refinery_refine_request_post; + int HP_PRIV__refine_readdb_refine_libconfig_sub_pre; + int HP_PRIV__refine_readdb_refine_libconfig_sub_post; + int HP_PRIV__refine_readdb_refine_libconfig_pre; + int HP_PRIV__refine_readdb_refine_libconfig_post; + int HP_PRIV__refine_announce_behavior_string2enum_pre; + int HP_PRIV__refine_announce_behavior_string2enum_post; + int HP_PRIV__refine_failure_behavior_string2enum_pre; + int HP_PRIV__refine_failure_behavior_string2enum_post; + int HP_PRIV__refine_readdb_refinery_ui_settings_items_pre; + int HP_PRIV__refine_readdb_refinery_ui_settings_items_post; + int HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre; + int HP_PRIV__refine_readdb_refinery_ui_settings_sub_post; + int HP_PRIV__refine_readdb_refinery_ui_settings_pre; + int HP_PRIV__refine_readdb_refinery_ui_settings_post; + int HP_PRIV__refine_is_refinable_pre; + int HP_PRIV__refine_is_refinable_post; int HP_rnd_init_pre; int HP_rnd_init_post; int HP_rnd_final_pre; @@ -11631,6 +12109,10 @@ struct { int HP_rodex_delete_mail_post; int HP_rodex_clean_pre; int HP_rodex_clean_post; + int HP_rodex_getZenyAck_pre; + int HP_rodex_getZenyAck_post; + int HP_rodex_getItemsAck_pre; + int HP_rodex_getItemsAck_post; int HP_script_init_pre; int HP_script_init_post; int HP_script_final_pre; @@ -11979,6 +12461,8 @@ struct { int HP_script_load_translations_post; int HP_script_load_translation_addstring_pre; int HP_script_load_translation_addstring_post; + int HP_script_load_translation_file_pre; + int HP_script_load_translation_file_post; int HP_script_load_translation_pre; int HP_script_load_translation_post; int HP_script_translation_db_destroyer_pre; @@ -11989,8 +12473,8 @@ struct { int HP_script_parse_cleanup_timer_post; int HP_script_add_language_pre; int HP_script_add_language_post; - int HP_script_get_translation_file_name_pre; - int HP_script_get_translation_file_name_post; + int HP_script_get_translation_dir_name_pre; + int HP_script_get_translation_dir_name_post; int HP_script_parser_clean_leftovers_pre; int HP_script_parser_clean_leftovers_post; int HP_script_run_use_script_pre; @@ -11999,6 +12483,12 @@ struct { int HP_script_run_item_equip_script_post; int HP_script_run_item_unequip_script_pre; int HP_script_run_item_unequip_script_post; + int HP_script_run_item_rental_end_script_pre; + int HP_script_run_item_rental_end_script_post; + int HP_script_run_item_rental_start_script_pre; + int HP_script_run_item_rental_start_script_post; + int HP_script_run_item_lapineddukddak_script_pre; + int HP_script_run_item_lapineddukddak_script_post; int HP_searchstore_open_pre; int HP_searchstore_open_post; int HP_searchstore_query_pre; @@ -12285,6 +12775,8 @@ struct { int HP_skill_cell_overlap_post; int HP_skill_timerskill_pre; int HP_skill_timerskill_post; + int HP_skill_trap_do_splash_pre; + int HP_skill_trap_do_splash_post; int HP_skill_trap_splash_pre; int HP_skill_trap_splash_post; int HP_skill_check_condition_mercenary_pre; @@ -12531,10 +13023,14 @@ struct { int HP_sockt_realloc_writefifo_post; int HP_sockt_wfifoset_pre; int HP_sockt_wfifoset_post; + int HP_sockt_wfifohead_pre; + int HP_sockt_wfifohead_post; int HP_sockt_rfifoskip_pre; int HP_sockt_rfifoskip_post; int HP_sockt_close_pre; int HP_sockt_close_post; + int HP_sockt_validateWfifo_pre; + int HP_sockt_validateWfifo_post; int HP_sockt_session_is_valid_pre; int HP_sockt_session_is_valid_post; int HP_sockt_session_is_active_pre; @@ -12543,6 +13039,8 @@ struct { int HP_sockt_flush_post; int HP_sockt_flush_fifos_pre; int HP_sockt_flush_fifos_post; + int HP_sockt_connect_client_pre; + int HP_sockt_connect_client_post; int HP_sockt_set_nonblocking_pre; int HP_sockt_set_nonblocking_post; int HP_sockt_set_defaultparse_pre; @@ -12637,18 +13135,18 @@ struct { int HP_status_init_post; int HP_status_final_pre; int HP_status_final_post; - int HP_status_get_refine_chance_pre; - int HP_status_get_refine_chance_post; int HP_status_skill2sc_pre; int HP_status_skill2sc_post; int HP_status_sc2skill_pre; int HP_status_sc2skill_post; int HP_status_sc2scb_flag_pre; int HP_status_sc2scb_flag_post; - int HP_status_type2relevant_bl_types_pre; - int HP_status_type2relevant_bl_types_post; + int HP_status_get_sc_relevant_bl_types_pre; + int HP_status_get_sc_relevant_bl_types_post; int HP_status_get_sc_type_pre; int HP_status_get_sc_type_post; + int HP_status_get_sc_icon_pre; + int HP_status_get_sc_icon_post; int HP_status_damage_pre; int HP_status_damage_post; int HP_status_charge_pre; @@ -12709,6 +13207,8 @@ struct { int HP_status_get_sc_def_post; int HP_status_change_start_pre; int HP_status_change_start_post; + int HP_status_change_start_sub_pre; + int HP_status_change_start_sub_post; int HP_status_change_end__pre; int HP_status_change_end__post; int HP_status_is_immune_to_status_pre; @@ -12803,6 +13303,10 @@ struct { int HP_status_get_base_maxhp_post; int HP_status_get_base_maxsp_pre; int HP_status_get_base_maxsp_post; + int HP_status_get_restart_hp_pre; + int HP_status_get_restart_hp_post; + int HP_status_get_restart_sp_pre; + int HP_status_get_restart_sp_post; int HP_status_calc_npc__pre; int HP_status_calc_npc__post; int HP_status_calc_str_pre; @@ -12865,12 +13369,14 @@ struct { int HP_status_readdb_job2_post; int HP_status_readdb_sizefix_pre; int HP_status_readdb_sizefix_post; - int HP_status_readdb_refine_libconfig_pre; - int HP_status_readdb_refine_libconfig_post; - int HP_status_readdb_refine_libconfig_sub_pre; - int HP_status_readdb_refine_libconfig_sub_post; - int HP_status_readdb_scconfig_pre; - int HP_status_readdb_scconfig_post; + int HP_status_read_scdb_libconfig_pre; + int HP_status_read_scdb_libconfig_post; + int HP_status_read_scdb_libconfig_sub_pre; + int HP_status_read_scdb_libconfig_sub_post; + int HP_status_read_scdb_libconfig_sub_flag_pre; + int HP_status_read_scdb_libconfig_sub_flag_post; + int HP_status_read_scdb_libconfig_sub_flag_additional_pre; + int HP_status_read_scdb_libconfig_sub_flag_additional_post; int HP_status_read_job_db_pre; int HP_status_read_job_db_post; int HP_status_read_job_db_sub_pre; @@ -12959,6 +13465,24 @@ struct { int HP_strlib_strline__post; int HP_strlib_bin2hex__pre; int HP_strlib_bin2hex__post; + int HP_stylist_init_pre; + int HP_stylist_init_post; + int HP_stylist_final_pre; + int HP_stylist_final_post; + int HP_stylist_vector_init_pre; + int HP_stylist_vector_init_post; + int HP_stylist_vector_clear_pre; + int HP_stylist_vector_clear_post; + int HP_stylist_read_db_libconfig_pre; + int HP_stylist_read_db_libconfig_post; + int HP_stylist_read_db_libconfig_sub_pre; + int HP_stylist_read_db_libconfig_sub_post; + int HP_stylist_request_style_change_pre; + int HP_stylist_request_style_change_post; + int HP_stylist_validate_requirements_pre; + int HP_stylist_validate_requirements_post; + int HP_stylist_send_rodexitem_pre; + int HP_stylist_send_rodexitem_post; int HP_sv_parse_next_pre; int HP_sv_parse_next_post; int HP_sv_parse_pre; @@ -13232,6 +13756,7 @@ struct { struct npc_chat_interface npc_chat; struct npc_interface npc; struct nullpo_interface nullpo; + struct packets_interface packets; struct party_interface party; struct path_interface path; struct pc_groups_interface pcg; @@ -13239,6 +13764,8 @@ struct { struct pcre_interface libpcre; struct pet_interface pet; struct quest_interface quest; + struct refine_interface refine; + struct refine_interface_private PRIV__refine; struct rnd_interface rnd; struct rodex_interface rodex; struct script_interface script; @@ -13251,6 +13778,7 @@ struct { struct storage_interface storage; struct stringbuf_interface StrBuf; struct strlib_interface strlib; + struct stylist_interface stylist; struct sv_interface sv; struct sysinfo_interface sysinfo; struct thread_interface thread; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 2f3f1840f..7b81bac49 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.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-2020 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 @@ -83,6 +83,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(achievement->init_titles, HP_achievement_init_titles) }, { HP_POP(achievement->check_title, HP_achievement_check_title) }, { HP_POP(achievement->get_rewards, HP_achievement_get_rewards) }, + { HP_POP(achievement->get_rewards_buffs, HP_achievement_get_rewards_buffs) }, + { HP_POP(achievement->get_rewards_items, HP_achievement_get_rewards_items) }, /* atcommand_interface */ { HP_POP(atcommand->init, HP_atcommand_init) }, { HP_POP(atcommand->final, HP_atcommand_final) }, @@ -133,6 +135,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(battle->delay_damage, HP_battle_delay_damage) }, { HP_POP(battle->drain, HP_battle_drain) }, { HP_POP(battle->reflect_damage, HP_battle_reflect_damage) }, + { HP_POP(battle->reflect_trap, HP_battle_reflect_trap) }, { HP_POP(battle->attr_ratio, HP_battle_attr_ratio) }, { HP_POP(battle->attr_fix, HP_battle_attr_fix) }, { HP_POP(battle->calc_cardfix, HP_battle_calc_cardfix) }, @@ -464,9 +467,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->fame_alchemist, HP_clif_fame_alchemist) }, { HP_POP(clif->fame_taekwon, HP_clif_fame_taekwon) }, { HP_POP(clif->ranklist, HP_clif_ranklist) }, + { HP_POP(clif->ranklist_sub, HP_clif_ranklist_sub) }, + { HP_POP(clif->ranklist_sub2, HP_clif_ranklist_sub2) }, { HP_POP(clif->update_rankingpoint, HP_clif_update_rankingpoint) }, { HP_POP(clif->pRanklist, HP_clif_pRanklist) }, { HP_POP(clif->hotkeys, HP_clif_hotkeys) }, + { HP_POP(clif->hotkeysAll, HP_clif_hotkeysAll) }, { HP_POP(clif->insight, HP_clif_insight) }, { HP_POP(clif->outsight, HP_clif_outsight) }, { HP_POP(clif->skillcastcancel, HP_clif_skillcastcancel) }, @@ -479,6 +485,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->autospell, HP_clif_autospell) }, { HP_POP(clif->combo_delay, HP_clif_combo_delay) }, { HP_POP(clif->status_change, HP_clif_status_change) }, + { HP_POP(clif->status_change_sub, HP_clif_status_change_sub) }, { HP_POP(clif->insert_card, HP_clif_insert_card) }, { HP_POP(clif->inventoryList, HP_clif_inventoryList) }, { HP_POP(clif->inventoryItems, HP_clif_inventoryItems) }, @@ -486,6 +493,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->equipItems, HP_clif_equipItems) }, { HP_POP(clif->cartList, HP_clif_cartList) }, { HP_POP(clif->cartItems, HP_clif_cartItems) }, + { HP_POP(clif->inventoryExpansionInfo, HP_clif_inventoryExpansionInfo) }, + { HP_POP(clif->inventoryExpandAck, HP_clif_inventoryExpandAck) }, + { HP_POP(clif->inventoryExpandResult, HP_clif_inventoryExpandResult) }, + { HP_POP(clif->pInventoryExpansion, HP_clif_pInventoryExpansion) }, + { HP_POP(clif->pInventoryExpansionConfirmed, HP_clif_pInventoryExpansionConfirmed) }, + { HP_POP(clif->pInventoryExpansionRejected, HP_clif_pInventoryExpansionRejected) }, { HP_POP(clif->favorite_item, HP_clif_favorite_item) }, { HP_POP(clif->clearcart, HP_clif_clearcart) }, { HP_POP(clif->item_identify_list, HP_clif_item_identify_list) }, @@ -499,7 +512,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->mvp_exp, HP_clif_mvp_exp) }, { HP_POP(clif->mvp_noitem, HP_clif_mvp_noitem) }, { HP_POP(clif->changed_dir, HP_clif_changed_dir) }, - { HP_POP(clif->charnameack, HP_clif_charnameack) }, + { HP_POP(clif->blname_ack, HP_clif_blname_ack) }, + { HP_POP(clif->pcname_ack, HP_clif_pcname_ack) }, + { HP_POP(clif->homname_ack, HP_clif_homname_ack) }, + { HP_POP(clif->mername_ack, HP_clif_mername_ack) }, + { HP_POP(clif->petname_ack, HP_clif_petname_ack) }, + { HP_POP(clif->npcname_ack, HP_clif_npcname_ack) }, + { HP_POP(clif->mobname_ack, HP_clif_mobname_ack) }, + { HP_POP(clif->mobname_guardian_ack, HP_clif_mobname_guardian_ack) }, + { HP_POP(clif->mobname_additional_ack, HP_clif_mobname_additional_ack) }, + { HP_POP(clif->mobname_normal_ack, HP_clif_mobname_normal_ack) }, + { HP_POP(clif->chatname_ack, HP_clif_chatname_ack) }, + { HP_POP(clif->elemname_ack, HP_clif_elemname_ack) }, + { HP_POP(clif->unknownname_ack, HP_clif_unknownname_ack) }, { HP_POP(clif->monster_hp_bar, HP_clif_monster_hp_bar) }, { HP_POP(clif->hpmeter, HP_clif_hpmeter) }, { HP_POP(clif->hpmeter_single, HP_clif_hpmeter_single) }, @@ -576,6 +601,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->specialeffect, HP_clif_specialeffect) }, { HP_POP(clif->specialeffect_single, HP_clif_specialeffect_single) }, { HP_POP(clif->specialeffect_value, HP_clif_specialeffect_value) }, + { HP_POP(clif->specialeffect_value_single, HP_clif_specialeffect_value_single) }, + { HP_POP(clif->removeSpecialEffect, HP_clif_removeSpecialEffect) }, + { HP_POP(clif->removeSpecialEffect_single, HP_clif_removeSpecialEffect_single) }, { HP_POP(clif->millenniumshield, HP_clif_millenniumshield) }, { HP_POP(clif->spiritcharm, HP_clif_spiritcharm) }, { HP_POP(clif->charm_single, HP_clif_charm_single) }, @@ -591,6 +619,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->joinchatok, HP_clif_joinchatok) }, { HP_POP(clif->addchat, HP_clif_addchat) }, { HP_POP(clif->changechatowner, HP_clif_changechatowner) }, + { HP_POP(clif->chatRoleChange, HP_clif_chatRoleChange) }, { HP_POP(clif->clearchat, HP_clif_clearchat) }, { HP_POP(clif->leavechat, HP_clif_leavechat) }, { HP_POP(clif->changechatstatus, HP_clif_changechatstatus) }, @@ -601,6 +630,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->broadcast2, HP_clif_broadcast2) }, { HP_POP(clif->messagecolor_self, HP_clif_messagecolor_self) }, { HP_POP(clif->messagecolor, HP_clif_messagecolor) }, + { HP_POP(clif->serviceMessageColor, HP_clif_serviceMessageColor) }, { HP_POP(clif->disp_overhead, HP_clif_disp_overhead) }, { HP_POP(clif->notify_playerchat, HP_clif_notify_playerchat) }, { HP_POP(clif->msgtable, HP_clif_msgtable) }, @@ -647,6 +677,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->skillinfo, HP_clif_skillinfo) }, { HP_POP(clif->addskill, HP_clif_addskill) }, { HP_POP(clif->deleteskill, HP_clif_deleteskill) }, + { HP_POP(clif->playerSkillToPacket, HP_clif_playerSkillToPacket) }, { HP_POP(clif->party_created, HP_clif_party_created) }, { HP_POP(clif->party_member_info, HP_clif_party_member_info) }, { HP_POP(clif->party_info, HP_clif_party_info) }, @@ -668,6 +699,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->guild_masterormember, HP_clif_guild_masterormember) }, { HP_POP(clif->guild_basicinfo, HP_clif_guild_basicinfo) }, { HP_POP(clif->guild_allianceinfo, HP_clif_guild_allianceinfo) }, + { HP_POP(clif->guild_castlelist, HP_clif_guild_castlelist) }, + { HP_POP(clif->guild_castleinfo, HP_clif_guild_castleinfo) }, { HP_POP(clif->guild_memberlist, HP_clif_guild_memberlist) }, { HP_POP(clif->guild_skillinfo, HP_clif_guild_skillinfo) }, { HP_POP(clif->guild_send_onlineinfo, HP_clif_guild_send_onlineinfo) }, @@ -819,10 +852,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->npc_market_purchase_ack, HP_clif_npc_market_purchase_ack) }, { HP_POP(clif->parse_roulette_db, HP_clif_parse_roulette_db) }, { HP_POP(clif->roulette_generate_ack, HP_clif_roulette_generate_ack) }, + { HP_POP(clif->roulette_close, HP_clif_roulette_close) }, { HP_POP(clif->openmergeitem, HP_clif_openmergeitem) }, { HP_POP(clif->cancelmergeitem, HP_clif_cancelmergeitem) }, { HP_POP(clif->comparemergeitem, HP_clif_comparemergeitem) }, { HP_POP(clif->ackmergeitems, HP_clif_ackmergeitems) }, + { HP_POP(clif->mergeitems, HP_clif_mergeitems) }, { HP_POP(clif->isdisguised, HP_clif_isdisguised) }, { HP_POP(clif->navigate_to, HP_clif_navigate_to) }, { HP_POP(clif->bl_type, HP_clif_bl_type) }, @@ -835,7 +870,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) }, { HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) }, { HP_POP(clif->pTickSend, HP_clif_pTickSend) }, - { HP_POP(clif->pHotkey, HP_clif_pHotkey) }, + { HP_POP(clif->pHotkey1, HP_clif_pHotkey1) }, + { HP_POP(clif->pHotkey2, HP_clif_pHotkey2) }, { HP_POP(clif->pProgressbar, HP_clif_pProgressbar) }, { HP_POP(clif->pWalkToXY, HP_clif_pWalkToXY) }, { HP_POP(clif->pQuitGame, HP_clif_pQuitGame) }, @@ -878,7 +914,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pChangeCart, HP_clif_pChangeCart) }, { HP_POP(clif->pStatusUp, HP_clif_pStatusUp) }, { HP_POP(clif->pSkillUp, HP_clif_pSkillUp) }, + { HP_POP(clif->useSkillToIdReal, HP_clif_useSkillToIdReal) }, { HP_POP(clif->pUseSkillToId, HP_clif_pUseSkillToId) }, + { HP_POP(clif->pStartUseSkillToId, HP_clif_pStartUseSkillToId) }, + { HP_POP(clif->pStopUseSkillToId, HP_clif_pStopUseSkillToId) }, { HP_POP(clif->pUseSkillToId_homun, HP_clif_pUseSkillToId_homun) }, { HP_POP(clif->pUseSkillToId_mercenary, HP_clif_pUseSkillToId_mercenary) }, { HP_POP(clif->pUseSkillToPos, HP_clif_pUseSkillToPos) }, @@ -1035,13 +1074,17 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pBGQueueCheckState, HP_clif_pBGQueueCheckState) }, { HP_POP(clif->pBGQueueRevokeReq, HP_clif_pBGQueueRevokeReq) }, { HP_POP(clif->pBGQueueBattleBeginAck, HP_clif_pBGQueueBattleBeginAck) }, - { HP_POP(clif->pCashShopOpen, HP_clif_pCashShopOpen) }, + { HP_POP(clif->pCashShopOpen1, HP_clif_pCashShopOpen1) }, + { HP_POP(clif->pCashShopOpen2, HP_clif_pCashShopOpen2) }, + { HP_POP(clif->pCashShopLimitedReq, HP_clif_pCashShopLimitedReq) }, { HP_POP(clif->pCashShopClose, HP_clif_pCashShopClose) }, { HP_POP(clif->pCashShopReqTab, HP_clif_pCashShopReqTab) }, { HP_POP(clif->pCashShopSchedule, HP_clif_pCashShopSchedule) }, { HP_POP(clif->pCashShopBuy, HP_clif_pCashShopBuy) }, { HP_POP(clif->pPartyTick, HP_clif_pPartyTick) }, { HP_POP(clif->pGuildInvite2, HP_clif_pGuildInvite2) }, + { HP_POP(clif->cashShopBuyAck, HP_clif_cashShopBuyAck) }, + { HP_POP(clif->cashShopOpen, HP_clif_cashShopOpen) }, { HP_POP(clif->pPartyBookingAddFilter, HP_clif_pPartyBookingAddFilter) }, { HP_POP(clif->pPartyBookingSubFilter, HP_clif_pPartyBookingSubFilter) }, { HP_POP(clif->pPartyBookingReqVolunteer, HP_clif_pPartyBookingReqVolunteer) }, @@ -1061,7 +1104,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, { HP_POP(clif->add_item_options, HP_clif_add_item_options) }, - { HP_POP(clif->pHotkeyRowShift, HP_clif_pHotkeyRowShift) }, + { HP_POP(clif->pHotkeyRowShift1, HP_clif_pHotkeyRowShift1) }, + { HP_POP(clif->pHotkeyRowShift2, HP_clif_pHotkeyRowShift2) }, { HP_POP(clif->dressroom_open, HP_clif_dressroom_open) }, { HP_POP(clif->pOneClick_ItemIdentify, HP_clif_pOneClick_ItemIdentify) }, { HP_POP(clif->selectcart, HP_clif_selectcart) }, @@ -1114,20 +1158,45 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->ui_action, HP_clif_ui_action) }, { HP_POP(clif->pPrivateAirshipRequest, HP_clif_pPrivateAirshipRequest) }, { HP_POP(clif->PrivateAirshipResponse, HP_clif_PrivateAirshipResponse) }, - { HP_POP(clif->stylist_vector_init, HP_clif_stylist_vector_init) }, - { HP_POP(clif->stylist_vector_clear, HP_clif_stylist_vector_clear) }, - { HP_POP(clif->stylist_read_db_libconfig, HP_clif_stylist_read_db_libconfig) }, - { HP_POP(clif->stylist_read_db_libconfig_sub, HP_clif_stylist_read_db_libconfig_sub) }, - { HP_POP(clif->style_change_validate_requirements, HP_clif_style_change_validate_requirements) }, - { HP_POP(clif->stylist_send_rodexitem, HP_clif_stylist_send_rodexitem) }, { HP_POP(clif->pReqStyleChange, HP_clif_pReqStyleChange) }, { HP_POP(clif->pReqStyleChange2, HP_clif_pReqStyleChange2) }, - { HP_POP(clif->cz_req_style_change_sub, HP_clif_cz_req_style_change_sub) }, + { HP_POP(clif->pStyleClose, HP_clif_pStyleClose) }, { HP_POP(clif->style_change_response, HP_clif_style_change_response) }, { HP_POP(clif->pPetEvolution, HP_clif_pPetEvolution) }, { HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) }, { HP_POP(clif->party_dead_notification, HP_clif_party_dead_notification) }, { HP_POP(clif->pMemorialDungeonCommand, HP_clif_pMemorialDungeonCommand) }, + { HP_POP(clif->camera_showWindow, HP_clif_camera_showWindow) }, + { HP_POP(clif->camera_change, HP_clif_camera_change) }, + { HP_POP(clif->pCameraInfo, HP_clif_pCameraInfo) }, + { HP_POP(clif->item_preview, HP_clif_item_preview) }, + { HP_POP(clif->enchant_equipment, HP_clif_enchant_equipment) }, + { HP_POP(clif->pReqRemainTime, HP_clif_pReqRemainTime) }, + { HP_POP(clif->npc_barter_open, HP_clif_npc_barter_open) }, + { HP_POP(clif->pNPCBarterClosed, HP_clif_pNPCBarterClosed) }, + { HP_POP(clif->pNPCBarterPurchase, HP_clif_pNPCBarterPurchase) }, + { HP_POP(clif->pClientVersion, HP_clif_pClientVersion) }, + { HP_POP(clif->pPing, HP_clif_pPing) }, + { HP_POP(clif->ping, HP_clif_ping) }, + { HP_POP(clif->pingTimer, HP_clif_pingTimer) }, + { HP_POP(clif->pingTimerSub, HP_clif_pingTimerSub) }, + { HP_POP(clif->pResetCooldown, HP_clif_pResetCooldown) }, + { HP_POP(clif->loadConfirm, HP_clif_loadConfirm) }, + { HP_POP(clif->send_selforarea, HP_clif_send_selforarea) }, + { HP_POP(clif->OpenRefineryUI, HP_clif_OpenRefineryUI) }, + { HP_POP(clif->pAddItemRefineryUI, HP_clif_pAddItemRefineryUI) }, + { HP_POP(clif->AddItemRefineryUIAck, HP_clif_AddItemRefineryUIAck) }, + { HP_POP(clif->pRefineryUIClose, HP_clif_pRefineryUIClose) }, + { HP_POP(clif->pRefineryUIRefine, HP_clif_pRefineryUIRefine) }, + { HP_POP(clif->announce_refine_status, HP_clif_announce_refine_status) }, + { HP_POP(clif->pGuildCastleTeleportRequest, HP_clif_pGuildCastleTeleportRequest) }, + { HP_POP(clif->pGuildCastleInfoRequest, HP_clif_pGuildCastleInfoRequest) }, + { HP_POP(clif->guild_castleteleport_res, HP_clif_guild_castleteleport_res) }, + { HP_POP(clif->lapineDdukDdak_open, HP_clif_lapineDdukDdak_open) }, + { HP_POP(clif->lapineDdukDdak_result, HP_clif_lapineDdukDdak_result) }, + { HP_POP(clif->plapineDdukDdak_ack, HP_clif_plapineDdukDdak_ack) }, + { HP_POP(clif->plapineDdukDdak_close, HP_clif_plapineDdukDdak_close) }, + { HP_POP(clif->pReqGearOff, HP_clif_pReqGearOff) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, @@ -1266,7 +1335,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(guild->change_emblem, HP_guild_change_emblem) }, { HP_POP(guild->emblem_changed, HP_guild_emblem_changed) }, { HP_POP(guild->send_message, HP_guild_send_message) }, - { HP_POP(guild->recv_message, HP_guild_recv_message) }, { HP_POP(guild->send_dot_remove, HP_guild_send_dot_remove) }, { HP_POP(guild->skillupack, HP_guild_skillupack) }, { HP_POP(guild->dobreak, HP_guild_dobreak) }, @@ -1289,7 +1357,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(guild->payexp_timer, HP_guild_payexp_timer) }, { HP_POP(guild->sd_check, HP_guild_sd_check) }, { HP_POP(guild->read_guildskill_tree_db, HP_guild_read_guildskill_tree_db) }, - { HP_POP(guild->read_castledb, HP_guild_read_castledb) }, + { HP_POP(guild->read_castledb_libconfig, HP_guild_read_castledb_libconfig) }, + { HP_POP(guild->read_castledb_libconfig_sub, HP_guild_read_castledb_libconfig_sub) }, + { HP_POP(guild->read_castledb_libconfig_sub_warp, HP_guild_read_castledb_libconfig_sub_warp) }, { HP_POP(guild->payexp_timer_sub, HP_guild_payexp_timer_sub) }, { HP_POP(guild->send_xy_timer_sub, HP_guild_send_xy_timer_sub) }, { HP_POP(guild->send_xy_timer, HP_guild_send_xy_timer) }, @@ -1340,6 +1410,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(homun->evolve, HP_homun_evolve) }, { HP_POP(homun->mutate, HP_homun_mutate) }, { HP_POP(homun->gainexp, HP_homun_gainexp) }, + { HP_POP(homun->gainexp_real, HP_homun_gainexp_real) }, { HP_POP(homun->add_intimacy, HP_homun_add_intimacy) }, { HP_POP(homun->consume_intimacy, HP_homun_consume_intimacy) }, { HP_POP(homun->healed, HP_homun_healed) }, @@ -1391,11 +1462,6 @@ struct HookingPointData HookingPoints[] = { /* intif_interface */ { HP_POP(intif->parse, HP_intif_parse) }, { HP_POP(intif->create_pet, HP_intif_create_pet) }, - { HP_POP(intif->broadcast, HP_intif_broadcast) }, - { HP_POP(intif->broadcast2, HP_intif_broadcast2) }, - { HP_POP(intif->main_message, HP_intif_main_message) }, - { HP_POP(intif->wis_message, HP_intif_wis_message) }, - { HP_POP(intif->wis_message_to_gm, HP_intif_wis_message_to_gm) }, { HP_POP(intif->saveregistry, HP_intif_saveregistry) }, { HP_POP(intif->request_registry, HP_intif_request_registry) }, { HP_POP(intif->request_account_storage, HP_intif_request_account_storage) }, @@ -1409,7 +1475,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->party_leave, HP_intif_party_leave) }, { HP_POP(intif->party_changemap, HP_intif_party_changemap) }, { HP_POP(intif->break_party, HP_intif_break_party) }, - { HP_POP(intif->party_message, HP_intif_party_message) }, { HP_POP(intif->party_leaderchange, HP_intif_party_leaderchange) }, { HP_POP(intif->guild_create, HP_intif_guild_create) }, { HP_POP(intif->guild_request_info, HP_intif_guild_request_info) }, @@ -1417,7 +1482,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->guild_leave, HP_intif_guild_leave) }, { HP_POP(intif->guild_memberinfoshort, HP_intif_guild_memberinfoshort) }, { HP_POP(intif->guild_break, HP_intif_guild_break) }, - { HP_POP(intif->guild_message, HP_intif_guild_message) }, { HP_POP(intif->guild_change_gm, HP_intif_guild_change_gm) }, { HP_POP(intif->guild_change_basicinfo, HP_intif_guild_change_basicinfo) }, { HP_POP(intif->guild_change_memberinfo, HP_intif_guild_change_memberinfo) }, @@ -1463,16 +1527,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->rodex_updatemail, HP_intif_rodex_updatemail) }, { HP_POP(intif->rodex_sendmail, HP_intif_rodex_sendmail) }, { HP_POP(intif->rodex_checkname, HP_intif_rodex_checkname) }, + { HP_POP(intif->pGetZenyAck, HP_intif_pGetZenyAck) }, + { HP_POP(intif->pGetItemsAck, HP_intif_pGetItemsAck) }, { HP_POP(intif->clan_kickoffline, HP_intif_clan_kickoffline) }, { HP_POP(intif->clan_membercount, HP_intif_clan_membercount) }, { HP_POP(intif->request_accinfo, HP_intif_request_accinfo) }, { HP_POP(intif->CheckForCharServer, HP_intif_CheckForCharServer) }, { HP_POP(intif->achievements_request, HP_intif_achievements_request) }, { HP_POP(intif->achievements_save, HP_intif_achievements_save) }, - { HP_POP(intif->pWisMessage, HP_intif_pWisMessage) }, - { HP_POP(intif->pWisEnd, HP_intif_pWisEnd) }, - { HP_POP(intif->pWisToGM_sub, HP_intif_pWisToGM_sub) }, - { HP_POP(intif->pWisToGM, HP_intif_pWisToGM) }, { HP_POP(intif->pRegisters, HP_intif_pRegisters) }, { HP_POP(intif->pAccountStorage, HP_intif_pAccountStorage) }, { HP_POP(intif->pChangeNameOk, HP_intif_pChangeNameOk) }, @@ -1487,14 +1549,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->pPartyMemberWithdraw, HP_intif_pPartyMemberWithdraw) }, { HP_POP(intif->pPartyMove, HP_intif_pPartyMove) }, { HP_POP(intif->pPartyBroken, HP_intif_pPartyBroken) }, - { HP_POP(intif->pPartyMessage, HP_intif_pPartyMessage) }, { HP_POP(intif->pGuildCreated, HP_intif_pGuildCreated) }, { HP_POP(intif->pGuildInfo, HP_intif_pGuildInfo) }, { HP_POP(intif->pGuildMemberAdded, HP_intif_pGuildMemberAdded) }, { HP_POP(intif->pGuildMemberWithdraw, HP_intif_pGuildMemberWithdraw) }, { HP_POP(intif->pGuildMemberInfoShort, HP_intif_pGuildMemberInfoShort) }, { HP_POP(intif->pGuildBroken, HP_intif_pGuildBroken) }, - { HP_POP(intif->pGuildMessage, HP_intif_pGuildMessage) }, { HP_POP(intif->pGuildBasicInfoChanged, HP_intif_pGuildBasicInfoChanged) }, { HP_POP(intif->pGuildMemberInfoChanged, HP_intif_pGuildMemberInfoChanged) }, { HP_POP(intif->pGuildPosition, HP_intif_pGuildPosition) }, @@ -1605,8 +1665,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->isrestricted, HP_itemdb_isrestricted) }, { HP_POP(itemdb->isidentified, HP_itemdb_isidentified) }, { HP_POP(itemdb->isidentified2, HP_itemdb_isidentified2) }, - { HP_POP(itemdb->combo_split_atoi, HP_itemdb_combo_split_atoi) }, - { HP_POP(itemdb->read_combos, HP_itemdb_read_combos) }, + { HP_POP(itemdb->read_combodb_libconfig, HP_itemdb_read_combodb_libconfig) }, + { HP_POP(itemdb->read_combodb_libconfig_sub, HP_itemdb_read_combodb_libconfig_sub) }, { HP_POP(itemdb->gendercheck, HP_itemdb_gendercheck) }, { HP_POP(itemdb->validate_entry, HP_itemdb_validate_entry) }, { HP_POP(itemdb->readdb_options_additional_fields, HP_itemdb_readdb_options_additional_fields) }, @@ -1624,7 +1684,13 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) }, { HP_POP(itemdb->lookup_const, HP_itemdb_lookup_const) }, { HP_POP(itemdb->lookup_const_mask, HP_itemdb_lookup_const_mask) }, + { HP_POP(itemdb->addname_sub, HP_itemdb_addname_sub) }, + { HP_POP(itemdb->read_libconfig_lapineddukddak, HP_itemdb_read_libconfig_lapineddukddak) }, + { HP_POP(itemdb->read_libconfig_lapineddukddak_sub, HP_itemdb_read_libconfig_lapineddukddak_sub) }, + { HP_POP(itemdb->read_libconfig_lapineddukddak_sub_sources, HP_itemdb_read_libconfig_lapineddukddak_sub_sources) }, /* libconfig_interface */ + { HP_POP(libconfig->set_db_path, HP_libconfig_set_db_path) }, + { HP_POP(libconfig->format_db_path, HP_libconfig_format_db_path) }, { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -1729,6 +1795,7 @@ struct HookingPointData HookingPoints[] = { /* map_interface */ { HP_POP(map->zone_init, HP_map_zone_init) }, { HP_POP(map->zone_remove, HP_map_zone_remove) }, + { HP_POP(map->zone_remove_all, HP_map_zone_remove_all) }, { HP_POP(map->zone_apply, HP_map_zone_apply) }, { HP_POP(map->zone_change, HP_map_zone_change) }, { HP_POP(map->zone_change2, HP_map_zone_change2) }, @@ -1863,6 +1930,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->merge_zone, HP_map_merge_zone) }, { HP_POP(map->zone_clear_single, HP_map_zone_clear_single) }, /* mapindex_interface */ + { HP_POP(mapindex->config_read_dbpath, HP_mapindex_config_read_dbpath) }, + { HP_POP(mapindex->config_read, HP_mapindex_config_read) }, { HP_POP(mapindex->init, HP_mapindex_init) }, { HP_POP(mapindex->final, HP_mapindex_final) }, { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, @@ -1927,6 +1996,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->init, HP_mob_init) }, { HP_POP(mob->final, HP_mob_final) }, { HP_POP(mob->reload, HP_mob_reload) }, + { HP_POP(mob->reload_sub_mob, HP_mob_reload_sub_mob) }, { HP_POP(mob->db, HP_mob_db) }, { HP_POP(mob->chat, HP_mob_chat) }, { HP_POP(mob->makedummymobdb, HP_mob_makedummymobdb) }, @@ -1963,6 +2033,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->ai_sub_hard_bg_ally, HP_mob_ai_sub_hard_bg_ally) }, { HP_POP(mob->ai_sub_hard_lootsearch, HP_mob_ai_sub_hard_lootsearch) }, { HP_POP(mob->warpchase_sub, HP_mob_warpchase_sub) }, + { HP_POP(mob->is_in_battle_state, HP_mob_is_in_battle_state) }, { HP_POP(mob->ai_sub_hard_slavemob, HP_mob_ai_sub_hard_slavemob) }, { HP_POP(mob->unlocktarget, HP_mob_unlocktarget) }, { HP_POP(mob->randomwalk, HP_mob_randomwalk) }, @@ -1973,6 +2044,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->ai_sub_lazy, HP_mob_ai_sub_lazy) }, { HP_POP(mob->ai_lazy, HP_mob_ai_lazy) }, { HP_POP(mob->ai_hard, HP_mob_ai_hard) }, + { HP_POP(mob->setdropitem_options, HP_mob_setdropitem_options) }, { HP_POP(mob->setdropitem, HP_mob_setdropitem) }, { HP_POP(mob->setlootitem, HP_mob_setlootitem) }, { HP_POP(mob->delay_item_drop, HP_mob_delay_item_drop) }, @@ -2006,6 +2078,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->clone_delete, HP_mob_clone_delete) }, { HP_POP(mob->drop_adjust, HP_mob_drop_adjust) }, { HP_POP(mob->item_dropratio_adjust, HP_mob_item_dropratio_adjust) }, + { HP_POP(mob->read_optdrops_option, HP_mob_read_optdrops_option) }, + { HP_POP(mob->read_optdrops_optslot, HP_mob_read_optdrops_optslot) }, + { HP_POP(mob->read_optdrops_group, HP_mob_read_optdrops_group) }, + { HP_POP(mob->read_optdrops_db, HP_mob_read_optdrops_db) }, { HP_POP(mob->readdb, HP_mob_readdb) }, { HP_POP(mob->lookup_const, HP_mob_lookup_const) }, { HP_POP(mob->get_const, HP_mob_get_const) }, @@ -2016,9 +2092,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->read_db_drops_sub, HP_mob_read_db_drops_sub) }, { HP_POP(mob->read_db_mvpdrops_sub, HP_mob_read_db_mvpdrops_sub) }, { HP_POP(mob->read_db_mode_sub, HP_mob_read_db_mode_sub) }, + { HP_POP(mob->read_db_drops_option, HP_mob_read_db_drops_option) }, { HP_POP(mob->read_db_stats_sub, HP_mob_read_db_stats_sub) }, + { HP_POP(mob->read_db_viewdata_sub, HP_mob_read_db_viewdata_sub) }, { HP_POP(mob->name_constants, HP_mob_name_constants) }, - { HP_POP(mob->readdb_mobavail, HP_mob_readdb_mobavail) }, + { HP_POP(mob->mobavail_removal_notice, HP_mob_mobavail_removal_notice) }, { HP_POP(mob->read_randommonster, HP_mob_read_randommonster) }, { HP_POP(mob->parse_row_chatdb, HP_mob_parse_row_chatdb) }, { HP_POP(mob->readchatdb, HP_mob_readchatdb) }, @@ -2031,6 +2109,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->set_item_drop_ratio, HP_mob_set_item_drop_ratio) }, { HP_POP(mob->final_ratio_sub, HP_mob_final_ratio_sub) }, { HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) }, + { HP_POP(mob->destroy_drop_groups, HP_mob_destroy_drop_groups) }, { HP_POP(mob->skill_db_libconfig, HP_mob_skill_db_libconfig) }, { HP_POP(mob->skill_db_libconfig_sub, HP_mob_skill_db_libconfig_sub) }, { HP_POP(mob->skill_db_libconfig_sub_skill, HP_mob_skill_db_libconfig_sub_skill) }, @@ -2159,16 +2238,27 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->trader_pay, HP_npc_trader_pay) }, { HP_POP(npc->trader_update, HP_npc_trader_update) }, { HP_POP(npc->market_buylist, HP_npc_market_buylist) }, + { HP_POP(npc->barter_buylist, HP_npc_barter_buylist) }, { HP_POP(npc->trader_open, HP_npc_trader_open) }, { HP_POP(npc->market_fromsql, HP_npc_market_fromsql) }, { HP_POP(npc->market_tosql, HP_npc_market_tosql) }, { HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) }, { HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) }, + { HP_POP(npc->barter_fromsql, HP_npc_barter_fromsql) }, + { HP_POP(npc->barter_tosql, HP_npc_barter_tosql) }, + { HP_POP(npc->barter_delfromsql, HP_npc_barter_delfromsql) }, + { HP_POP(npc->barter_delfromsql_sub, HP_npc_barter_delfromsql_sub) }, { HP_POP(npc->db_checkid, HP_npc_db_checkid) }, { HP_POP(npc->refresh, HP_npc_refresh) }, + { HP_POP(npc->questinfo_clear, HP_npc_questinfo_clear) }, { HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) }, /* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, +/* packets_interface */ + { HP_POP(packets->init, HP_packets_init) }, + { HP_POP(packets->final, HP_packets_final) }, + { HP_POP(packets->addLens, HP_packets_addLens) }, + { HP_POP(packets->addLen, HP_packets_addLen) }, /* party_interface */ { HP_POP(party->init, HP_party_init) }, { HP_POP(party->final, HP_party_final) }, @@ -2197,7 +2287,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(party->send_levelup, HP_party_send_levelup) }, { HP_POP(party->send_logout, HP_party_send_logout) }, { HP_POP(party->send_message, HP_party_send_message) }, - { HP_POP(party->recv_message, HP_party_recv_message) }, { HP_POP(party->skill_check, HP_party_skill_check) }, { HP_POP(party->send_xy_clear, HP_party_send_xy_clear) }, { HP_POP(party->exp_share, HP_party_exp_share) }, @@ -2473,11 +2562,16 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->check_job_name, HP_pc_check_job_name) }, { HP_POP(pc->update_idle_time, HP_pc_update_idle_time) }, { HP_POP(pc->have_magnifier, HP_pc_have_magnifier) }, + { HP_POP(pc->have_item_chain, HP_pc_have_item_chain) }, { HP_POP(pc->process_chat_message, HP_pc_process_chat_message) }, + { HP_POP(pc->wis_message_to_gm, HP_pc_wis_message_to_gm) }, + { HP_POP(pc->wis_message_to_gm_sub, HP_pc_wis_message_to_gm_sub) }, { HP_POP(pc->check_supernovice_call, HP_pc_check_supernovice_call) }, { HP_POP(pc->check_basicskill, HP_pc_check_basicskill) }, { HP_POP(pc->isDeathPenaltyJob, HP_pc_isDeathPenaltyJob) }, { HP_POP(pc->has_second_costume, HP_pc_has_second_costume) }, + { HP_POP(pc->expandInventory, HP_pc_expandInventory) }, + { HP_POP(pc->auto_exp_insurance, HP_pc_auto_exp_insurance) }, /* pcre_interface */ { HP_POP(libpcre->compile, HP_libpcre_compile) }, { HP_POP(libpcre->study, HP_libpcre_study) }, @@ -2558,7 +2652,24 @@ struct HookingPointData HookingPoints[] = { { HP_POP(quest->questinfo_validate_homunculus_level, HP_quest_questinfo_validate_homunculus_level) }, { HP_POP(quest->questinfo_validate_homunculus_type, HP_quest_questinfo_validate_homunculus_type) }, { HP_POP(quest->questinfo_validate_quests, HP_quest_questinfo_validate_quests) }, - { HP_POP(quest->questinfo_vector_clear, HP_quest_questinfo_vector_clear) }, + { HP_POP(quest->questinfo_validate_mercenary_class, HP_quest_questinfo_validate_mercenary_class) }, +/* refine_interface */ + { HP_POP(refine->init, HP_refine_init) }, + { HP_POP(refine->final, HP_refine_final) }, + { HP_POP(refine->get_refine_chance, HP_refine_get_refine_chance) }, + { HP_POP(refine->get_bonus, HP_refine_get_bonus) }, + { HP_POP(refine->get_randombonus_max, HP_refine_get_randombonus_max) }, + { HP_POP(refine->refinery_add_item, HP_refine_refinery_add_item) }, + { HP_POP(refine->refinery_refine_request, HP_refine_refinery_refine_request) }, +/* refine_interface_private */ + { HP_POP(refine->p->readdb_refine_libconfig_sub, HP_PRIV__refine_readdb_refine_libconfig_sub) }, + { HP_POP(refine->p->readdb_refine_libconfig, HP_PRIV__refine_readdb_refine_libconfig) }, + { HP_POP(refine->p->announce_behavior_string2enum, HP_PRIV__refine_announce_behavior_string2enum) }, + { HP_POP(refine->p->failure_behavior_string2enum, HP_PRIV__refine_failure_behavior_string2enum) }, + { HP_POP(refine->p->readdb_refinery_ui_settings_items, HP_PRIV__refine_readdb_refinery_ui_settings_items) }, + { HP_POP(refine->p->readdb_refinery_ui_settings_sub, HP_PRIV__refine_readdb_refinery_ui_settings_sub) }, + { HP_POP(refine->p->readdb_refinery_ui_settings, HP_PRIV__refine_readdb_refinery_ui_settings) }, + { HP_POP(refine->p->is_refinable, HP_PRIV__refine_is_refinable) }, /* rnd_interface */ { HP_POP(rnd->init, HP_rnd_init) }, { HP_POP(rnd->final, HP_rnd_final) }, @@ -2586,6 +2697,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(rodex->get_items, HP_rodex_get_items) }, { HP_POP(rodex->delete_mail, HP_rodex_delete_mail) }, { HP_POP(rodex->clean, HP_rodex_clean) }, + { HP_POP(rodex->getZenyAck, HP_rodex_getZenyAck) }, + { HP_POP(rodex->getItemsAck, HP_rodex_getItemsAck) }, /* script_interface */ { HP_POP(script->init, HP_script_init) }, { HP_POP(script->final, HP_script_final) }, @@ -2761,16 +2874,20 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->string_dup, HP_script_string_dup) }, { HP_POP(script->load_translations, HP_script_load_translations) }, { HP_POP(script->load_translation_addstring, HP_script_load_translation_addstring) }, + { HP_POP(script->load_translation_file, HP_script_load_translation_file) }, { HP_POP(script->load_translation, HP_script_load_translation) }, { HP_POP(script->translation_db_destroyer, HP_script_translation_db_destroyer) }, { HP_POP(script->clear_translations, HP_script_clear_translations) }, { HP_POP(script->parse_cleanup_timer, HP_script_parse_cleanup_timer) }, { HP_POP(script->add_language, HP_script_add_language) }, - { HP_POP(script->get_translation_file_name, HP_script_get_translation_file_name) }, + { HP_POP(script->get_translation_dir_name, HP_script_get_translation_dir_name) }, { HP_POP(script->parser_clean_leftovers, HP_script_parser_clean_leftovers) }, { HP_POP(script->run_use_script, HP_script_run_use_script) }, { HP_POP(script->run_item_equip_script, HP_script_run_item_equip_script) }, { HP_POP(script->run_item_unequip_script, HP_script_run_item_unequip_script) }, + { HP_POP(script->run_item_rental_end_script, HP_script_run_item_rental_end_script) }, + { HP_POP(script->run_item_rental_start_script, HP_script_run_item_rental_start_script) }, + { HP_POP(script->run_item_lapineddukddak_script, HP_script_run_item_lapineddukddak_script) }, /* searchstore_interface */ { HP_POP(searchstore->open, HP_searchstore_open) }, { HP_POP(searchstore->query, HP_searchstore_query) }, @@ -2917,6 +3034,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->onskillusage, HP_skill_onskillusage) }, { HP_POP(skill->cell_overlap, HP_skill_cell_overlap) }, { HP_POP(skill->timerskill, HP_skill_timerskill) }, + { HP_POP(skill->trap_do_splash, HP_skill_trap_do_splash) }, { HP_POP(skill->trap_splash, HP_skill_trap_splash) }, { HP_POP(skill->check_condition_mercenary, HP_skill_check_condition_mercenary) }, { HP_POP(skill->locate_element_field, HP_skill_locate_element_field) }, @@ -3041,12 +3159,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) }, { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) }, { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, { HP_POP(sockt->flush, HP_sockt_flush) }, { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->connect_client, HP_sockt_connect_client) }, { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, @@ -3096,12 +3217,12 @@ struct HookingPointData HookingPoints[] = { /* status_interface */ { HP_POP(status->init, HP_status_init) }, { HP_POP(status->final, HP_status_final) }, - { HP_POP(status->get_refine_chance, HP_status_get_refine_chance) }, { HP_POP(status->skill2sc, HP_status_skill2sc) }, { HP_POP(status->sc2skill, HP_status_sc2skill) }, { HP_POP(status->sc2scb_flag, HP_status_sc2scb_flag) }, - { HP_POP(status->type2relevant_bl_types, HP_status_type2relevant_bl_types) }, + { HP_POP(status->get_sc_relevant_bl_types, HP_status_get_sc_relevant_bl_types) }, { HP_POP(status->get_sc_type, HP_status_get_sc_type) }, + { HP_POP(status->get_sc_icon, HP_status_get_sc_icon) }, { HP_POP(status->damage, HP_status_damage) }, { HP_POP(status->charge, HP_status_charge) }, { HP_POP(status->percent_change, HP_status_percent_change) }, @@ -3132,6 +3253,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->isimmune, HP_status_isimmune) }, { HP_POP(status->get_sc_def, HP_status_get_sc_def) }, { HP_POP(status->change_start, HP_status_change_start) }, + { HP_POP(status->change_start_sub, HP_status_change_start_sub) }, { HP_POP(status->change_end_, HP_status_change_end_) }, { HP_POP(status->is_immune_to_status, HP_status_is_immune_to_status) }, { HP_POP(status->is_boss_resist_sc, HP_status_is_boss_resist_sc) }, @@ -3179,6 +3301,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->base_atk, HP_status_base_atk) }, { HP_POP(status->get_base_maxhp, HP_status_get_base_maxhp) }, { HP_POP(status->get_base_maxsp, HP_status_get_base_maxsp) }, + { HP_POP(status->get_restart_hp, HP_status_get_restart_hp) }, + { HP_POP(status->get_restart_sp, HP_status_get_restart_sp) }, { HP_POP(status->calc_npc_, HP_status_calc_npc_) }, { HP_POP(status->calc_str, HP_status_calc_str) }, { HP_POP(status->calc_agi, HP_status_calc_agi) }, @@ -3210,9 +3334,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->natural_heal_timer, HP_status_natural_heal_timer) }, { HP_POP(status->readdb_job2, HP_status_readdb_job2) }, { HP_POP(status->readdb_sizefix, HP_status_readdb_sizefix) }, - { HP_POP(status->readdb_refine_libconfig, HP_status_readdb_refine_libconfig) }, - { HP_POP(status->readdb_refine_libconfig_sub, HP_status_readdb_refine_libconfig_sub) }, - { HP_POP(status->readdb_scconfig, HP_status_readdb_scconfig) }, + { HP_POP(status->read_scdb_libconfig, HP_status_read_scdb_libconfig) }, + { HP_POP(status->read_scdb_libconfig_sub, HP_status_read_scdb_libconfig_sub) }, + { HP_POP(status->read_scdb_libconfig_sub_flag, HP_status_read_scdb_libconfig_sub_flag) }, + { HP_POP(status->read_scdb_libconfig_sub_flag_additional, HP_status_read_scdb_libconfig_sub_flag_additional) }, { HP_POP(status->read_job_db, HP_status_read_job_db) }, { HP_POP(status->read_job_db_sub, HP_status_read_job_db_sub) }, { HP_POP(status->set_sc, HP_status_set_sc) }, @@ -3260,6 +3385,16 @@ struct HookingPointData HookingPoints[] = { { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, { HP_POP(strlib->strline_, HP_strlib_strline_) }, { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, +/* stylist_interface */ + { HP_POP(stylist->init, HP_stylist_init) }, + { HP_POP(stylist->final, HP_stylist_final) }, + { HP_POP(stylist->vector_init, HP_stylist_vector_init) }, + { HP_POP(stylist->vector_clear, HP_stylist_vector_clear) }, + { HP_POP(stylist->read_db_libconfig, HP_stylist_read_db_libconfig) }, + { HP_POP(stylist->read_db_libconfig_sub, HP_stylist_read_db_libconfig_sub) }, + { HP_POP(stylist->request_style_change, HP_stylist_request_style_change) }, + { HP_POP(stylist->validate_requirements, HP_stylist_validate_requirements) }, + { HP_POP(stylist->send_rodexitem, HP_stylist_send_rodexitem) }, /* sv_interface */ { HP_POP(sv->parse_next, HP_sv_parse_next) }, { HP_POP(sv->parse, HP_sv_parse) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 860e47f1b..7873e544a 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-2020 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); @@ -11199,11 +11278,11 @@ void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, } return; } -int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2) { +int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type type, int64 damage2) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_clif_damage_pre > 0) { - int (*preHookFunc) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); + int (*preHookFunc) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, enum battle_dmg_type *type, int64 *damage2); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_damage_pre[hIndex].func; @@ -11218,7 +11297,7 @@ int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, i retVal___ = HPMHooks.source.clif.damage(src, dst, sdelay, ddelay, damage, div, type, damage2); } if (HPMHooks.count.HP_clif_damage_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2); + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type type, int64 damage2); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_damage_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, dst, sdelay, ddelay, damage, div, type, damage2); @@ -11460,6 +11539,58 @@ void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) { } return; } +void HP_clif_ranklist_sub(struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_ranklist_sub_pre > 0) { + void (*preHookFunc) (struct PACKET_ZC_ACK_RANKING_sub **ranks, enum fame_list_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_ranklist_sub_pre[hIndex].func; + preHookFunc(&ranks, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ranklist_sub(ranks, type); + } + if (HPMHooks.count.HP_clif_ranklist_sub_post > 0) { + void (*postHookFunc) (struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_ranklist_sub_post[hIndex].func; + postHookFunc(ranks, type); + } + } + return; +} +void HP_clif_ranklist_sub2(uint32 *chars, uint32 *points, enum fame_list_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_ranklist_sub2_pre > 0) { + void (*preHookFunc) (uint32 **chars, uint32 **points, enum fame_list_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_ranklist_sub2_pre[hIndex].func; + preHookFunc(&chars, &points, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ranklist_sub2(chars, points, type); + } + if (HPMHooks.count.HP_clif_ranklist_sub2_post > 0) { + void (*postHookFunc) (uint32 *chars, uint32 *points, enum fame_list_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_ranklist_sub2_post[hIndex].func; + postHookFunc(chars, points, type); + } + } + return; +} void HP_clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type type, int points) { int hIndex = 0; if (HPMHooks.count.HP_clif_update_rankingpoint_pre > 0) { @@ -11512,14 +11643,14 @@ void HP_clif_pRanklist(int fd, struct map_session_data *sd) { } return; } -void HP_clif_hotkeys(struct map_session_data *sd) { +void HP_clif_hotkeys(struct map_session_data *sd, int tab) { int hIndex = 0; if (HPMHooks.count.HP_clif_hotkeys_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd); + void (*preHookFunc) (struct map_session_data **sd, int *tab); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_hotkeys_pre[hIndex].func; - preHookFunc(&sd); + preHookFunc(&sd, &tab); } if (*HPMforce_return) { *HPMforce_return = false; @@ -11527,12 +11658,38 @@ void HP_clif_hotkeys(struct map_session_data *sd) { } } { - HPMHooks.source.clif.hotkeys(sd); + HPMHooks.source.clif.hotkeys(sd, tab); } if (HPMHooks.count.HP_clif_hotkeys_post > 0) { - void (*postHookFunc) (struct map_session_data *sd); + void (*postHookFunc) (struct map_session_data *sd, int tab); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_hotkeys_post[hIndex].func; + postHookFunc(sd, tab); + } + } + return; +} +void HP_clif_hotkeysAll(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_hotkeysAll_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeysAll_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_hotkeysAll_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hotkeysAll(sd); + } + if (HPMHooks.count.HP_clif_hotkeysAll_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeysAll_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_hotkeysAll_post[hIndex].func; postHookFunc(sd); } } @@ -11838,14 +11995,14 @@ void HP_clif_combo_delay(struct block_list *bl, int wait) { } return; } -void HP_clif_status_change(struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3) { +void HP_clif_status_change(struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3) { int hIndex = 0; if (HPMHooks.count.HP_clif_status_change_pre > 0) { - void (*preHookFunc) (struct block_list **bl, int *type, int *flag, int *tick, int *val1, int *val2, int *val3); + void (*preHookFunc) (struct block_list **bl, int *relevant_bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_status_change_pre[hIndex].func; - preHookFunc(&bl, &type, &flag, &tick, &val1, &val2, &val3); + preHookFunc(&bl, &relevant_bl, &type, &flag, &total_tick, &val1, &val2, &val3); } if (*HPMforce_return) { *HPMforce_return = false; @@ -11853,13 +12010,39 @@ void HP_clif_status_change(struct block_list *bl, int type, int flag, int tick, } } { - HPMHooks.source.clif.status_change(bl, type, flag, tick, val1, val2, val3); + HPMHooks.source.clif.status_change(bl, relevant_bl, type, flag, total_tick, val1, val2, val3); } if (HPMHooks.count.HP_clif_status_change_post > 0) { - void (*postHookFunc) (struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3); + void (*postHookFunc) (struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_status_change_post[hIndex].func; - postHookFunc(bl, type, flag, tick, val1, val2, val3); + postHookFunc(bl, relevant_bl, type, flag, total_tick, val1, val2, val3); + } + } + return; +} +void HP_clif_status_change_sub(struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_status_change_sub_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *type, int *relevant_bl, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_status_change_sub_pre[hIndex].func; + preHookFunc(&bl, &type, &relevant_bl, &flag, &tick, &total_tick, &val1, &val2, &val3); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.status_change_sub(bl, type, relevant_bl, flag, tick, total_tick, val1, val2, val3); + } + if (HPMHooks.count.HP_clif_status_change_sub_post > 0) { + void (*postHookFunc) (struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_status_change_sub_post[hIndex].func; + postHookFunc(bl, type, relevant_bl, flag, tick, total_tick, val1, val2, val3); } } return; @@ -12046,6 +12229,162 @@ void HP_clif_cartItems(struct map_session_data *sd, enum inventory_type 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_inventoryExpansionInfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryExpansionInfo_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryExpansionInfo(sd); + } + if (HPMHooks.count.HP_clif_inventoryExpansionInfo_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + 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) { @@ -12384,13 +12723,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) { @@ -12399,12 +13050,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); } } @@ -13907,11 +14558,11 @@ void HP_clif_callpartner(struct map_session_data *sd) { } return; } -int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type) { +int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type type) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_clif_skill_damage_pre > 0) { - int (*preHookFunc) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type); + int (*preHookFunc) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, enum battle_dmg_type *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_skill_damage_pre[hIndex].func; @@ -13926,7 +14577,7 @@ int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 t retVal___ = HPMHooks.source.clif.skill_damage(src, dst, tick, sdelay, ddelay, damage, div, skill_id, skill_lv, type); } if (HPMHooks.count.HP_clif_skill_damage_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type); + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type type); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skill_damage_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, dst, tick, sdelay, ddelay, damage, div, skill_id, skill_lv, type); @@ -14377,10 +15028,10 @@ void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) { } return; } -void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, send_target target) { +void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, uint64 num, send_target target) { int hIndex = 0; if (HPMHooks.count.HP_clif_specialeffect_value_pre > 0) { - void (*preHookFunc) (struct block_list **bl, int *effect_id, int *num, send_target *target); + void (*preHookFunc) (struct block_list **bl, int *effect_id, uint64 *num, send_target *target); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_specialeffect_value_pre[hIndex].func; @@ -14395,7 +15046,7 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, HPMHooks.source.clif.specialeffect_value(bl, effect_id, num, target); } if (HPMHooks.count.HP_clif_specialeffect_value_post > 0) { - void (*postHookFunc) (struct block_list *bl, int effect_id, int num, send_target target); + void (*postHookFunc) (struct block_list *bl, int effect_id, uint64 num, send_target target); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_specialeffect_value_post[hIndex].func; postHookFunc(bl, effect_id, num, target); @@ -14403,6 +15054,84 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, } return; } +void HP_clif_specialeffect_value_single(struct block_list *bl, int effect_id, uint64 num, int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_specialeffect_value_single_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effect_id, uint64 *num, int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_single_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_specialeffect_value_single_pre[hIndex].func; + preHookFunc(&bl, &effect_id, &num, &fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.specialeffect_value_single(bl, effect_id, num, fd); + } + if (HPMHooks.count.HP_clif_specialeffect_value_single_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effect_id, uint64 num, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_single_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_specialeffect_value_single_post[hIndex].func; + postHookFunc(bl, effect_id, num, fd); + } + } + 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) { @@ -14793,6 +15522,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) { @@ -15053,6 +15808,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) { @@ -15445,14 +16226,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; @@ -15460,13 +16241,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; @@ -16251,6 +17032,32 @@ void HP_clif_deleteskill(struct map_session_data *sd, int id) { } return; } +void HP_clif_playerSkillToPacket(struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_playerSkillToPacket_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct SKILLDATA **skillData, int *skillId, int *idx, bool *newSkill); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playerSkillToPacket_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_playerSkillToPacket_pre[hIndex].func; + preHookFunc(&sd, &skillData, &skillId, &idx, &newSkill); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.playerSkillToPacket(sd, skillData, skillId, idx, newSkill); + } + if (HPMHooks.count.HP_clif_playerSkillToPacket_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playerSkillToPacket_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_playerSkillToPacket_post[hIndex].func; + postHookFunc(sd, skillData, skillId, idx, newSkill); + } + } + return; +} void HP_clif_party_created(struct map_session_data *sd, int result) { int hIndex = 0; if (HPMHooks.count.HP_clif_party_created_pre > 0) { @@ -16797,6 +17604,58 @@ void HP_clif_guild_allianceinfo(struct map_session_data *sd) { } return; } +void HP_clif_guild_castlelist(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_castlelist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castlelist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_castlelist_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_castlelist(sd); + } + if (HPMHooks.count.HP_clif_guild_castlelist_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castlelist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_castlelist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_castleinfo(struct map_session_data *sd, struct guild_castle *gc) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_castleinfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct guild_castle **gc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleinfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_castleinfo_pre[hIndex].func; + preHookFunc(&sd, &gc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_castleinfo(sd, gc); + } + if (HPMHooks.count.HP_clif_guild_castleinfo_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct guild_castle *gc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleinfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_castleinfo_post[hIndex].func; + postHookFunc(sd, gc); + } + } + return; +} void HP_clif_guild_memberlist(struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_guild_memberlist_pre > 0) { @@ -20577,11 +21436,11 @@ void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index) } return; } -int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type) { +int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_clif_delay_damage_pre > 0) { - int (*preHookFunc) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, unsigned char *type); + int (*preHookFunc) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, enum battle_dmg_type *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_delay_damage_pre[hIndex].func; @@ -20596,7 +21455,7 @@ int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list * retVal___ = HPMHooks.source.clif.delay_damage(tick, src, dst, sdelay, ddelay, in_damage, div, type); } if (HPMHooks.count.HP_clif_delay_damage_post > 0) { - int (*postHookFunc) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type); + int (*postHookFunc) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_delay_damage_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick, src, dst, sdelay, ddelay, in_damage, div, type); @@ -20657,10 +21516,10 @@ void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { } return; } -void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response) { +void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response) { int hIndex = 0; if (HPMHooks.count.HP_clif_npc_market_purchase_ack_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list, unsigned char *response); + void (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list, enum market_buy_result *response); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_pre[hIndex].func; @@ -20675,7 +21534,7 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct i HPMHooks.source.clif.npc_market_purchase_ack(sd, item_list, response); } if (HPMHooks.count.HP_clif_npc_market_purchase_ack_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response); + void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_post[hIndex].func; postHookFunc(sd, item_list, response); @@ -20710,10 +21569,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; @@ -20728,7 +21587,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); @@ -20736,6 +21595,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) { @@ -20841,6 +21726,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; @@ -21155,13 +22066,39 @@ void HP_clif_pTickSend(int fd, struct map_session_data *sd) { } return; } -void HP_clif_pHotkey(int fd, struct map_session_data *sd) { +void HP_clif_pHotkey1(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pHotkey1_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey1_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pHotkey1_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHotkey1(fd, sd); + } + if (HPMHooks.count.HP_clif_pHotkey1_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey1_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pHotkey1_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pHotkey2(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_pHotkey_pre > 0) { + if (HPMHooks.count.HP_clif_pHotkey2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_pHotkey_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pHotkey2_pre[hIndex].func; preHookFunc(&fd, &sd); } if (*HPMforce_return) { @@ -21170,12 +22107,12 @@ void HP_clif_pHotkey(int fd, struct map_session_data *sd) { } } { - HPMHooks.source.clif.pHotkey(fd, sd); + HPMHooks.source.clif.pHotkey2(fd, sd); } - if (HPMHooks.count.HP_clif_pHotkey_post > 0) { + if (HPMHooks.count.HP_clif_pHotkey2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_pHotkey_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pHotkey2_post[hIndex].func; postHookFunc(fd, sd); } } @@ -22273,6 +23210,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) { @@ -22299,6 +23262,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,13 +27370,65 @@ void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) { } return; } -void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { +void HP_clif_pCashShopOpen1(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pCashShopOpen1_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen1_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen1_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopOpen1(fd, sd); + } + if (HPMHooks.count.HP_clif_pCashShopOpen1_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen1_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen1_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pCashShopOpen2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pCashShopOpen2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen2_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopOpen2(fd, sd); + } + if (HPMHooks.count.HP_clif_pCashShopOpen2_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen2_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pCashShopLimitedReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_pCashShopOpen_pre > 0) { + if (HPMHooks.count.HP_clif_pCashShopLimitedReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopLimitedReq_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopLimitedReq_pre[hIndex].func; preHookFunc(&fd, &sd); } if (*HPMforce_return) { @@ -26370,12 +27437,12 @@ void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { } } { - HPMHooks.source.clif.pCashShopOpen(fd, sd); + HPMHooks.source.clif.pCashShopLimitedReq(fd, sd); } - if (HPMHooks.count.HP_clif_pCashShopOpen_post > 0) { + if (HPMHooks.count.HP_clif_pCashShopLimitedReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopLimitedReq_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopLimitedReq_post[hIndex].func; postHookFunc(fd, sd); } } @@ -26537,6 +27604,58 @@ 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_cashShopOpen(int fd, struct map_session_data *sd, int tab) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cashShopOpen_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *tab); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopOpen_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cashShopOpen_pre[hIndex].func; + preHookFunc(&fd, &sd, &tab); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashShopOpen(fd, sd, tab); + } + if (HPMHooks.count.HP_clif_cashShopOpen_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int tab); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopOpen_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cashShopOpen_post[hIndex].func; + postHookFunc(fd, sd, tab); + } + } + return; +} void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre > 0) { @@ -27032,13 +28151,39 @@ int HP_clif_add_item_options(struct ItemOptions *buf, const struct item *it) { } return retVal___; } -void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { +void HP_clif_pHotkeyRowShift1(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pHotkeyRowShift1_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift1_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift1_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHotkeyRowShift1(fd, sd); + } + if (HPMHooks.count.HP_clif_pHotkeyRowShift1_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift1_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift1_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pHotkeyRowShift2(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_pHotkeyRowShift_pre > 0) { + if (HPMHooks.count.HP_clif_pHotkeyRowShift2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift2_pre[hIndex].func; preHookFunc(&fd, &sd); } if (*HPMforce_return) { @@ -27047,12 +28192,12 @@ void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { } } { - HPMHooks.source.clif.pHotkeyRowShift(fd, sd); + HPMHooks.source.clif.pHotkeyRowShift2(fd, sd); } - if (HPMHooks.count.HP_clif_pHotkeyRowShift_post > 0) { + if (HPMHooks.count.HP_clif_pHotkeyRowShift2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift2_post[hIndex].func; postHookFunc(fd, sd); } } @@ -27657,10 +28802,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; @@ -27675,7 +28820,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); @@ -28415,14 +29560,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; @@ -28430,25 +29575,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; @@ -28456,80 +29601,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; @@ -28537,25 +29888,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; @@ -28563,24 +29914,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) { @@ -28589,24 +29966,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) { @@ -28615,25 +29992,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; @@ -28641,25 +30018,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; @@ -28667,24 +30044,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) { @@ -28693,25 +30156,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; @@ -28719,24 +30182,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) { @@ -28745,24 +30234,24 @@ 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_pMemorialDungeonCommand(int fd, struct map_session_data *sd) { +void HP_clif_pAddItemRefineryUI(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_pMemorialDungeonCommand_pre > 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_pMemorialDungeonCommand_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_pMemorialDungeonCommand_pre[hIndex].func; + 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) { @@ -28771,12 +30260,326 @@ void HP_clif_pMemorialDungeonCommand(int fd, struct map_session_data *sd) { } } { - HPMHooks.source.clif.pMemorialDungeonCommand(fd, sd); + HPMHooks.source.clif.pAddItemRefineryUI(fd, sd); } - if (HPMHooks.count.HP_clif_pMemorialDungeonCommand_post > 0) { + 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_pMemorialDungeonCommand_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_pMemorialDungeonCommand_post[hIndex].func; + 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; +} +void HP_clif_pGuildCastleTeleportRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pGuildCastleTeleportRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildCastleTeleportRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pGuildCastleTeleportRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pGuildCastleInfoRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pGuildCastleInfoRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleInfoRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pGuildCastleInfoRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildCastleInfoRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pGuildCastleInfoRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleInfoRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pGuildCastleInfoRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_guild_castleteleport_res(struct map_session_data *sd, enum siege_teleport_result result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_castleteleport_res_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum siege_teleport_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleteleport_res_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_castleteleport_res_pre[hIndex].func; + preHookFunc(&sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_castleteleport_res(sd, result); + } + if (HPMHooks.count.HP_clif_guild_castleteleport_res_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum siege_teleport_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleteleport_res_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_castleteleport_res_post[hIndex].func; + postHookFunc(sd, result); + } + } + return; +} +bool HP_clif_lapineDdukDdak_open(struct map_session_data *sd, int item_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_lapineDdukDdak_open_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *item_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineDdukDdak_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_lapineDdukDdak_open_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.lapineDdukDdak_open(sd, item_id); + } + if (HPMHooks.count.HP_clif_lapineDdukDdak_open_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int item_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineDdukDdak_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_lapineDdukDdak_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_id); + } + } + return retVal___; +} +bool HP_clif_lapineDdukDdak_result(struct map_session_data *sd, enum lapineddukddak_result result) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_lapineDdukDdak_result_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, enum lapineddukddak_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineDdukDdak_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_lapineDdukDdak_result_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.lapineDdukDdak_result(sd, result); + } + if (HPMHooks.count.HP_clif_lapineDdukDdak_result_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum lapineddukddak_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineDdukDdak_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_lapineDdukDdak_result_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, result); + } + } + return retVal___; +} +void HP_clif_plapineDdukDdak_ack(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_plapineDdukDdak_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_plapineDdukDdak_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_plapineDdukDdak_ack_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.plapineDdukDdak_ack(fd, sd); + } + if (HPMHooks.count.HP_clif_plapineDdukDdak_ack_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_plapineDdukDdak_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_plapineDdukDdak_ack_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_plapineDdukDdak_close(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_plapineDdukDdak_close_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_plapineDdukDdak_close_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_plapineDdukDdak_close_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.plapineDdukDdak_close(fd, sd); + } + if (HPMHooks.count.HP_clif_plapineDdukDdak_close_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_plapineDdukDdak_close_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_plapineDdukDdak_close_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pReqGearOff(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pReqGearOff_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqGearOff_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqGearOff_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqGearOff(fd, sd); + } + if (HPMHooks.count.HP_clif_pReqGearOff_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqGearOff_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqGearOff_post[hIndex].func; postHookFunc(fd, sd); } } @@ -31151,11 +32954,11 @@ struct guild* HP_guild_search(int guild_id) { } return retVal___; } -struct guild* HP_guild_searchname(char *str) { +struct guild* HP_guild_searchname(const char *str) { int hIndex = 0; struct guild* retVal___ = NULL; if (HPMHooks.count.HP_guild_searchname_pre > 0) { - struct guild* (*preHookFunc) (char **str); + struct guild* (*preHookFunc) (const char **str); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_searchname_pre[hIndex].func; @@ -31170,7 +32973,7 @@ struct guild* HP_guild_searchname(char *str) { retVal___ = HPMHooks.source.guild.searchname(str); } if (HPMHooks.count.HP_guild_searchname_post > 0) { - struct guild* (*postHookFunc) (struct guild* retVal___, char *str); + struct guild* (*postHookFunc) (struct guild* retVal___, const char *str); for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_searchname_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); @@ -31986,11 +33789,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; @@ -32005,7 +33808,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); @@ -32256,33 +34059,6 @@ int HP_guild_send_message(struct map_session_data *sd, const char *mes) { } return retVal___; } -int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_guild_recv_message_pre > 0) { - int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_guild_recv_message_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &mes, &len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.guild.recv_message(guild_id, account_id, mes, len); - } - if (HPMHooks.count.HP_guild_recv_message_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, const char *mes, int len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_guild_recv_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, guild_id, account_id, mes, len); - } - } - return retVal___; -} int HP_guild_send_dot_remove(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; @@ -32866,15 +34642,15 @@ bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) { } return retVal___; } -bool HP_guild_read_castledb(char *str[], int columns, int current) { +bool HP_guild_read_castledb_libconfig(void) { int hIndex = 0; bool retVal___ = false; - if (HPMHooks.count.HP_guild_read_castledb_pre > 0) { - bool (*preHookFunc) (char **str[], int *columns, int *current); + if (HPMHooks.count.HP_guild_read_castledb_libconfig_pre > 0) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_guild_read_castledb_pre[hIndex].func; - retVal___ = preHookFunc(&str, &columns, ¤t); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); } if (*HPMforce_return) { *HPMforce_return = false; @@ -32882,13 +34658,67 @@ bool HP_guild_read_castledb(char *str[], int columns, int current) { } } { - retVal___ = HPMHooks.source.guild.read_castledb(str, columns, current); + retVal___ = HPMHooks.source.guild.read_castledb_libconfig(); } - if (HPMHooks.count.HP_guild_read_castledb_post > 0) { - bool (*postHookFunc) (bool retVal___, char *str[], int columns, int current); - for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_guild_read_castledb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, columns, current); + if (HPMHooks.count.HP_guild_read_castledb_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_guild_read_castledb_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_guild_read_castledb_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_guild_read_castledb_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.read_castledb_libconfig_sub(it, idx, source); + } + if (HPMHooks.count.HP_guild_read_castledb_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_guild_read_castledb_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); + } + } + return retVal___; +} +bool HP_guild_read_castledb_libconfig_sub_warp(struct config_setting_t *wd, const char *source, struct guild_castle *gc) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **wd, const char **source, struct guild_castle **gc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_warp_pre[hIndex].func; + retVal___ = preHookFunc(&wd, &source, &gc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.read_castledb_libconfig_sub_warp(wd, source, gc); + } + if (HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *wd, const char *source, struct guild_castle *gc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_warp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, wd, source, gc); } } return retVal___; @@ -33945,15 +35775,15 @@ int HP_homun_dead(struct homun_data *hd) { } return retVal___; } -int HP_homun_vaporize(struct map_session_data *sd, enum homun_state flag) { +int HP_homun_vaporize(struct map_session_data *sd, enum homun_state state, bool force) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_homun_vaporize_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, enum homun_state *flag); + int (*preHookFunc) (struct map_session_data **sd, enum homun_state *state, bool *force); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_vaporize_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &flag); + retVal___ = preHookFunc(&sd, &state, &force); } if (*HPMforce_return) { *HPMforce_return = false; @@ -33961,13 +35791,13 @@ int HP_homun_vaporize(struct map_session_data *sd, enum homun_state flag) { } } { - retVal___ = HPMHooks.source.homun.vaporize(sd, flag); + retVal___ = HPMHooks.source.homun.vaporize(sd, state, force); } if (HPMHooks.count.HP_homun_vaporize_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum homun_state flag); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum homun_state state, bool force); for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_vaporize_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, flag); + retVal___ = postHookFunc(retVal___, sd, state, force); } } return retVal___; @@ -34133,11 +35963,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; @@ -34152,7 +35982,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_); @@ -34241,6 +36071,33 @@ int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) { } return retVal___; } +int HP_homun_gainexp_real(struct homun_data *hd, unsigned int exp) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_homun_gainexp_real_pre > 0) { + int (*preHookFunc) (struct homun_data **hd, unsigned int *exp); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_real_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_homun_gainexp_real_pre[hIndex].func; + retVal___ = preHookFunc(&hd, &exp); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.gainexp_real(hd, exp); + } + if (HPMHooks.count.HP_homun_gainexp_real_post > 0) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, unsigned int exp); + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_real_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_homun_gainexp_real_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, exp); + } + } + return retVal___; +} unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) { int hIndex = 0; unsigned int retVal___ = 0; @@ -34535,15 +36392,15 @@ int HP_homun_db_search(int key, int type) { } return retVal___; } -bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom) { +bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom, bool is_new) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_homun_create_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, const struct s_homunculus **hom); + bool (*preHookFunc) (struct map_session_data **sd, const struct s_homunculus **hom, bool *is_new); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_create_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &hom); + retVal___ = preHookFunc(&sd, &hom, &is_new); } if (*HPMforce_return) { *HPMforce_return = false; @@ -34551,13 +36408,13 @@ bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom } } { - retVal___ = HPMHooks.source.homun.create(sd, hom); + retVal___ = HPMHooks.source.homun.create(sd, hom, is_new); } if (HPMHooks.count.HP_homun_create_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom, bool is_new); for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, hom); + retVal___ = postHookFunc(retVal___, sd, hom, is_new); } } return retVal___; @@ -35530,11 +37387,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; @@ -35549,7 +37406,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); @@ -35557,141 +37414,6 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l } return retVal___; } -int HP_intif_broadcast(const char *mes, int len, int type) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_broadcast_pre > 0) { - int (*preHookFunc) (const char **mes, int *len, int *type); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_broadcast_pre[hIndex].func; - retVal___ = preHookFunc(&mes, &len, &type); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.intif.broadcast(mes, len, type); - } - if (HPMHooks.count.HP_intif_broadcast_post > 0) { - int (*postHookFunc) (int retVal___, const char *mes, int len, int type); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_broadcast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mes, len, type); - } - } - return retVal___; -} -int HP_intif_broadcast2(const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_broadcast2_pre > 0) { - int (*preHookFunc) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_broadcast2_pre[hIndex].func; - retVal___ = preHookFunc(&mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.intif.broadcast2(mes, len, fontColor, fontType, fontSize, fontAlign, fontY); - } - if (HPMHooks.count.HP_intif_broadcast2_post > 0) { - int (*postHookFunc) (int retVal___, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_broadcast2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mes, len, fontColor, fontType, fontSize, fontAlign, fontY); - } - } - return retVal___; -} -int HP_intif_main_message(struct map_session_data *sd, const char *message) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_main_message_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, const char **message); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_main_message_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &message); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.intif.main_message(sd, message); - } - if (HPMHooks.count.HP_intif_main_message_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *message); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_main_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, message); - } - } - return retVal___; -} -int HP_intif_wis_message(struct map_session_data *sd, const char *nick, const char *mes, int mes_len) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_wis_message_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, const char **nick, const char **mes, int *mes_len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_wis_message_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &nick, &mes, &mes_len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.intif.wis_message(sd, nick, mes, mes_len); - } - if (HPMHooks.count.HP_intif_wis_message_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *nick, const char *mes, int mes_len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_wis_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, nick, mes, mes_len); - } - } - return retVal___; -} -int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_wis_message_to_gm_pre > 0) { - int (*preHookFunc) (char **Wisp_name, int *permission, char **mes); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_pre[hIndex].func; - retVal___ = preHookFunc(&Wisp_name, &permission, &mes); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.intif.wis_message_to_gm(Wisp_name, permission, mes); - } - if (HPMHooks.count.HP_intif_wis_message_to_gm_post > 0) { - int (*postHookFunc) (int retVal___, char *Wisp_name, int permission, char *mes); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_post[hIndex].func; - retVal___ = postHookFunc(retVal___, Wisp_name, permission, mes); - } - } - return retVal___; -} int HP_intif_saveregistry(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; @@ -36041,33 +37763,6 @@ int HP_intif_break_party(int party_id) { } return retVal___; } -int HP_intif_party_message(int party_id, int account_id, const char *mes, int len) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_party_message_pre > 0) { - int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_party_message_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &mes, &len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.intif.party_message(party_id, account_id, mes, len); - } - if (HPMHooks.count.HP_intif_party_message_post > 0) { - int (*postHookFunc) (int retVal___, int party_id, int account_id, const char *mes, int len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_party_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, party_id, account_id, mes, len); - } - } - return retVal___; -} int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; @@ -36203,11 +37898,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; @@ -36222,7 +37917,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); @@ -36257,33 +37952,6 @@ int HP_intif_guild_break(int guild_id) { } return retVal___; } -int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int len) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_guild_message_pre > 0) { - int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_guild_message_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &mes, &len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.intif.guild_message(guild_id, account_id, mes, len); - } - if (HPMHooks.count.HP_intif_guild_message_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, const char *mes, int len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_guild_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, guild_id, account_id, mes, len); - } - } - return retVal___; -} int HP_intif_guild_change_gm(int guild_id, const char *name, int len) { int hIndex = 0; int retVal___ = 0; @@ -37416,15 +39084,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; @@ -37432,13 +39100,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___; @@ -37497,6 +39165,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; @@ -37656,117 +39376,6 @@ void HP_intif_achievements_save(struct map_session_data *sd) { } return; } -void HP_intif_pWisMessage(int fd) { - int hIndex = 0; - if (HPMHooks.count.HP_intif_pWisMessage_pre > 0) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_pWisMessage_pre[hIndex].func; - preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.intif.pWisMessage(fd); - } - if (HPMHooks.count.HP_intif_pWisMessage_post > 0) { - void (*postHookFunc) (int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_pWisMessage_post[hIndex].func; - postHookFunc(fd); - } - } - return; -} -void HP_intif_pWisEnd(int fd) { - int hIndex = 0; - if (HPMHooks.count.HP_intif_pWisEnd_pre > 0) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_pWisEnd_pre[hIndex].func; - preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.intif.pWisEnd(fd); - } - if (HPMHooks.count.HP_intif_pWisEnd_post > 0) { - void (*postHookFunc) (int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_pWisEnd_post[hIndex].func; - postHookFunc(fd); - } - } - return; -} -int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_pWisToGM_sub_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, va_list va); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_pre; hIndex++) { - va_list va___copy; va_copy(va___copy, va); - preHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_pre[hIndex].func; - retVal___ = preHookFunc(&sd, va___copy); - va_end(va___copy); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - va_list va___copy; va_copy(va___copy, va); - retVal___ = HPMHooks.source.intif.pWisToGM_sub(sd, va___copy); - va_end(va___copy); - } - if (HPMHooks.count.HP_intif_pWisToGM_sub_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_post; hIndex++) { - va_list va___copy; va_copy(va___copy, va); - postHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, va___copy); - va_end(va___copy); - } - } - return retVal___; -} -void HP_intif_pWisToGM(int fd) { - int hIndex = 0; - if (HPMHooks.count.HP_intif_pWisToGM_pre > 0) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_pWisToGM_pre[hIndex].func; - preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.intif.pWisToGM(fd); - } - if (HPMHooks.count.HP_intif_pWisToGM_post > 0) { - void (*postHookFunc) (int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_pWisToGM_post[hIndex].func; - postHookFunc(fd); - } - } - return; -} void HP_intif_pRegisters(int fd) { int hIndex = 0; if (HPMHooks.count.HP_intif_pRegisters_pre > 0) { @@ -38131,32 +39740,6 @@ void HP_intif_pPartyBroken(int fd) { } return; } -void HP_intif_pPartyMessage(int fd) { - int hIndex = 0; - if (HPMHooks.count.HP_intif_pPartyMessage_pre > 0) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_pPartyMessage_pre[hIndex].func; - preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.intif.pPartyMessage(fd); - } - if (HPMHooks.count.HP_intif_pPartyMessage_post > 0) { - void (*postHookFunc) (int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_pPartyMessage_post[hIndex].func; - postHookFunc(fd); - } - } - return; -} void HP_intif_pGuildCreated(int fd) { int hIndex = 0; if (HPMHooks.count.HP_intif_pGuildCreated_pre > 0) { @@ -38313,32 +39896,6 @@ void HP_intif_pGuildBroken(int fd) { } return; } -void HP_intif_pGuildMessage(int fd) { - int hIndex = 0; - if (HPMHooks.count.HP_intif_pGuildMessage_pre > 0) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_pGuildMessage_pre[hIndex].func; - preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.intif.pGuildMessage(fd); - } - if (HPMHooks.count.HP_intif_pGuildMessage_post > 0) { - void (*postHookFunc) (int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_pGuildMessage_post[hIndex].func; - postHookFunc(fd); - } - } - return; -} void HP_intif_pGuildBasicInfoChanged(int fd) { int hIndex = 0; if (HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre > 0) { @@ -40300,11 +41857,11 @@ struct item_data* HP_itemdb_search_name(const char *name) { } return retVal___; } -int HP_itemdb_search_name_array(struct item_data **data, int size, const char *str, int flag) { +int HP_itemdb_search_name_array(struct item_data **data, const int size, const char *str, enum item_name_search_flag flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_itemdb_search_name_array_pre > 0) { - int (*preHookFunc) (struct item_data ***data, int *size, const char **str, int *flag); + int (*preHookFunc) (struct item_data ***data, const int *size, const char **str, enum item_name_search_flag *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_search_name_array_pre[hIndex].func; @@ -40319,7 +41876,7 @@ int HP_itemdb_search_name_array(struct item_data **data, int size, const char *s retVal___ = HPMHooks.source.itemdb.search_name_array(data, size, str, flag); } if (HPMHooks.count.HP_itemdb_search_name_array_post > 0) { - int (*postHookFunc) (int retVal___, struct item_data **data, int size, const char *str, int flag); + int (*postHookFunc) (int retVal___, struct item_data **data, const int size, const char *str, enum item_name_search_flag flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_search_name_array_post[hIndex].func; retVal___ = postHookFunc(retVal___, data, size, str, flag); @@ -41199,15 +42756,15 @@ int HP_itemdb_isidentified2(struct item_data *data) { } return retVal___; } -int HP_itemdb_combo_split_atoi(char *str, int *val) { +bool HP_itemdb_read_combodb_libconfig(void) { int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_itemdb_combo_split_atoi_pre > 0) { - int (*preHookFunc) (char **str, int **val); + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_combodb_libconfig_pre > 0) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_itemdb_combo_split_atoi_pre[hIndex].func; - retVal___ = preHookFunc(&str, &val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combodb_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_combodb_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); } if (*HPMforce_return) { *HPMforce_return = false; @@ -41215,42 +42772,43 @@ int HP_itemdb_combo_split_atoi(char *str, int *val) { } } { - retVal___ = HPMHooks.source.itemdb.combo_split_atoi(str, val); + retVal___ = HPMHooks.source.itemdb.read_combodb_libconfig(); } - if (HPMHooks.count.HP_itemdb_combo_split_atoi_post > 0) { - int (*postHookFunc) (int retVal___, char *str, int *val); - for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_itemdb_combo_split_atoi_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, val); + if (HPMHooks.count.HP_itemdb_read_combodb_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combodb_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_combodb_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_itemdb_read_combos(void) { +bool HP_itemdb_read_combodb_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { int hIndex = 0; - if (HPMHooks.count.HP_itemdb_read_combos_pre > 0) { - void (*preHookFunc) (void); + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_combodb_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_itemdb_read_combos_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_itemdb_read_combos_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combodb_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_combodb_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); } if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.itemdb.read_combos(); + retVal___ = HPMHooks.source.itemdb.read_combodb_libconfig_sub(it, idx, source); } - if (HPMHooks.count.HP_itemdb_read_combos_post > 0) { - void (*postHookFunc) (void); - for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_itemdb_read_combos_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_itemdb_read_combodb_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_itemdb_read_combodb_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_combodb_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); } } - return; + return retVal___; } int HP_itemdb_gendercheck(struct item_data *id) { int hIndex = 0; @@ -41717,7 +43275,173 @@ 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___; +} +bool HP_itemdb_read_libconfig_lapineddukddak(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_lapineddukddak(); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_lapineddukddak_sub(struct config_setting_t *it, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_lapineddukddak_sub(it, source); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, source); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_lapineddukddak_sub_sources(struct config_setting_t *sources, struct item_data *data) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **sources, struct item_data **data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre[hIndex].func; + retVal___ = preHookFunc(&sources, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_lapineddukddak_sub_sources(sources, data); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *sources, struct item_data *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sources, data); + } + } + return retVal___; +} /* libconfig_interface */ +void HP_libconfig_set_db_path(const char *db_path) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_set_db_path_pre > 0) { + void (*preHookFunc) (const char **db_path); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_set_db_path_pre[hIndex].func; + preHookFunc(&db_path); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_db_path(db_path); + } + if (HPMHooks.count.HP_libconfig_set_db_path_post > 0) { + void (*postHookFunc) (const char *db_path); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_set_db_path_post[hIndex].func; + postHookFunc(db_path); + } + } + return; +} +void HP_libconfig_format_db_path(const char *filename, char *path_buf, int buffer_len) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_format_db_path_pre > 0) { + void (*preHookFunc) (const char **filename, char **path_buf, int *buffer_len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_format_db_path_pre[hIndex].func; + preHookFunc(&filename, &path_buf, &buffer_len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.format_db_path(filename, path_buf, buffer_len); + } + if (HPMHooks.count.HP_libconfig_format_db_path_post > 0) { + void (*postHookFunc) (const char *filename, char *path_buf, int buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_format_db_path_post[hIndex].func; + postHookFunc(filename, path_buf, buffer_len); + } + } + return; +} int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; @@ -44094,15 +45818,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; @@ -44110,13 +45834,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___; @@ -44415,6 +46139,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) { @@ -46296,15 +48046,15 @@ void HP_map_deliddb(struct block_list *bl) { } return; } -struct map_session_data* HP_map_nick2sd(const char *nick) { +struct map_session_data* HP_map_nick2sd(const char *nick, bool allow_partial) { int hIndex = 0; struct map_session_data* retVal___ = NULL; if (HPMHooks.count.HP_map_nick2sd_pre > 0) { - struct map_session_data* (*preHookFunc) (const char **nick); + struct map_session_data* (*preHookFunc) (const char **nick, bool *allow_partial); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_nick2sd_pre[hIndex].func; - retVal___ = preHookFunc(&nick); + retVal___ = preHookFunc(&nick, &allow_partial); } if (*HPMforce_return) { *HPMforce_return = false; @@ -46312,13 +48062,13 @@ struct map_session_data* HP_map_nick2sd(const char *nick) { } } { - retVal___ = HPMHooks.source.map.nick2sd(nick); + retVal___ = HPMHooks.source.map.nick2sd(nick, allow_partial); } if (HPMHooks.count.HP_map_nick2sd_post > 0) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, const char *nick); + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, const char *nick, bool allow_partial); for (hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_nick2sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nick); + retVal___ = postHookFunc(retVal___, nick, allow_partial); } } return retVal___; @@ -48013,31 +49763,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; @@ -48120,6 +49871,60 @@ void HP_map_zone_clear_single(struct map_zone_data *zone) { return; } /* mapindex_interface */ +bool HP_mapindex_config_read_dbpath(const char *filename, const struct config_t *config) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mapindex_config_read_dbpath_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_dbpath_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapindex_config_read_dbpath_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.config_read_dbpath(filename, config); + } + if (HPMHooks.count.HP_mapindex_config_read_dbpath_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_dbpath_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapindex_config_read_dbpath_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config); + } + } + return retVal___; +} +bool HP_mapindex_config_read(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mapindex_config_read_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapindex_config_read_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.config_read(); + } + if (HPMHooks.count.HP_mapindex_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapindex_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} int HP_mapindex_init(void) { int hIndex = 0; int retVal___ = 0; @@ -49709,6 +51514,39 @@ void HP_mob_reload(void) { } return; } +int HP_mob_reload_sub_mob(struct mob_data *md, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mob_reload_sub_mob_pre > 0) { + int (*preHookFunc) (struct mob_data **md, va_list args); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_sub_mob_pre; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_mob_reload_sub_mob_pre[hIndex].func; + retVal___ = preHookFunc(&md, args___copy); + va_end(args___copy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.mob.reload_sub_mob(md, args___copy); + va_end(args___copy); + } + if (HPMHooks.count.HP_mob_reload_sub_mob_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_sub_mob_post; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_mob_reload_sub_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, args___copy); + va_end(args___copy); + } + } + return retVal___; +} struct mob_db* HP_mob_db(int index) { int hIndex = 0; struct mob_db* retVal___ = NULL; @@ -50720,6 +52558,33 @@ int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { } return retVal___; } +bool HP_mob_is_in_battle_state(const struct mob_data *md) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_is_in_battle_state_pre > 0) { + bool (*preHookFunc) (const struct mob_data **md); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_in_battle_state_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_is_in_battle_state_pre[hIndex].func; + retVal___ = preHookFunc(&md); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.is_in_battle_state(md); + } + if (HPMHooks.count.HP_mob_is_in_battle_state_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct mob_data *md); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_in_battle_state_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_is_in_battle_state_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; @@ -51008,15 +52873,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; @@ -51024,13 +52915,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___; @@ -51923,6 +53814,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) { @@ -52189,6 +54188,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) { @@ -52215,6 +54241,32 @@ void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) } return; } +void HP_mob_read_db_viewdata_sub(struct mob_db *entry, struct config_setting_t *t) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_read_db_viewdata_sub_pre > 0) { + void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_viewdata_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_db_viewdata_sub_pre[hIndex].func; + preHookFunc(&entry, &t); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.read_db_viewdata_sub(entry, t); + } + if (HPMHooks.count.HP_mob_read_db_viewdata_sub_post > 0) { + void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *t); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_viewdata_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_db_viewdata_sub_post[hIndex].func; + postHookFunc(entry, t); + } + } + return; +} void HP_mob_name_constants(void) { int hIndex = 0; if (HPMHooks.count.HP_mob_name_constants_pre > 0) { @@ -52241,32 +54293,31 @@ void HP_mob_name_constants(void) { } return; } -bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { +void HP_mob_mobavail_removal_notice(void) { int hIndex = 0; - bool retVal___ = false; - if (HPMHooks.count.HP_mob_readdb_mobavail_pre > 0) { - bool (*preHookFunc) (char **str[], int *columns, int *current); + if (HPMHooks.count.HP_mob_mobavail_removal_notice_pre > 0) { + void (*preHookFunc) (void); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_pre[hIndex].func; - retVal___ = preHookFunc(&str, &columns, ¤t); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mobavail_removal_notice_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_mobavail_removal_notice_pre[hIndex].func; + preHookFunc(); } if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.readdb_mobavail(str, columns, current); + HPMHooks.source.mob.mobavail_removal_notice(); } - if (HPMHooks.count.HP_mob_readdb_mobavail_post > 0) { - bool (*postHookFunc) (bool retVal___, char *str[], int columns, int current); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, columns, current); + if (HPMHooks.count.HP_mob_mobavail_removal_notice_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mobavail_removal_notice_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_mobavail_removal_notice_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } int HP_mob_read_randommonster(void) { int hIndex = 0; @@ -52592,6 +54643,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; @@ -54894,11 +56971,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; @@ -54913,7 +56990,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_); @@ -55434,10 +57511,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; @@ -55452,7 +57529,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_); @@ -55977,11 +58054,12 @@ void HP_npc_trader_update(int master) { } return; } -int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) { +enum market_buy_result HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) { +/* Unknown return type 'enum market_buy_result'. Initializing to '0'. */ int hIndex = 0; - int retVal___ = 0; + enum market_buy_result retVal___ = 0; if (HPMHooks.count.HP_npc_market_buylist_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); + enum market_buy_result (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func; @@ -55996,7 +58074,7 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis retVal___ = HPMHooks.source.npc.market_buylist(sd, item_list); } if (HPMHooks.count.HP_npc_market_buylist_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); + enum market_buy_result (*postHookFunc) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); @@ -56004,6 +58082,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; @@ -56057,10 +58162,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; @@ -56075,7 +58180,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); @@ -56083,10 +58188,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; @@ -56101,7 +58206,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); @@ -56109,10 +58214,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; @@ -56127,7 +58232,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); @@ -56135,6 +58240,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; @@ -56188,6 +58397,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; @@ -56242,6 +58477,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; @@ -56965,33 +59305,6 @@ int HP_party_send_message(struct map_session_data *sd, const char *mes) { } return retVal___; } -int HP_party_recv_message(int party_id, int account_id, const char *mes, int len) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_party_recv_message_pre > 0) { - int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_party_recv_message_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &mes, &len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.party.recv_message(party_id, account_id, mes, len); - } - if (HPMHooks.count.HP_party_recv_message_post > 0) { - int (*postHookFunc) (int retVal___, int party_id, int account_id, const char *mes, int len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_party_recv_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, party_id, account_id, mes, len); - } - } - return retVal___; -} int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; @@ -58356,10 +60669,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; @@ -58374,7 +60687,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); @@ -58838,11 +61151,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; @@ -58857,7 +61170,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); @@ -58892,11 +61205,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; @@ -58911,7 +61224,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); @@ -59054,11 +61367,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; @@ -59073,7 +61386,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); @@ -59486,11 +61799,11 @@ int HP_pc_updateweightstatus(struct map_session_data *sd) { } return retVal___; } -int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill) { +int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned int pos, bool onskill) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_addautobonus_pre > 0) { - int (*preHookFunc) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned short *pos, bool *onskill); + int (*preHookFunc) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned int *pos, bool *onskill); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_addautobonus_pre[hIndex].func; @@ -59505,7 +61818,7 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc retVal___ = HPMHooks.source.pc.addautobonus(bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill); } if (HPMHooks.count.HP_pc_addautobonus_post > 0) { - int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill); + int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned int pos, bool onskill); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_addautobonus_post[hIndex].func; retVal___ = postHookFunc(retVal___, bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill); @@ -62008,11 +64321,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; @@ -62027,7 +64340,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); @@ -62035,11 +64348,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; @@ -62054,7 +64367,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); @@ -63164,15 +65477,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; @@ -63180,13 +65493,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___; @@ -64330,6 +66643,33 @@ int HP_pc_have_magnifier(struct map_session_data *sd) { } return retVal___; } +int HP_pc_have_item_chain(struct map_session_data *sd, enum e_chain_cache chain_cache_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_have_item_chain_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, enum e_chain_cache *chain_cache_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_item_chain_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_have_item_chain_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &chain_cache_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.have_item_chain(sd, chain_cache_id); + } + if (HPMHooks.count.HP_pc_have_item_chain_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum e_chain_cache chain_cache_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_item_chain_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_have_item_chain_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, chain_cache_id); + } + } + return retVal___; +} bool HP_pc_process_chat_message(struct map_session_data *sd, const char *message) { int hIndex = 0; bool retVal___ = false; @@ -64357,6 +66697,66 @@ bool HP_pc_process_chat_message(struct map_session_data *sd, const char *message } return retVal___; } +int HP_pc_wis_message_to_gm(const char *sender_name, int permission, const char *message) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_wis_message_to_gm_pre > 0) { + int (*preHookFunc) (const char **sender_name, int *permission, const char **message); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_pre[hIndex].func; + retVal___ = preHookFunc(&sender_name, &permission, &message); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.wis_message_to_gm(sender_name, permission, message); + } + if (HPMHooks.count.HP_pc_wis_message_to_gm_post > 0) { + int (*postHookFunc) (int retVal___, const char *sender_name, int permission, const char *message); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sender_name, permission, message); + } + } + return retVal___; +} +int HP_pc_wis_message_to_gm_sub(struct map_session_data *sd, va_list va) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_wis_message_to_gm_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list va); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_sub_pre; hIndex++) { + va_list va___copy; va_copy(va___copy, va); + preHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd, va___copy); + va_end(va___copy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list va___copy; va_copy(va___copy, va); + retVal___ = HPMHooks.source.pc.wis_message_to_gm_sub(sd, va___copy); + va_end(va___copy); + } + if (HPMHooks.count.HP_pc_wis_message_to_gm_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_sub_post; hIndex++) { + va_list va___copy; va_copy(va___copy, va); + postHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, va___copy); + va_end(va___copy); + } + } + return retVal___; +} void HP_pc_check_supernovice_call(struct map_session_data *sd, const char *message) { int hIndex = 0; if (HPMHooks.count.HP_pc_check_supernovice_call_pre > 0) { @@ -64464,6 +66864,60 @@ 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___; +} +bool HP_pc_auto_exp_insurance(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_auto_exp_insurance_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_auto_exp_insurance_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_auto_exp_insurance_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.auto_exp_insurance(sd); + } + if (HPMHooks.count.HP_pc_auto_exp_insurance_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_auto_exp_insurance_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_auto_exp_insurance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + 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; @@ -65219,11 +67673,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; @@ -65238,7 +67692,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); @@ -66552,14 +69006,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; @@ -66567,17 +69076,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; @@ -67002,10 +69861,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; @@ -67020,7 +69879,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); @@ -67238,6 +70097,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; @@ -72019,15 +74930,42 @@ bool HP_script_load_translation_addstring(const char *file, uint8 lang_id, const } return retVal___; } -int HP_script_load_translation(const char *file, uint8 lang_id) { +int HP_script_load_translation_file(const char *file, uint8 lang_id) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_script_load_translation_pre > 0) { + if (HPMHooks.count.HP_script_load_translation_file_pre > 0) { int (*preHookFunc) (const char **file, uint8 *lang_id); *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_file_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_load_translation_file_pre[hIndex].func; + retVal___ = preHookFunc(&file, &lang_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.load_translation_file(file, lang_id); + } + if (HPMHooks.count.HP_script_load_translation_file_post > 0) { + int (*postHookFunc) (int retVal___, const char *file, uint8 lang_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_file_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_load_translation_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, lang_id); + } + } + return retVal___; +} +int HP_script_load_translation(const char *directory, uint8 lang_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_load_translation_pre > 0) { + int (*preHookFunc) (const char **directory, uint8 *lang_id); + *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_load_translation_pre[hIndex].func; - retVal___ = preHookFunc(&file, &lang_id); + retVal___ = preHookFunc(&directory, &lang_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -72035,13 +74973,13 @@ int HP_script_load_translation(const char *file, uint8 lang_id) { } } { - retVal___ = HPMHooks.source.script.load_translation(file, lang_id); + retVal___ = HPMHooks.source.script.load_translation(directory, lang_id); } if (HPMHooks.count.HP_script_load_translation_post > 0) { - int (*postHookFunc) (int retVal___, const char *file, uint8 lang_id); + int (*postHookFunc) (int retVal___, const char *directory, uint8 lang_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_load_translation_post[hIndex].func; - retVal___ = postHookFunc(retVal___, file, lang_id); + retVal___ = postHookFunc(retVal___, directory, lang_id); } } return retVal___; @@ -72159,15 +75097,15 @@ uint8 HP_script_add_language(const char *name) { } return retVal___; } -const char* HP_script_get_translation_file_name(const char *file) { +const char* HP_script_get_translation_dir_name(const char *directory) { int hIndex = 0; const char* retVal___ = NULL; - if (HPMHooks.count.HP_script_get_translation_file_name_pre > 0) { - const char* (*preHookFunc) (const char **file); + if (HPMHooks.count.HP_script_get_translation_dir_name_pre > 0) { + const char* (*preHookFunc) (const char **directory); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_script_get_translation_file_name_pre[hIndex].func; - retVal___ = preHookFunc(&file); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_dir_name_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_get_translation_dir_name_pre[hIndex].func; + retVal___ = preHookFunc(&directory); } if (*HPMforce_return) { *HPMforce_return = false; @@ -72175,13 +75113,13 @@ const char* HP_script_get_translation_file_name(const char *file) { } } { - retVal___ = HPMHooks.source.script.get_translation_file_name(file); + retVal___ = HPMHooks.source.script.get_translation_dir_name(directory); } - if (HPMHooks.count.HP_script_get_translation_file_name_post > 0) { - const char* (*postHookFunc) (const char* retVal___, const char *file); - for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_script_get_translation_file_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, file); + if (HPMHooks.count.HP_script_get_translation_dir_name_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *directory); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_dir_name_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_get_translation_dir_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, directory); } } return retVal___; @@ -72290,6 +75228,84 @@ void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_ } return; } +void HP_script_run_item_rental_end_script(struct map_session_data *sd, struct item_data *data, int oid) { + int hIndex = 0; + if (HPMHooks.count.HP_script_run_item_rental_end_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_end_script_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_run_item_rental_end_script_pre[hIndex].func; + preHookFunc(&sd, &data, &oid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run_item_rental_end_script(sd, data, oid); + } + if (HPMHooks.count.HP_script_run_item_rental_end_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_end_script_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_run_item_rental_end_script_post[hIndex].func; + postHookFunc(sd, data, oid); + } + } + return; +} +void HP_script_run_item_rental_start_script(struct map_session_data *sd, struct item_data *data, int oid) { + int hIndex = 0; + if (HPMHooks.count.HP_script_run_item_rental_start_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_start_script_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_run_item_rental_start_script_pre[hIndex].func; + preHookFunc(&sd, &data, &oid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run_item_rental_start_script(sd, data, oid); + } + if (HPMHooks.count.HP_script_run_item_rental_start_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_start_script_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_run_item_rental_start_script_post[hIndex].func; + postHookFunc(sd, data, oid); + } + } + return; +} +void HP_script_run_item_lapineddukddak_script(struct map_session_data *sd, struct item_data *data, int oid) { + int hIndex = 0; + if (HPMHooks.count.HP_script_run_item_lapineddukddak_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_lapineddukddak_script_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_run_item_lapineddukddak_script_pre[hIndex].func; + preHookFunc(&sd, &data, &oid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run_item_lapineddukddak_script(sd, data, oid); + } + if (HPMHooks.count.HP_script_run_item_lapineddukddak_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_lapineddukddak_script_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_run_item_lapineddukddak_script_post[hIndex].func; + postHookFunc(sd, data, oid); + } + } + return; +} /* searchstore_interface */ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { int hIndex = 0; @@ -72528,15 +75544,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; @@ -72544,13 +75560,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___; @@ -76185,6 +79201,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; @@ -79551,15 +82593,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; @@ -79567,17 +82609,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; @@ -79631,6 +82699,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; @@ -79737,6 +82831,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) { @@ -81009,33 +84130,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; @@ -81117,14 +84211,14 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) { } return retVal___; } -int HP_status_type2relevant_bl_types(int type) { +int HP_status_get_sc_relevant_bl_types(sc_type type) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_status_type2relevant_bl_types_pre > 0) { - int (*preHookFunc) (int *type); + if (HPMHooks.count.HP_status_get_sc_relevant_bl_types_pre > 0) { + int (*preHookFunc) (sc_type *type); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_relevant_bl_types_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_sc_relevant_bl_types_pre[hIndex].func; retVal___ = preHookFunc(&type); } if (*HPMforce_return) { @@ -81133,12 +84227,12 @@ int HP_status_type2relevant_bl_types(int type) { } } { - retVal___ = HPMHooks.source.status.type2relevant_bl_types(type); + retVal___ = HPMHooks.source.status.get_sc_relevant_bl_types(type); } - if (HPMHooks.count.HP_status_type2relevant_bl_types_post > 0) { - int (*postHookFunc) (int retVal___, int type); - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_post[hIndex].func; + if (HPMHooks.count.HP_status_get_sc_relevant_bl_types_post > 0) { + int (*postHookFunc) (int retVal___, sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_relevant_bl_types_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_sc_relevant_bl_types_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } } @@ -81171,6 +84265,33 @@ int HP_status_get_sc_type(sc_type idx) { } return retVal___; } +int HP_status_get_sc_icon(sc_type type) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_get_sc_icon_pre > 0) { + int (*preHookFunc) (sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_icon_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_sc_icon_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_sc_icon(type); + } + if (HPMHooks.count.HP_status_get_sc_icon_post > 0) { + int (*postHookFunc) (int retVal___, sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_icon_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_sc_icon_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); + } + } + return retVal___; +} int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag) { int hIndex = 0; int retVal___ = 0; @@ -81252,11 +84373,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; @@ -81271,7 +84392,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); @@ -81279,11 +84400,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; @@ -81298,7 +84419,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); @@ -81306,11 +84427,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; @@ -81325,7 +84446,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); @@ -81979,6 +85100,33 @@ int HP_status_change_start(struct block_list *src, struct block_list *bl, enum s } return retVal___; } +int HP_status_change_start_sub(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int total_tick, int flag) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_change_start_sub_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *total_tick, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_sub_pre[hIndex].func; + retVal___ = preHookFunc(&src, &bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &total_tick, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_start_sub(src, bl, type, rate, val1, val2, val3, val4, tick, total_tick, flag); + } + if (HPMHooks.count.HP_status_change_start_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int total_tick, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, type, rate, val1, val2, val3, val4, tick, total_tick, flag); + } + } + return retVal___; +} int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, const char *file, int line) { int hIndex = 0; int retVal___ = 0; @@ -82193,15 +85341,15 @@ void HP_status_change_start_display(struct map_session_data *sd, enum sc_type ty } return; } -bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { +bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_status_change_start_unknown_sc_pre > 0) { - bool (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *total_tick, int *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_pre[hIndex].func; - retVal___ = preHookFunc(&src, &bl, &type, &calc_flag, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + retVal___ = preHookFunc(&src, &bl, &type, &calc_flag, &rate, &val1, &val2, &val3, &val4, &total_tick, &flag); } if (*HPMforce_return) { *HPMforce_return = false; @@ -82209,13 +85357,13 @@ bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list } } { - retVal___ = HPMHooks.source.status.change_start_unknown_sc(src, bl, type, calc_flag, rate, val1, val2, val3, val4, tick, flag); + retVal___ = HPMHooks.source.status.change_start_unknown_sc(src, bl, type, calc_flag, rate, val1, val2, val3, val4, total_tick, flag); } if (HPMHooks.count.HP_status_change_start_unknown_sc_post > 0) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag); + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, type, calc_flag, rate, val1, val2, val3, val4, tick, flag); + retVal___ = postHookFunc(retVal___, src, bl, type, calc_flag, rate, val1, val2, val3, val4, total_tick, flag); } } return retVal___; @@ -82868,11 +86016,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; @@ -82887,7 +86035,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); @@ -82895,11 +86043,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; @@ -82914,7 +86062,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); @@ -83162,11 +86310,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; @@ -83181,7 +86329,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); @@ -83243,6 +86391,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; @@ -83432,11 +86634,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; @@ -83451,7 +86653,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); @@ -83459,11 +86661,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; @@ -83478,7 +86680,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); @@ -83486,11 +86688,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; @@ -83505,7 +86707,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); @@ -83513,11 +86715,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; @@ -83532,7 +86734,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); @@ -83540,11 +86742,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; @@ -83559,7 +86761,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); @@ -83567,11 +86769,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; @@ -83586,7 +86788,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); @@ -83864,11 +87066,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; @@ -83883,7 +87085,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); @@ -84083,15 +87285,15 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { } return retVal___; } -int HP_status_readdb_refine_libconfig(const char *filename) { +bool HP_status_read_scdb_libconfig(void) { int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_status_readdb_refine_libconfig_pre > 0) { - int (*preHookFunc) (const char **filename); + bool retVal___ = false; + if (HPMHooks.count.HP_status_read_scdb_libconfig_pre > 0) { + bool (*preHookFunc) (void); *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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); } if (*HPMforce_return) { *HPMforce_return = false; @@ -84099,26 +87301,26 @@ int HP_status_readdb_refine_libconfig(const char *filename) { } } { - retVal___ = HPMHooks.source.status.readdb_refine_libconfig(filename); + retVal___ = HPMHooks.source.status.read_scdb_libconfig(); } - 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); + if (HPMHooks.count.HP_status_read_scdb_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) { +bool HP_status_read_scdb_libconfig_sub(struct config_setting_t *it, int idx, 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); + bool retVal___ = false; + if (HPMHooks.count.HP_status_read_scdb_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_status_readdb_refine_libconfig_sub_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_pre[hIndex].func; - retVal___ = preHookFunc(&r, &name, &source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); } if (*HPMforce_return) { *HPMforce_return = false; @@ -84126,26 +87328,26 @@ int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char } } { - retVal___ = HPMHooks.source.status.readdb_refine_libconfig_sub(r, name, source); + retVal___ = HPMHooks.source.status.read_scdb_libconfig_sub(it, idx, 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); + if (HPMHooks.count.HP_status_read_scdb_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_status_read_scdb_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); } } return retVal___; } -bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { +bool HP_status_read_scdb_libconfig_sub_flag(struct config_setting_t *it, int type, const char *source) { int hIndex = 0; bool retVal___ = false; - if (HPMHooks.count.HP_status_readdb_scconfig_pre > 0) { - bool (*preHookFunc) (char **fields[], int *columns, int *current); + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *type, const char **source); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_status_readdb_scconfig_pre[hIndex].func; - retVal___ = preHookFunc(&fields, &columns, ¤t); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_flag_pre[hIndex].func; + retVal___ = preHookFunc(&it, &type, &source); } if (*HPMforce_return) { *HPMforce_return = false; @@ -84153,13 +87355,40 @@ bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { } } { - retVal___ = HPMHooks.source.status.readdb_scconfig(fields, columns, current); + retVal___ = HPMHooks.source.status.read_scdb_libconfig_sub_flag(it, type, source); } - if (HPMHooks.count.HP_status_readdb_scconfig_post > 0) { - bool (*postHookFunc) (bool retVal___, char *fields[], int columns, int current); - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_status_readdb_scconfig_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, columns, current); + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int type, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_flag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, type, source); + } + } + return retVal___; +} +bool HP_status_read_scdb_libconfig_sub_flag_additional(struct config_setting_t *it, int type, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_additional_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *type, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_additional_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_flag_additional_pre[hIndex].func; + retVal___ = preHookFunc(&it, &type, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.read_scdb_libconfig_sub_flag_additional(it, type, source); + } + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_additional_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int type, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_additional_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_flag_additional_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, type, source); } } return retVal___; @@ -84216,14 +87445,14 @@ void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_ } return; } -void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) { +void HP_status_set_sc(uint16 skill_id, sc_type sc, unsigned int flag) { int hIndex = 0; if (HPMHooks.count.HP_status_set_sc_pre > 0) { - void (*preHookFunc) (uint16 *skill_id, sc_type *sc, int *icon, unsigned int *flag); + void (*preHookFunc) (uint16 *skill_id, sc_type *sc, unsigned int *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_set_sc_pre[hIndex].func; - preHookFunc(&skill_id, &sc, &icon, &flag); + preHookFunc(&skill_id, &sc, &flag); } if (*HPMforce_return) { *HPMforce_return = false; @@ -84231,13 +87460,13 @@ void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) } } { - HPMHooks.source.status.set_sc(skill_id, sc, icon, flag); + HPMHooks.source.status.set_sc(skill_id, sc, flag); } if (HPMHooks.count.HP_status_set_sc_post > 0) { - void (*postHookFunc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag); + void (*postHookFunc) (uint16 skill_id, sc_type sc, unsigned int flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_set_sc_post[hIndex].func; - postHookFunc(skill_id, sc, icon, flag); + postHookFunc(skill_id, sc, flag); } } return; @@ -84268,11 +87497,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; @@ -84287,7 +87516,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); @@ -84295,11 +87524,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; @@ -84314,7 +87543,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); @@ -85355,6 +88584,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; @@ -87421,11 +90888,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; @@ -87440,7 +90907,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); @@ -88120,11 +91587,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; @@ -88139,7 +91606,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); @@ -88147,10 +91614,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; @@ -88165,7 +91632,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); @@ -88199,11 +91666,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; @@ -88218,7 +91685,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); diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc index 151a5d8a1..53ee71a03 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.sources.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-2020 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 @@ -65,6 +65,7 @@ HPMHooks.source.mutex = *mutex; HPMHooks.source.npc_chat = *npc_chat; HPMHooks.source.npc = *npc; HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.packets = *packets; HPMHooks.source.party = *party; HPMHooks.source.path = *path; HPMHooks.source.pcg = *pcg; @@ -72,6 +73,8 @@ HPMHooks.source.pc = *pc; HPMHooks.source.libpcre = *libpcre; HPMHooks.source.pet = *pet; HPMHooks.source.quest = *quest; +HPMHooks.source.refine = *refine; +HPMHooks.source.PRIV__refine = *refine->p; HPMHooks.source.rnd = *rnd; HPMHooks.source.rodex = *rodex; HPMHooks.source.script = *script; @@ -84,6 +87,7 @@ HPMHooks.source.status = *status; HPMHooks.source.storage = *storage; HPMHooks.source.StrBuf = *StrBuf; HPMHooks.source.strlib = *strlib; +HPMHooks.source.stylist = *stylist; HPMHooks.source.sv = *sv; HPMHooks.source.sysinfo = *sysinfo; HPMHooks.source.thread = *thread; diff --git a/src/plugins/constdb2doc.c b/src/plugins/constdb2doc.c index 3f681ea1a..ebaf7a833 100644 --- a/src/plugins/constdb2doc.c +++ b/src/plugins/constdb2doc.c @@ -22,7 +22,8 @@ /// db/constants.conf -> doc/constants.md generator plugin #include "common/hercules.h" -//#include "common/memmgr.h" +#include "common/db.h" +#include "common/memmgr.h" #include "common/nullpo.h" #include "common/strlib.h" #include "map/itemdb.h" @@ -143,17 +144,26 @@ struct item_data *constdb2doc_itemdb_search(int nameid) void constdb2doc_itemdb(void) { - int i; - nullpo_retv(out_fp); fprintf(out_fp, "## Items (db/"DBPATH"item_db.conf)\n"); - for (i = 0; i < ARRAYLENGTH(itemdb->array); i++) { + for (int i = 0; i < ARRAYLENGTH(itemdb->array); i++) { struct item_data *id = constdb2doc_itemdb_search(i); if (id == NULL || id->name[0] == '\0') continue; fprintf(out_fp, "- `%s`: %d\n", id->name, id->nameid); } + + if (db_size(itemdb->other) > 0) { + struct DBIterator *iter = db_iterator(itemdb->other); + for (struct item_data *itd = dbi_first(iter); dbi_exists(iter); itd = dbi_next(iter)) { + if (itd == &itemdb->dummy) + continue; + fprintf(out_fp, "- `%s`: %d\n", itd->name, itd->nameid); + } + dbi_destroy(iter); + } + fprintf(out_fp, "\n"); } diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 2ece501b2..159d4e2a6 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -956,6 +956,7 @@ bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id) struct mob_db *md = mob->db(mob_id); char valname[15]; const char *name = config_setting_name(it); + char e_name[NAME_LENGTH*2+1]; nullpo_retr(false, it); Assert_retr(false, mob_id <= 0 || md != mob->dummy); @@ -966,7 +967,8 @@ bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id) StrBuf->Printf(&buf, "%d,", mob_id); // Info - StrBuf->Printf(&buf, "'%s@%s',", md->name, name); + SQL->EscapeString(NULL, e_name, md->name); + StrBuf->Printf(&buf, "'%s@%s',", e_name, name); if (mob->lookup_const(it, "SkillState", &i32) && (i32 < MSS_ANY || i32 > MSS_ANYTARGET)) { ShowWarning("mob_skill_db_libconfig_sub_skill: Invalid skill state %d for skill '%s' in monster %d, defaulting to MSS_ANY.\n", i32, name, mob_id); diff --git a/src/plugins/generate-translations.c b/src/plugins/generate-translations.c index 759e788a2..14a3c0a4d 100644 --- a/src/plugins/generate-translations.c +++ b/src/plugins/generate-translations.c @@ -22,11 +22,13 @@ #include "common/hercules.h" #include "common/cbasetypes.h" #include "common/memmgr.h" +#include "common/nullpo.h" #include "common/showmsg.h" #include "common/strlib.h" #include "common/sysinfo.h" #include "map/atcommand.h" #include "map/map.h" +#include "map/npc.h" #include "map/script.h" #include "plugins/HPMHooking.h" @@ -34,6 +36,8 @@ #include <stdio.h> #include <stdlib.h> +#include <sys/stat.h> +#include <time.h> HPExport struct hplugin_info pinfo = { "generate-translations", // Plugin name @@ -45,14 +49,33 @@ HPExport struct hplugin_info pinfo = { struct DBMap *translatable_strings; // string map parsed (used when exporting strings only) /* Set during startup when attempting to export the lang, unset after server initialization is over */ FILE *lang_export_fp; -char *lang_export_file;/* for lang_export_fp */ +char *lang_export_filepath; +#define DIRECTORYNAME "generated_translations" struct script_string_buf lang_export_line_buf; struct script_string_buf lang_export_escaped_buf; -int lang_export_stringcount; +int lang_export_stringcount_total; +int lang_export_stringcount_current; /// Whether the translations template generator will automatically run. bool generating_translations = false; +bool createdirectory(const char *dirname) +{ +#ifdef WIN32 + if (!CreateDirectory(dirname, NULL)) { + if (ERROR_ALREADY_EXISTS != GetLastError()) + return false; + } +#else /* Not WIN32 */ + struct stat st = { 0 }; + if (stat(dirname, &st) == -1 ) { + if (mkdir(dirname, 0755) != 0) + return false; + } +#endif // WIN32 check + return true; +} + /** * --generate-translations * @@ -61,49 +84,9 @@ bool generating_translations = false; */ CMDLINEARG(generatetranslations) { - lang_export_file = aStrdup("./generated_translations.pot"); - - if ((lang_export_fp = fopen(lang_export_file, "wb")) == NULL) { - ShowError("export-dialog: failed to open '%s' for writing\n", lang_export_file); - } else { - time_t t = time(NULL); - struct tm *lt = localtime(&t); - int year = lt->tm_year+1900; - char timestring[128] = ""; - strftime(timestring, sizeof(timestring), "%Y-%m-%d %H:%M:%S%z", lt); - fprintf(lang_export_fp, - "# This file is part of Hercules.\n" - "# http://herc.ws - http://github.com/HerculesWS/Hercules\n" - "#\n" - "# Copyright (C) 2013-%d Hercules Dev Team\n" - "#\n" - "# Hercules is free software: you can redistribute it and/or modify\n" - "# it under the terms of the GNU General Public License as published by\n" - "# the Free Software Foundation, either version 3 of the License, or\n" - "# (at your option) any later version.\n" - "#\n" - "# This program is distributed in the hope that it will be useful,\n" - "# but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "# GNU General Public License for more details.\n" - "#\n" - "# You should have received a copy of the GNU General Public License\n" - "# along with this program. If not, see <http://www.gnu.org/licenses/>.\n\n" - - "#,fuzzy\n" - "msgid \"\"\n" - "msgstr \"\"\n" - "\"Project-Id-Version: %s\\n\"\n" - "\"Report-Msgid-Bugs-To: dev@herc.ws\\n\"\n" - "\"POT-Creation-Date: %s\\n\"\n" - "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n" - "\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n" - "\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n" - "\"Language: \\n\"\n" - "\"MIME-Version: 1.0\\n\"\n" - "\"Content-Type: text/plain; charset=ISO-8859-1\\n\"\n" - "\"Content-Transfer-Encoding: 8bit\\n\"\n\n", - year, sysinfo->vcsrevision_scripts(), timestring); + if (!createdirectory(DIRECTORYNAME)) { + ShowError("generatetranslations: Unable to create output directory '%s'.\n", DIRECTORYNAME); + return false; } generating_translations = true; return true; @@ -188,7 +171,8 @@ void script_add_translatable_string_posthook(const struct script_string_buf *str script->parser_current_npc_name ? script->parser_current_npc_name : "Unknown NPC", VECTOR_DATA(lang_export_escaped_buf) ); - lang_export_stringcount++; + lang_export_stringcount_total++; + lang_export_stringcount_current++; VECTOR_TRUNCATE(lang_export_line_buf); VECTOR_TRUNCATE(lang_export_escaped_buf); } @@ -214,44 +198,184 @@ void script_parser_clean_leftovers_posthook(void) VECTOR_CLEAR(lang_export_escaped_buf); } +bool translations_enter_file(const char *filepath) +{ + const char *p = NULL; + int len, i; + + if (!generating_translations) + return false; + + p = filepath; + len = (int)strlen(filepath) + (int)strlen(DIRECTORYNAME) + (int)strlen(PATHSEP_STR); + lang_export_filepath = aCalloc(len + 4 + 1, sizeof(char)); // + ".pot" + strncat(lang_export_filepath, DIRECTORYNAME PATHSEP_STR, len); + lang_export_stringcount_current = 0; + + i = (int)strlen(lang_export_filepath); + while (*p != '\0') { + if (Assert_chk(i < len)) { + aFree(lang_export_filepath); + lang_export_filepath = NULL; + return false; + } + if (*p == '.') { + lang_export_filepath[i] = '_'; + } else if (*p == PATHSEP) { + if (!createdirectory(lang_export_filepath)) { + ShowError("generatetranslations: Unable to create output directory '%s'.\n", lang_export_filepath); + aFree(lang_export_filepath); + lang_export_filepath = NULL; + return false; + } + lang_export_filepath[i] = PATHSEP; + } else { + lang_export_filepath[i] = *p; + } + i++; + p++; + } + strncat(lang_export_filepath, ".pot", len + 4); + + if ((lang_export_fp = fopen(lang_export_filepath, "wb")) == NULL) { + ShowError("export-dialog: failed to open '%s' for writing\n", lang_export_filepath); + aFree(lang_export_filepath); + lang_export_filepath = NULL; + return false; + } + + { + time_t t = time(NULL); + struct tm *lt = localtime(&t); + int year = lt->tm_year+1900; + char timestring[128] = ""; + strftime(timestring, sizeof(timestring), "%Y-%m-%d %H:%M:%S%z", lt); + fprintf(lang_export_fp, + "# This file is part of Hercules.\n" + "# http://herc.ws - http://github.com/HerculesWS/Hercules\n" + "#\n" + "# Copyright (C) 2013-%d Hercules Dev Team\n" + "#\n" + "# Hercules is free software: you can redistribute it and/or modify\n" + "# it under the terms of the GNU General Public License as published by\n" + "# the Free Software Foundation, either version 3 of the License, or\n" + "# (at your option) any later version.\n" + "#\n" + "# This program is distributed in the hope that it will be useful,\n" + "# but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "# GNU General Public License for more details.\n" + "#\n" + "# You should have received a copy of the GNU General Public License\n" + "# along with this program. If not, see <http://www.gnu.org/licenses/>.\n\n" + + "#,fuzzy\n" + "msgid \"\"\n" + "msgstr \"\"\n" + "\"Project-Id-Version: %s\\n\"\n" + "\"Report-Msgid-Bugs-To: dev@herc.ws\\n\"\n" + "\"POT-Creation-Date: %s\\n\"\n" + "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n" + "\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n" + "\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n" + "\"Language: \\n\"\n" + "\"MIME-Version: 1.0\\n\"\n" + "\"Content-Type: text/plain; charset=ISO-8859-1\\n\"\n" + "\"Content-Transfer-Encoding: 8bit\\n\"\n\n", + year, sysinfo->vcsrevision_scripts(), timestring); + } + return true; +} + +bool translations_leave_file(const char *filepath) +{ + if (lang_export_fp != NULL) { + fclose(lang_export_fp); + lang_export_fp = NULL; + } + if (lang_export_filepath != NULL) { + if (lang_export_stringcount_current == 0) { + remove(lang_export_filepath); + } else { + ShowMessage("\r"); + ShowInfo("%s => %s (%d strings)\n", filepath, lang_export_filepath, lang_export_stringcount_current); + } + aFree(lang_export_filepath); + lang_export_filepath = NULL; + } + lang_export_stringcount_current = 0; + return true; +} + +bool msg_config_read_prehook(const char **cfg_name, bool *allow_override) +{ + if (*allow_override) // allow_override is true in nested calls + return false; + + translations_enter_file(*cfg_name); + return true; +} + bool msg_config_read_posthook(bool retVal, const char *cfg_name, bool allow_override) { - static int called = 1; + int i; if (!generating_translations || lang_export_fp == NULL) return retVal; - if (!retVal) + if (allow_override) // allow_override is true in nested calls return retVal; - if (++called == 1) { // Original - int i; + if (retVal) { for (i = 0; i < MAX_MSG; i++) { if (atcommand->msg_table[0][i] == NULL) continue; - fprintf(lang_export_fp, "msgctxt \"messages.conf\"\n" + fprintf(lang_export_fp, "\n#: conf/messages.conf\n" + "# %d: %s\n" + "#, c-format\n" + "msgctxt \"messages.conf\"\n" "msgid \"%s\"\n" "msgstr \"\"\n", + i, atcommand->msg_table[0][i], atcommand->msg_table[0][i] ); - lang_export_stringcount++; + lang_export_stringcount_total++; + lang_export_stringcount_current++; } } + translations_leave_file(cfg_name); + + return retVal; +} + +int npc_parsesrcfile_prehook(const char **filepath, bool *runOnInit) +{ + translations_enter_file(*filepath); + return 0; +} + +int npc_parsesrcfile_posthook(int retVal, const char *filepath, bool runOnInit) +{ + translations_leave_file(filepath); return retVal; } HPExport void server_preinit(void) { addArg("--generate-translations", false, generatetranslations, - "Creates './generated_translations.pot' file with all translateable strings from scripts, server terminates afterwards."); + "Creates 'generated_translations/**/*.pot' file with all translateable strings from scripts, server terminates afterwards."); VECTOR_INIT(lang_export_line_buf); VECTOR_INIT(lang_export_escaped_buf); addHookPost(script, add_translatable_string, script_add_translatable_string_posthook); addHookPre(script, parse, parse_script_prehook); addHookPost(script, parser_clean_leftovers, script_parser_clean_leftovers_posthook); + addHookPre(atcommand, msg_read, msg_config_read_prehook); addHookPost(atcommand, msg_read, msg_config_read_posthook); - lang_export_stringcount = 0; + addHookPre(npc, parsesrcfile, npc_parsesrcfile_prehook); + addHookPost(npc, parsesrcfile, npc_parsesrcfile_posthook); + lang_export_stringcount_total = 0; + lang_export_stringcount_current = 0; } HPExport void plugin_init(void) @@ -260,18 +384,12 @@ HPExport void plugin_init(void) HPExport void server_online(void) { - if (generating_translations && lang_export_fp != NULL) { - ShowInfo("Translations template exported to '%s' with %d strings.\n", lang_export_file, lang_export_stringcount); - fclose(lang_export_fp); - lang_export_fp = NULL; + if (generating_translations) { + ShowInfo("Translations template exported to '%s' with %d strings.\n", DIRECTORYNAME, lang_export_stringcount_total); } core->runflag = CORE_ST_STOP; } HPExport void plugin_final(void) { - if (lang_export_file != NULL) { - aFree(lang_export_file); - lang_export_file = NULL; - } } diff --git a/src/plugins/mapcache.c b/src/plugins/mapcache.c index 5e44492f6..208f39abb 100644 --- a/src/plugins/mapcache.c +++ b/src/plugins/mapcache.c @@ -281,7 +281,28 @@ bool mapcache_cache_map(const char *mapname) if (rsw == NULL) { water_height = NO_WATER; } else { - water_height = (int)GetFloat(rsw + 166); + if (memcmp(rsw, "GRSW", 4) != 0) { + ShowError("mapcache_cache_map: file %s is not in rsw format\n", filepath); + aFree(rsw); + return false; + } + int major_version = rsw[4]; + int minor_version = rsw[5]; + if (major_version > 2 || (major_version == 2 && minor_version > 2)) { + ShowError("mapcache_cache_map: Unsupported version %d.%d for rsw file %s\n", major_version, minor_version, filepath); + aFree(rsw); + return false; + } + if (major_version < 1 || (major_version == 1 && minor_version <= 4)) { + ShowError("mapcache_cache_map: Unsupported version %d.%d for rsw file %s\n", major_version, minor_version, filepath); + aFree(rsw); + return false; + } + int offset = 166; + if (major_version == 2 && minor_version >= 2) { + offset = 167; + } + water_height = (int)GetFloat(rsw + offset); aFree(rsw); } diff --git a/src/plugins/sample.c b/src/plugins/sample.c index b37f7c4f7..da29bd837 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -23,8 +23,11 @@ #include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */ #include "common/memmgr.h" #include "common/mmo.h" +#include "common/random.h" #include "common/socket.h" #include "common/strlib.h" +#include "login/login.h" +#include "login/lclif.p.h" #include "map/clif.h" #include "map/pc.h" #include "map/script.h" @@ -79,13 +82,13 @@ void sample_packet0f3(int fd) { data->lastMSGPosition.map = sd->status.last_point.map; data->lastMSGPosition.x = sd->status.last_point.x; data->lastMSGPosition.y = sd->status.last_point.y; - data->someNumber = rand()%777; + data->someNumber = rnd()%777; ShowInfo("Created Appended sockt->session[] data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); addToSession(sockt->session[fd],data,0,true); } else { ShowInfo("Existent Appended sockt->session[] data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); - if( rand()%4 == 2 ) { + if (rnd()%4 == 2) { ShowInfo("Removing Appended sockt->session[] data\n"); removeFromSession(sockt->session[fd],0); } @@ -98,13 +101,13 @@ void sample_packet0f3(int fd) { data->lastMSGPosition.map = sd->status.last_point.map; data->lastMSGPosition.x = sd->status.last_point.x; data->lastMSGPosition.y = sd->status.last_point.y; - data->someNumber = rand()%777; + data->someNumber = rnd()%777; ShowInfo("Created Appended map_session_data data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); addToMSD(sd,data,0,true); } else { ShowInfo("Existent Appended map_session_data data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); - if( rand()%4 == 2 ) { + if (rnd()%4 == 2) { ShowInfo("Removing Appended map_session_data data\n"); removeFromMSD(sd,0); } @@ -135,6 +138,19 @@ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int n, int amou } return 1; } + + /** + * pre-hook for lclif->p->parse_CA_CONNECT_INFO_CHANGED this is a private interface function and while in source it cannot be used + * outside of lclif.c since it's private, plugin can use it and hook to private interface functions if needed + * the pre-hook takes this currently unused packet and show a notice whenver a player sends it + **/ +enum parsefunc_rcode my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre(int *fd, struct login_session_data **sd) __attribute__((nonnull(2))); +enum parsefunc_rcode my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre(int *fd, struct login_session_data **sd) +{ + ShowNotice("Player (AID: %d) has sent CA_CONNECT_INFO_CHANGED packet\n", (*sd)->account_id); + return PACKET_VALID; +} + /* * Key is the setting name in our example it's 'my_setting' while val is the value of it. * this way you can manage more than one setting in one function instead of define multiable ones @@ -211,6 +227,14 @@ HPExport void plugin_init (void) { /* - by checking whether it was successful (retVal value) it allows for the originals conditions to take place */ addHookPost(pc, dropitem, my_pc_dropitem_post); } + + if (SERVER_TYPE == SERVER_TYPE_LOGIN) { + /** + * In this example we add a pre-hook to lclif->p->parse_CA_CONNECT_INFO_CHANGED + * It's similar to nomral hooks except it have it own hooking macros which ends with Priv + **/ + addHookPrePriv(lclif, parse_CA_CONNECT_INFO_CHANGED, my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre); + } } /* triggered when server starts loading, before any server-specific data is set */ HPExport void server_preinit(void) |