summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2015-05-18 01:15:37 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2015-05-18 01:15:37 +0200
commit46c6e66222cc3aaf1b1ea08794a6b818d7065b67 (patch)
treea9be9d4d9e5e79d756df24239e32b9d331986234 /src/plugins/HPMHooking
parent3f06bc2bded05a27e1982d1e71c0983009a2f701 (diff)
downloadhercules-46c6e66222cc3aaf1b1ea08794a6b818d7065b67.tar.gz
hercules-46c6e66222cc3aaf1b1ea08794a6b818d7065b67.tar.bz2
hercules-46c6e66222cc3aaf1b1ea08794a6b818d7065b67.tar.xz
hercules-46c6e66222cc3aaf1b1ea08794a6b818d7065b67.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc116
3 files changed, 37 insertions, 99 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 7ae80e07c..c7f63c708 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -937,16 +937,12 @@ struct {
struct HPMHookPoint *HP_clif_messagecolor_post;
struct HPMHookPoint *HP_clif_disp_overhead_pre;
struct HPMHookPoint *HP_clif_disp_overhead_post;
- struct HPMHookPoint *HP_clif_msg_pre;
- struct HPMHookPoint *HP_clif_msg_post;
- struct HPMHookPoint *HP_clif_msg_value_pre;
- struct HPMHookPoint *HP_clif_msg_value_post;
- struct HPMHookPoint *HP_clif_msg_skill_pre;
- struct HPMHookPoint *HP_clif_msg_skill_post;
struct HPMHookPoint *HP_clif_msgtable_pre;
struct HPMHookPoint *HP_clif_msgtable_post;
struct HPMHookPoint *HP_clif_msgtable_num_pre;
struct HPMHookPoint *HP_clif_msgtable_num_post;
+ struct HPMHookPoint *HP_clif_msgtable_skill_pre;
+ struct HPMHookPoint *HP_clif_msgtable_skill_post;
struct HPMHookPoint *HP_clif_message_pre;
struct HPMHookPoint *HP_clif_message_post;
struct HPMHookPoint *HP_clif_messageln_pre;
@@ -6146,16 +6142,12 @@ struct {
int HP_clif_messagecolor_post;
int HP_clif_disp_overhead_pre;
int HP_clif_disp_overhead_post;
- int HP_clif_msg_pre;
- int HP_clif_msg_post;
- int HP_clif_msg_value_pre;
- int HP_clif_msg_value_post;
- int HP_clif_msg_skill_pre;
- int HP_clif_msg_skill_post;
int HP_clif_msgtable_pre;
int HP_clif_msgtable_post;
int HP_clif_msgtable_num_pre;
int HP_clif_msgtable_num_post;
+ int HP_clif_msgtable_skill_pre;
+ int HP_clif_msgtable_skill_post;
int HP_clif_message_pre;
int HP_clif_message_post;
int HP_clif_messageln_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index ac34c8d07..9f9f4ba07 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -479,11 +479,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->broadcast2, HP_clif_broadcast2) },
{ HP_POP(clif->messagecolor, HP_clif_messagecolor) },
{ HP_POP(clif->disp_overhead, HP_clif_disp_overhead) },
- { HP_POP(clif->msg, HP_clif_msg) },
- { HP_POP(clif->msg_value, HP_clif_msg_value) },
- { HP_POP(clif->msg_skill, HP_clif_msg_skill) },
{ HP_POP(clif->msgtable, HP_clif_msgtable) },
{ HP_POP(clif->msgtable_num, HP_clif_msgtable_num) },
+ { HP_POP(clif->msgtable_skill, HP_clif_msgtable_skill) },
{ HP_POP(clif->message, HP_clif_message) },
{ HP_POP(clif->messageln, HP_clif_messageln) },
{ HP_POP(clif->colormes, HP_clif_colormes) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 82132bb11..58b9e1b4a 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -12433,14 +12433,14 @@ void HP_clif_disp_overhead(struct block_list *bl, const char *mes) {
}
return;
}
-void HP_clif_msg(struct map_session_data *sd, unsigned short id) {
+void HP_clif_msgtable(struct map_session_data *sd, unsigned short msg_id) {
int hIndex = 0;
- if( HPMHooks.count.HP_clif_msg_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, unsigned short *id);
+ if( HPMHooks.count.HP_clif_msgtable_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *msg_id);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_msg_pre[hIndex].func;
- preHookFunc(sd, &id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_msgtable_pre[hIndex].func;
+ preHookFunc(sd, &msg_id);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -12448,25 +12448,25 @@ void HP_clif_msg(struct map_session_data *sd, unsigned short id) {
}
}
{
- HPMHooks.source.clif.msg(sd, id);
+ HPMHooks.source.clif.msgtable(sd, msg_id);
}
- if( HPMHooks.count.HP_clif_msg_post ) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned short *id);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_msg_post[hIndex].func;
- postHookFunc(sd, &id);
+ if( HPMHooks.count.HP_clif_msgtable_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *msg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_msgtable_post[hIndex].func;
+ postHookFunc(sd, &msg_id);
}
}
return;
}
-void HP_clif_msg_value(struct map_session_data *sd, unsigned short id, int value) {
+void HP_clif_msgtable_num(struct map_session_data *sd, unsigned short msg_id, int value) {
int hIndex = 0;
- if( HPMHooks.count.HP_clif_msg_value_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, unsigned short *id, int *value);
+ if( HPMHooks.count.HP_clif_msgtable_num_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *msg_id, int *value);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_value_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_msg_value_pre[hIndex].func;
- preHookFunc(sd, &id, &value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_msgtable_num_pre[hIndex].func;
+ preHookFunc(sd, &msg_id, &value);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -12474,24 +12474,24 @@ void HP_clif_msg_value(struct map_session_data *sd, unsigned short id, int value
}
}
{
- HPMHooks.source.clif.msg_value(sd, id, value);
+ HPMHooks.source.clif.msgtable_num(sd, msg_id, value);
}
- if( HPMHooks.count.HP_clif_msg_value_post ) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned short *id, int *value);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_value_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_msg_value_post[hIndex].func;
- postHookFunc(sd, &id, &value);
+ if( HPMHooks.count.HP_clif_msgtable_num_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *msg_id, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_msgtable_num_post[hIndex].func;
+ postHookFunc(sd, &msg_id, &value);
}
}
return;
}
-void HP_clif_msg_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) {
+void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) {
int hIndex = 0;
- if( HPMHooks.count.HP_clif_msg_skill_pre ) {
+ if( HPMHooks.count.HP_clif_msgtable_skill_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_skill_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_msg_skill_pre[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_msgtable_skill_pre[hIndex].func;
preHookFunc(sd, &skill_id, &msg_id);
}
if( *HPMforce_return ) {
@@ -12500,69 +12500,17 @@ void HP_clif_msg_skill(struct map_session_data *sd, uint16 skill_id, int msg_id)
}
}
{
- HPMHooks.source.clif.msg_skill(sd, skill_id, msg_id);
+ HPMHooks.source.clif.msgtable_skill(sd, skill_id, msg_id);
}
- if( HPMHooks.count.HP_clif_msg_skill_post ) {
+ if( HPMHooks.count.HP_clif_msgtable_skill_post ) {
void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_skill_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_msg_skill_post[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_msgtable_skill_post[hIndex].func;
postHookFunc(sd, &skill_id, &msg_id);
}
}
return;
}
-void HP_clif_msgtable(int fd, int line) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_msgtable_pre ) {
- void (*preHookFunc) (int *fd, int *line);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_msgtable_pre[hIndex].func;
- preHookFunc(&fd, &line);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.msgtable(fd, line);
- }
- if( HPMHooks.count.HP_clif_msgtable_post ) {
- void (*postHookFunc) (int *fd, int *line);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_msgtable_post[hIndex].func;
- postHookFunc(&fd, &line);
- }
- }
- return;
-}
-void HP_clif_msgtable_num(int fd, int line, int num) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_msgtable_num_pre ) {
- void (*preHookFunc) (int *fd, int *line, int *num);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_msgtable_num_pre[hIndex].func;
- preHookFunc(&fd, &line, &num);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.msgtable_num(fd, line, num);
- }
- if( HPMHooks.count.HP_clif_msgtable_num_post ) {
- void (*postHookFunc) (int *fd, int *line, int *num);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_msgtable_num_post[hIndex].func;
- postHookFunc(&fd, &line, &num);
- }
- }
- return;
-}
void HP_clif_message(const int fd, const char *mes) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_message_pre ) {