summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2015-06-02 02:54:48 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2015-06-02 02:54:48 +0200
commitf642c00912ee017507d3318615ff22b695a1bbd3 (patch)
tree6d052134a90bbf70cd0f05ea539db58e0c8dc82c /src/plugins
parentf1950fb1373580815b27137dfc7375cbf8f0602f (diff)
downloadhercules-f642c00912ee017507d3318615ff22b695a1bbd3.tar.gz
hercules-f642c00912ee017507d3318615ff22b695a1bbd3.tar.bz2
hercules-f642c00912ee017507d3318615ff22b695a1bbd3.tar.xz
hercules-f642c00912ee017507d3318615ff22b695a1bbd3.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc59
3 files changed, 34 insertions, 35 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index c34306d7b..09f33bff6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -933,6 +933,8 @@ struct {
struct HPMHookPoint *HP_clif_broadcast_post;
struct HPMHookPoint *HP_clif_broadcast2_pre;
struct HPMHookPoint *HP_clif_broadcast2_post;
+ struct HPMHookPoint *HP_clif_messagecolor_self_pre;
+ struct HPMHookPoint *HP_clif_messagecolor_self_post;
struct HPMHookPoint *HP_clif_messagecolor_pre;
struct HPMHookPoint *HP_clif_messagecolor_post;
struct HPMHookPoint *HP_clif_disp_overhead_pre;
@@ -947,8 +949,6 @@ struct {
struct HPMHookPoint *HP_clif_message_post;
struct HPMHookPoint *HP_clif_messageln_pre;
struct HPMHookPoint *HP_clif_messageln_post;
- struct HPMHookPoint *HP_clif_colormes_pre;
- struct HPMHookPoint *HP_clif_colormes_post;
struct HPMHookPoint *HP_clif_process_message_pre;
struct HPMHookPoint *HP_clif_process_message_post;
struct HPMHookPoint *HP_clif_wisexin_pre;
@@ -6140,6 +6140,8 @@ struct {
int HP_clif_broadcast_post;
int HP_clif_broadcast2_pre;
int HP_clif_broadcast2_post;
+ int HP_clif_messagecolor_self_pre;
+ int HP_clif_messagecolor_self_post;
int HP_clif_messagecolor_pre;
int HP_clif_messagecolor_post;
int HP_clif_disp_overhead_pre;
@@ -6154,8 +6156,6 @@ struct {
int HP_clif_message_post;
int HP_clif_messageln_pre;
int HP_clif_messageln_post;
- int HP_clif_colormes_pre;
- int HP_clif_colormes_post;
int HP_clif_process_message_pre;
int HP_clif_process_message_post;
int HP_clif_wisexin_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 2b7dbdc26..8c1456412 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -477,6 +477,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->disp_message, HP_clif_disp_message) },
{ HP_POP(clif->broadcast, HP_clif_broadcast) },
{ 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->disp_overhead, HP_clif_disp_overhead) },
{ HP_POP(clif->msgtable, HP_clif_msgtable) },
@@ -484,7 +485,6 @@ struct HookingPointData HookingPoints[] = {
{ 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) },
{ HP_POP(clif->process_message, HP_clif_process_message) },
{ HP_POP(clif->wisexin, HP_clif_wisexin) },
{ HP_POP(clif->wisall, HP_clif_wisall) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 1cce6c289..c623747aa 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -12381,10 +12381,36 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, size_t len, unsi
}
return;
}
-void HP_clif_messagecolor(struct block_list *bl, unsigned int color, const char *msg) {
+void HP_clif_messagecolor_self(int fd, uint32 color, const char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_messagecolor_self_pre ) {
+ void (*preHookFunc) (int *fd, uint32 *color, const char *msg);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_messagecolor_self_pre[hIndex].func;
+ preHookFunc(&fd, &color, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.messagecolor_self(fd, color, msg);
+ }
+ if( HPMHooks.count.HP_clif_messagecolor_self_post ) {
+ void (*postHookFunc) (int *fd, uint32 *color, const char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_messagecolor_self_post[hIndex].func;
+ postHookFunc(&fd, &color, msg);
+ }
+ }
+ return;
+}
+void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_messagecolor_pre ) {
- void (*preHookFunc) (struct block_list *bl, unsigned int *color, const char *msg);
+ void (*preHookFunc) (struct block_list *bl, uint32 *color, const char *msg);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_messagecolor_pre[hIndex].func;
@@ -12399,7 +12425,7 @@ void HP_clif_messagecolor(struct block_list *bl, unsigned int color, const char
HPMHooks.source.clif.messagecolor(bl, color, msg);
}
if( HPMHooks.count.HP_clif_messagecolor_post ) {
- void (*postHookFunc) (struct block_list *bl, unsigned int *color, const char *msg);
+ void (*postHookFunc) (struct block_list *bl, uint32 *color, const char *msg);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_messagecolor_post[hIndex].func;
postHookFunc(bl, &color, msg);
@@ -12563,33 +12589,6 @@ void HP_clif_messageln(const int fd, const char *mes) {
}
return;
}
-int HP_clif_colormes(int fd, enum clif_colors color, const char *msg) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_clif_colormes_pre ) {
- int (*preHookFunc) (int *fd, enum clif_colors *color, const char *msg);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_colormes_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_colormes_pre[hIndex].func;
- retVal___ = preHookFunc(&fd, &color, msg);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.clif.colormes(fd, color, msg);
- }
- if( HPMHooks.count.HP_clif_colormes_post ) {
- int (*postHookFunc) (int retVal___, int *fd, enum clif_colors *color, const char *msg);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_colormes_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_colormes_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &fd, &color, msg);
- }
- }
- return retVal___;
-}
bool HP_clif_process_message(struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) {
int hIndex = 0;
bool retVal___ = false;