diff options
author | shennetsind <ind@henn.et> | 2014-02-22 23:02:01 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-02-22 23:02:01 -0300 |
commit | b52c3cc52f391e75a6277e7bf4afc992c4759e9d (patch) | |
tree | 5b48c0b4111b35b9467faa0c583e0eb68b014279 /src/plugins | |
parent | 6163d9afd1b8536509cb79d123ad6855d89f39e7 (diff) | |
parent | 4109f855604a1782a04c2eba10229fb2e1efd2ab (diff) | |
download | hercules-b52c3cc52f391e75a6277e7bf4afc992c4759e9d.tar.gz hercules-b52c3cc52f391e75a6277e7bf4afc992c4759e9d.tar.bz2 hercules-b52c3cc52f391e75a6277e7bf4afc992c4759e9d.tar.xz hercules-b52c3cc52f391e75a6277e7bf4afc992c4759e9d.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 3 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 163 |
3 files changed, 43 insertions, 135 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index 22cd280de..5bc9f7da0 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -701,8 +701,6 @@ struct { struct HPMHookPoint *HP_clif_equiptickack_post; struct HPMHookPoint *HP_clif_viewequip_ack_pre; struct HPMHookPoint *HP_clif_viewequip_ack_post; - struct HPMHookPoint *HP_clif_viewequip_fail_pre; - struct HPMHookPoint *HP_clif_viewequip_fail_post; struct HPMHookPoint *HP_clif_equpcheckbox_pre; struct HPMHookPoint *HP_clif_equpcheckbox_post; struct HPMHookPoint *HP_clif_displayexp_pre; @@ -859,8 +857,6 @@ struct { struct HPMHookPoint *HP_clif_wis_message_post; struct HPMHookPoint *HP_clif_wis_end_pre; struct HPMHookPoint *HP_clif_wis_end_post; - struct HPMHookPoint *HP_clif_disp_onlyself_pre; - struct HPMHookPoint *HP_clif_disp_onlyself_post; struct HPMHookPoint *HP_clif_disp_message_pre; struct HPMHookPoint *HP_clif_disp_message_post; struct HPMHookPoint *HP_clif_broadcast_pre; @@ -1013,8 +1009,6 @@ struct { struct HPMHookPoint *HP_clif_guild_notice_post; struct HPMHookPoint *HP_clif_guild_message_pre; struct HPMHookPoint *HP_clif_guild_message_post; - struct HPMHookPoint *HP_clif_guild_skillup_pre; - struct HPMHookPoint *HP_clif_guild_skillup_post; struct HPMHookPoint *HP_clif_guild_reqalliance_pre; struct HPMHookPoint *HP_clif_guild_reqalliance_post; struct HPMHookPoint *HP_clif_guild_allianceack_pre; @@ -5732,8 +5726,6 @@ struct { int HP_clif_equiptickack_post; int HP_clif_viewequip_ack_pre; int HP_clif_viewequip_ack_post; - int HP_clif_viewequip_fail_pre; - int HP_clif_viewequip_fail_post; int HP_clif_equpcheckbox_pre; int HP_clif_equpcheckbox_post; int HP_clif_displayexp_pre; @@ -5890,8 +5882,6 @@ struct { int HP_clif_wis_message_post; int HP_clif_wis_end_pre; int HP_clif_wis_end_post; - int HP_clif_disp_onlyself_pre; - int HP_clif_disp_onlyself_post; int HP_clif_disp_message_pre; int HP_clif_disp_message_post; int HP_clif_broadcast_pre; @@ -6044,8 +6034,6 @@ struct { int HP_clif_guild_notice_post; int HP_clif_guild_message_pre; int HP_clif_guild_message_post; - int HP_clif_guild_skillup_pre; - int HP_clif_guild_skillup_post; int HP_clif_guild_reqalliance_pre; int HP_clif_guild_reqalliance_post; int HP_clif_guild_allianceack_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 4e85449b1..9cd73bce8 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -360,7 +360,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->partytickack, HP_clif_partytickack) }, { HP_POP(clif->equiptickack, HP_clif_equiptickack) }, { HP_POP(clif->viewequip_ack, HP_clif_viewequip_ack) }, - { HP_POP(clif->viewequip_fail, HP_clif_viewequip_fail) }, { HP_POP(clif->equpcheckbox, HP_clif_equpcheckbox) }, { HP_POP(clif->displayexp, HP_clif_displayexp) }, { HP_POP(clif->font, HP_clif_font) }, @@ -439,7 +438,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->changechatstatus, HP_clif_changechatstatus) }, { HP_POP(clif->wis_message, HP_clif_wis_message) }, { HP_POP(clif->wis_end, HP_clif_wis_end) }, - { HP_POP(clif->disp_onlyself, HP_clif_disp_onlyself) }, { HP_POP(clif->disp_message, HP_clif_disp_message) }, { HP_POP(clif->broadcast, HP_clif_broadcast) }, { HP_POP(clif->broadcast2, HP_clif_broadcast2) }, @@ -516,7 +514,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->guild_emblem_area, HP_clif_guild_emblem_area) }, { HP_POP(clif->guild_notice, HP_clif_guild_notice) }, { HP_POP(clif->guild_message, HP_clif_guild_message) }, - { HP_POP(clif->guild_skillup, HP_clif_guild_skillup) }, { HP_POP(clif->guild_reqalliance, HP_clif_guild_reqalliance) }, { HP_POP(clif->guild_allianceack, HP_clif_guild_allianceack) }, { HP_POP(clif->guild_delalliance, HP_clif_guild_delalliance) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 8a9bd1790..3bc658d24 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -5266,11 +5266,11 @@ void HP_clif_final(void) { } return; } -int HP_clif_setip(const char *ip) { +bool HP_clif_setip(const char *ip) { int hIndex = 0; - int retVal___ = 0; + bool retVal___ = false; if( HPMHooks.count.HP_clif_setip_pre ) { - int (*preHookFunc) (const char *ip); + bool (*preHookFunc) (const char *ip); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_setip_pre[hIndex].func; retVal___ = preHookFunc(ip); @@ -5284,7 +5284,7 @@ int HP_clif_setip(const char *ip) { retVal___ = HPMHooks.source.clif.setip(ip); } if( HPMHooks.count.HP_clif_setip_post ) { - int (*postHookFunc) (int retVal___, const char *ip); + bool (*postHookFunc) (bool retVal___, const char *ip); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_setip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); @@ -5292,30 +5292,31 @@ int HP_clif_setip(const char *ip) { } return retVal___; } -void HP_clif_setbindip(const char *ip) { +bool HP_clif_setbindip(const char *ip) { int hIndex = 0; + bool retVal___ = false; if( HPMHooks.count.HP_clif_setbindip_pre ) { - void (*preHookFunc) (const char *ip); + bool (*preHookFunc) (const char *ip); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_setbindip_pre[hIndex].func; - preHookFunc(ip); + retVal___ = preHookFunc(ip); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.clif.setbindip(ip); + retVal___ = HPMHooks.source.clif.setbindip(ip); } if( HPMHooks.count.HP_clif_setbindip_post ) { - void (*postHookFunc) (const char *ip); + bool (*postHookFunc) (bool retVal___, const char *ip); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_setbindip_post[hIndex].func; - postHookFunc(ip); + retVal___ = postHookFunc(retVal___, ip); } } - return; + return retVal___; } void HP_clif_setport(uint16 port) { int hIndex = 0; @@ -5368,11 +5369,11 @@ uint32 HP_clif_refresh_ip(void) { } return retVal___; } -int HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_target type) { +bool HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_target type) { int hIndex = 0; - int retVal___ = 0; + bool retVal___ = false; if( HPMHooks.count.HP_clif_send_pre ) { - int (*preHookFunc) (const void *buf, int *len, struct block_list *bl, enum send_target *type); + bool (*preHookFunc) (const void *buf, int *len, struct block_list *bl, enum send_target *type); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_send_pre[hIndex].func; retVal___ = preHookFunc(buf, &len, bl, &type); @@ -5386,7 +5387,7 @@ int HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_targ retVal___ = HPMHooks.source.clif.send(buf, len, bl, type); } if( HPMHooks.count.HP_clif_send_post ) { - int (*postHookFunc) (int retVal___, const void *buf, int *len, struct block_list *bl, enum send_target *type); + bool (*postHookFunc) (bool retVal___, const void *buf, int *len, struct block_list *bl, enum send_target *type); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_send_post[hIndex].func; retVal___ = postHookFunc(retVal___, buf, &len, bl, &type); @@ -6838,11 +6839,11 @@ void HP_clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum s } return; } -int HP_clif_spawn(struct block_list *bl) { +bool HP_clif_spawn(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; + bool retVal___ = false; if( HPMHooks.count.HP_clif_spawn_pre ) { - int (*preHookFunc) (struct block_list *bl); + bool (*preHookFunc) (struct block_list *bl); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_spawn_pre[hIndex].func; retVal___ = preHookFunc(bl); @@ -6856,7 +6857,7 @@ int HP_clif_spawn(struct block_list *bl) { retVal___ = HPMHooks.source.clif.spawn(bl); } if( HPMHooks.count.HP_clif_spawn_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); + bool (*postHookFunc) (bool retVal___, struct block_list *bl); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_spawn_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); @@ -8987,31 +8988,6 @@ void HP_clif_viewequip_ack(struct map_session_data *sd, struct map_session_data } return; } -void HP_clif_viewequip_fail(struct map_session_data *sd) { - int hIndex = 0; - if( HPMHooks.count.HP_clif_viewequip_fail_pre ) { - void (*preHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_fail_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_viewequip_fail_pre[hIndex].func; - preHookFunc(sd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.clif.viewequip_fail(sd); - } - if( HPMHooks.count.HP_clif_viewequip_fail_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_fail_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_viewequip_fail_post[hIndex].func; - postHookFunc(sd); - } - } - return; -} void HP_clif_equpcheckbox(struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_equpcheckbox_pre ) { @@ -10971,31 +10947,6 @@ void HP_clif_wis_end(int fd, int flag) { } return; } -void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, size_t len) { - int hIndex = 0; - if( HPMHooks.count.HP_clif_disp_onlyself_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *mes, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_onlyself_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_disp_onlyself_pre[hIndex].func; - preHookFunc(sd, mes, &len); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.clif.disp_onlyself(sd, mes, len); - } - if( HPMHooks.count.HP_clif_disp_onlyself_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *mes, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_onlyself_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_disp_onlyself_post[hIndex].func; - postHookFunc(sd, mes, &len); - } - } - return; -} void HP_clif_disp_message(struct block_list *src, const char *mes, size_t len, enum send_target target) { int hIndex = 0; if( HPMHooks.count.HP_clif_disp_message_pre ) { @@ -11973,13 +11924,13 @@ void HP_clif_skillinfoblock(struct map_session_data *sd) { } return; } -void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id) { +void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, int flag) { int hIndex = 0; if( HPMHooks.count.HP_clif_skillup_pre ) { - void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *skill_lv, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_skillup_pre[hIndex].func; - preHookFunc(sd, &skill_id); + preHookFunc(sd, &skill_id, &skill_lv, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11987,13 +11938,13 @@ void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id) { } } { - HPMHooks.source.clif.skillup(sd, skill_id); + HPMHooks.source.clif.skillup(sd, skill_id, skill_lv, flag); } if( HPMHooks.count.HP_clif_skillup_post ) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id); + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *skill_lv, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_skillup_post[hIndex].func; - postHookFunc(sd, &skill_id); + postHookFunc(sd, &skill_id, &skill_lv, &flag); } } return; @@ -12898,32 +12849,6 @@ void HP_clif_guild_message(struct guild *g, int account_id, const char *mes, int } return; } -int HP_clif_guild_skillup(struct map_session_data *sd, uint16 skill_id, int lv) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_clif_guild_skillup_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_guild_skillup_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, &lv); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.clif.guild_skillup(sd, skill_id, lv); - } - if( HPMHooks.count.HP_clif_guild_skillup_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_guild_skillup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, &lv); - } - } - return retVal___; -} void HP_clif_guild_reqalliance(struct map_session_data *sd, int account_id, const char *name) { int hIndex = 0; if( HPMHooks.count.HP_clif_guild_reqalliance_pre ) { @@ -13983,31 +13908,30 @@ void HP_clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int fla } return; } -int HP_clif_homskillinfoblock(struct map_session_data *sd) { +void HP_clif_homskillinfoblock(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; if( HPMHooks.count.HP_clif_homskillinfoblock_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + void (*preHookFunc) (struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_pre[hIndex].func; - retVal___ = preHookFunc(sd); + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.clif.homskillinfoblock(sd); + HPMHooks.source.clif.homskillinfoblock(sd); } if( HPMHooks.count.HP_clif_homskillinfoblock_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); + void (*postHookFunc) (struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + postHookFunc(sd); } } - return retVal___; + return; } void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; @@ -14034,31 +13958,30 @@ void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) { } return; } -int HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) { +void HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) { int hIndex = 0; - int retVal___ = 0; if( HPMHooks.count.HP_clif_hom_food_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail); + void (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_hom_food_pre[hIndex].func; - retVal___ = preHookFunc(sd, &foodid, &fail); + preHookFunc(sd, &foodid, &fail); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.clif.hom_food(sd, foodid, fail); + HPMHooks.source.clif.hom_food(sd, foodid, fail); } if( HPMHooks.count.HP_clif_hom_food_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *foodid, int *fail); + void (*postHookFunc) (struct map_session_data *sd, int *foodid, int *fail); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_hom_food_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &foodid, &fail); + postHookFunc(sd, &foodid, &fail); } } - return retVal___; + return; } void HP_clif_send_homdata(struct map_session_data *sd, int state, int param) { int hIndex = 0; |