summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-22 03:31:32 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-28 04:43:37 +0300
commitbf03c52a9bde802af33ccb0edcd1f966c0310038 (patch)
treeee06f5d402e33addd4e724c26db98c7c2fee5b33
parent5ced38c58adb0236bf741ef0ec08a6cdc542d3b6 (diff)
downloadhercules-bf03c52a9bde802af33ccb0edcd1f966c0310038.tar.gz
hercules-bf03c52a9bde802af33ccb0edcd1f966c0310038.tar.bz2
hercules-bf03c52a9bde802af33ccb0edcd1f966c0310038.tar.xz
hercules-bf03c52a9bde802af33ccb0edcd1f966c0310038.zip
Update HPM.
-rw-r--r--src/common/HPMDataCheck.h4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc10
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc90
5 files changed, 111 insertions, 8 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 3784661f6..28c6e3b1d 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -660,6 +660,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_FEED_MER", sizeof(struct PACKET_ZC_FEED_MER), SERVER_TYPE_MAP },
{ "PACKET_ZC_FEED_PET", sizeof(struct PACKET_ZC_FEED_PET), SERVER_TYPE_MAP },
{ "PACKET_ZC_FORMATSTRING_MSG", sizeof(struct PACKET_ZC_FORMATSTRING_MSG), SERVER_TYPE_MAP },
+ { "PACKET_ZC_GROUP_ISALIVE", sizeof(struct PACKET_ZC_GROUP_ISALIVE), SERVER_TYPE_MAP },
{ "PACKET_ZC_GROUP_LIST", sizeof(struct PACKET_ZC_GROUP_LIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_GROUP_LIST_SUB", sizeof(struct PACKET_ZC_GROUP_LIST_SUB), SERVER_TYPE_MAP },
{ "PACKET_ZC_ITEM_ENTRY", sizeof(struct PACKET_ZC_ITEM_ENTRY), SERVER_TYPE_MAP },
@@ -683,6 +684,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_NOTIFY_WEAPONITEMLIST", sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub", sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_OPEN_UI", sizeof(struct PACKET_ZC_OPEN_UI), SERVER_TYPE_MAP },
+ { "PACKET_ZC_OVERWEIGHT_PERCENT", sizeof(struct PACKET_ZC_OVERWEIGHT_PERCENT), SERVER_TYPE_MAP },
{ "PACKET_ZC_PC_CASH_POINT_ITEMLIST", sizeof(struct PACKET_ZC_PC_CASH_POINT_ITEMLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub", sizeof(struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_PC_PURCHASE_ITEMLIST", sizeof(struct PACKET_ZC_PC_PURCHASE_ITEMLIST), SERVER_TYPE_MAP },
@@ -704,6 +706,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_UI_ACTION", sizeof(struct PACKET_ZC_UI_ACTION), SERVER_TYPE_MAP },
{ "PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE", sizeof(struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE), SERVER_TYPE_MAP },
{ "PACKET_ZC_USE_ITEM_ACK", sizeof(struct PACKET_ZC_USE_ITEM_ACK), SERVER_TYPE_MAP },
+ { "PACKET_ZC_WARPLIST", sizeof(struct PACKET_ZC_WARPLIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_WARPLIST_sub", sizeof(struct PACKET_ZC_WARPLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP },
{ "ZC_PROGRESS_ACTOR", sizeof(struct ZC_PROGRESS_ACTOR), SERVER_TYPE_MAP },
{ "ach_list_info", sizeof(struct ach_list_info), SERVER_TYPE_MAP },
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index e3fbb178e..0c63a98b6 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1228,8 +1228,8 @@ typedef void (*HPMHOOK_pre_clif_map_type) (struct map_session_data **sd, enum ma
typedef void (*HPMHOOK_post_clif_map_type) (struct map_session_data *sd, enum map_type type);
typedef void (*HPMHOOK_pre_clif_maptypeproperty2) (struct block_list **bl, enum send_target *t);
typedef void (*HPMHOOK_post_clif_maptypeproperty2) (struct block_list *bl, enum send_target t);
-typedef void (*HPMHOOK_pre_clif_changemapserver) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
-typedef void (*HPMHOOK_post_clif_changemapserver) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);
+typedef void (*HPMHOOK_pre_clif_changemapserver) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port, char **dnsHost);
+typedef void (*HPMHOOK_post_clif_changemapserver) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost);
typedef void (*HPMHOOK_pre_clif_changemapserver_airship) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
typedef void (*HPMHOOK_post_clif_changemapserver_airship) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);
typedef void (*HPMHOOK_pre_clif_npcbuysell) (struct map_session_data **sd, int *id);
@@ -2542,6 +2542,10 @@ typedef void (*HPMHOOK_pre_clif_hat_effect) (struct block_list **bl, struct bloc
typedef void (*HPMHOOK_post_clif_hat_effect) (struct block_list *bl, struct block_list *tbl, enum send_target target);
typedef void (*HPMHOOK_pre_clif_hat_effect_single) (struct block_list **bl, uint16 *effectId, bool *enable);
typedef void (*HPMHOOK_post_clif_hat_effect_single) (struct block_list *bl, uint16 effectId, bool enable);
+typedef void (*HPMHOOK_pre_clif_overweight_percent) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_overweight_percent) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pChangeDress) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pChangeDress) (int fd, struct map_session_data *sd);
typedef bool (*HPMHOOK_pre_clif_pAttendanceDB) (void);
typedef bool (*HPMHOOK_post_clif_pAttendanceDB) (bool retVal___);
typedef bool (*HPMHOOK_pre_clif_attendancedb_libconfig_sub) (struct config_setting_t **it, int *n, const char **source);
@@ -2584,6 +2588,8 @@ typedef void (*HPMHOOK_pre_clif_pPetEvolution) (int *fd, struct map_session_data
typedef void (*HPMHOOK_post_clif_pPetEvolution) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_petEvolutionResult) (int *fd, enum pet_evolution_result *result);
typedef void (*HPMHOOK_post_clif_petEvolutionResult) (int fd, enum pet_evolution_result result);
+typedef void (*HPMHOOK_pre_clif_party_dead_notification) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_party_dead_notification) (struct map_session_data *sd);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index fadab9ea7..c4394d7f4 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2134,6 +2134,10 @@ struct {
struct HPMHookPoint *HP_clif_hat_effect_post;
struct HPMHookPoint *HP_clif_hat_effect_single_pre;
struct HPMHookPoint *HP_clif_hat_effect_single_post;
+ struct HPMHookPoint *HP_clif_overweight_percent_pre;
+ struct HPMHookPoint *HP_clif_overweight_percent_post;
+ struct HPMHookPoint *HP_clif_pChangeDress_pre;
+ struct HPMHookPoint *HP_clif_pChangeDress_post;
struct HPMHookPoint *HP_clif_pAttendanceDB_pre;
struct HPMHookPoint *HP_clif_pAttendanceDB_post;
struct HPMHookPoint *HP_clif_attendancedb_libconfig_sub_pre;
@@ -2176,6 +2180,8 @@ struct {
struct HPMHookPoint *HP_clif_pPetEvolution_post;
struct HPMHookPoint *HP_clif_petEvolutionResult_pre;
struct HPMHookPoint *HP_clif_petEvolutionResult_post;
+ struct HPMHookPoint *HP_clif_party_dead_notification_pre;
+ struct HPMHookPoint *HP_clif_party_dead_notification_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -8679,6 +8685,10 @@ struct {
int HP_clif_hat_effect_post;
int HP_clif_hat_effect_single_pre;
int HP_clif_hat_effect_single_post;
+ int HP_clif_overweight_percent_pre;
+ int HP_clif_overweight_percent_post;
+ int HP_clif_pChangeDress_pre;
+ int HP_clif_pChangeDress_post;
int HP_clif_pAttendanceDB_pre;
int HP_clif_pAttendanceDB_post;
int HP_clif_attendancedb_libconfig_sub_pre;
@@ -8721,6 +8731,8 @@ struct {
int HP_clif_pPetEvolution_post;
int HP_clif_petEvolutionResult_pre;
int HP_clif_petEvolutionResult_post;
+ int HP_clif_party_dead_notification_pre;
+ int HP_clif_party_dead_notification_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 57728fbc4..e5584cc43 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1091,6 +1091,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pClanMessage, HP_clif_pClanMessage) },
{ HP_POP(clif->hat_effect, HP_clif_hat_effect) },
{ HP_POP(clif->hat_effect_single, HP_clif_hat_effect_single) },
+ { HP_POP(clif->overweight_percent, HP_clif_overweight_percent) },
+ { HP_POP(clif->pChangeDress, HP_clif_pChangeDress) },
{ HP_POP(clif->pAttendanceDB, HP_clif_pAttendanceDB) },
{ HP_POP(clif->attendancedb_libconfig_sub, HP_clif_attendancedb_libconfig_sub) },
{ HP_POP(clif->attendance_timediff, HP_clif_attendance_timediff) },
@@ -1112,6 +1114,7 @@ struct HookingPointData HookingPoints[] = {
{ 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) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index e224a10bc..f2ce1505c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -10679,14 +10679,14 @@ void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) {
}
return;
}
-void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) {
+void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_changemapserver_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
+ void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port, char **dnsHost);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_changemapserver_pre[hIndex].func;
- preHookFunc(&sd, &map_index, &x, &y, &ip, &port);
+ preHookFunc(&sd, &map_index, &x, &y, &ip, &port, &dnsHost);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -10694,13 +10694,13 @@ void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_ind
}
}
{
- HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port);
+ HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port, dnsHost);
}
if (HPMHooks.count.HP_clif_changemapserver_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_changemapserver_post[hIndex].func;
- postHookFunc(sd, map_index, x, y, ip, port);
+ postHookFunc(sd, map_index, x, y, ip, port, dnsHost);
}
}
return;
@@ -27813,6 +27813,58 @@ void HP_clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool enab
}
return;
}
+void HP_clif_overweight_percent(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_overweight_percent_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_overweight_percent_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_overweight_percent_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.overweight_percent(sd);
+ }
+ if (HPMHooks.count.HP_clif_overweight_percent_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_overweight_percent_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_overweight_percent_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChangeDress(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pChangeDress_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDress_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pChangeDress_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChangeDress(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pChangeDress_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDress_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pChangeDress_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
bool HP_clif_pAttendanceDB(void) {
int hIndex = 0;
bool retVal___ = false;
@@ -28366,6 +28418,32 @@ void HP_clif_petEvolutionResult(int fd, enum pet_evolution_result 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;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;