diff options
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 495 |
1 files changed, 234 insertions, 261 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 06a1299d5..c6f58a4c1 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -2545,14 +2545,14 @@ int HP_bg_team_delete(int bg_id) { } return retVal___; } -int HP_bg_team_warp(int bg_id, unsigned short mapindex, short x, short y) { +int HP_bg_team_warp(int bg_id, unsigned short map_index, short x, short y) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_bg_team_warp_pre ) { - int (*preHookFunc) (int *bg_id, unsigned short *mapindex, short *x, short *y); + int (*preHookFunc) (int *bg_id, unsigned short *map_index, short *x, short *y); for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_bg_team_warp_pre[hIndex].func; - retVal___ = preHookFunc(&bg_id, &mapindex, &x, &y); + retVal___ = preHookFunc(&bg_id, &map_index, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -2560,13 +2560,13 @@ int HP_bg_team_warp(int bg_id, unsigned short mapindex, short x, short y) { } } { - retVal___ = HPMHooks.source.bg.team_warp(bg_id, mapindex, x, y); + retVal___ = HPMHooks.source.bg.team_warp(bg_id, map_index, x, y); } if( HPMHooks.count.HP_bg_team_warp_post ) { - int (*postHookFunc) (int retVal___, int *bg_id, unsigned short *mapindex, short *x, short *y); + int (*postHookFunc) (int retVal___, int *bg_id, unsigned short *map_index, short *x, short *y); for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_bg_team_warp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &bg_id, &mapindex, &x, &y); + retVal___ = postHookFunc(retVal___, &bg_id, &map_index, &x, &y); } } return retVal___; @@ -2675,14 +2675,14 @@ int HP_bg_member_respawn(struct map_session_data *sd) { } return retVal___; } -int HP_bg_create(unsigned short mapindex, short rx, short ry, const char *ev, const char *dev) { +int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, const char *dev) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_bg_create_pre ) { - int (*preHookFunc) (unsigned short *mapindex, short *rx, short *ry, const char *ev, const char *dev); + int (*preHookFunc) (unsigned short *map_index, short *rx, short *ry, const char *ev, const char *dev); for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_bg_create_pre[hIndex].func; - retVal___ = preHookFunc(&mapindex, &rx, &ry, ev, dev); + retVal___ = preHookFunc(&map_index, &rx, &ry, ev, dev); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -2690,13 +2690,13 @@ int HP_bg_create(unsigned short mapindex, short rx, short ry, const char *ev, co } } { - retVal___ = HPMHooks.source.bg.create(mapindex, rx, ry, ev, dev); + retVal___ = HPMHooks.source.bg.create(map_index, rx, ry, ev, dev); } if( HPMHooks.count.HP_bg_create_post ) { - int (*postHookFunc) (int retVal___, unsigned short *mapindex, short *rx, short *ry, const char *ev, const char *dev); + int (*postHookFunc) (int retVal___, unsigned short *map_index, short *rx, short *ry, const char *ev, const char *dev); for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_bg_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mapindex, &rx, &ry, ev, dev); + retVal___ = postHookFunc(retVal___, &map_index, &rx, &ry, ev, dev); } } return retVal___; @@ -9049,10 +9049,10 @@ void HP_clif_font(struct map_session_data *sd) { } return; } -void HP_clif_progressbar(struct map_session_data *sd, unsigned long color, unsigned int second) { +void HP_clif_progressbar(struct map_session_data *sd, unsigned int color, unsigned int second) { int hIndex = 0; if( HPMHooks.count.HP_clif_progressbar_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned long *color, unsigned int *second); + void (*preHookFunc) (struct map_session_data *sd, unsigned int *color, unsigned int *second); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_progressbar_pre[hIndex].func; preHookFunc(sd, &color, &second); @@ -9066,7 +9066,7 @@ void HP_clif_progressbar(struct map_session_data *sd, unsigned long color, unsig HPMHooks.source.clif.progressbar(sd, color, second); } if( HPMHooks.count.HP_clif_progressbar_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned long *color, unsigned int *second); + void (*postHookFunc) (struct map_session_data *sd, unsigned int *color, unsigned int *second); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_progressbar_post[hIndex].func; postHookFunc(sd, &color, &second); @@ -10883,10 +10883,10 @@ void HP_clif_changechatstatus(struct chat_data *cd) { } return; } -void HP_clif_wis_message(int fd, const char *nick, const char *mes, int mes_len) { +void HP_clif_wis_message(int fd, const char *nick, const char *mes, size_t mes_len) { int hIndex = 0; if( HPMHooks.count.HP_clif_wis_message_pre ) { - void (*preHookFunc) (int *fd, const char *nick, const char *mes, int *mes_len); + void (*preHookFunc) (int *fd, const char *nick, const char *mes, size_t *mes_len); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_wis_message_pre[hIndex].func; preHookFunc(&fd, nick, mes, &mes_len); @@ -10900,7 +10900,7 @@ void HP_clif_wis_message(int fd, const char *nick, const char *mes, int mes_len) HPMHooks.source.clif.wis_message(fd, nick, mes, mes_len); } if( HPMHooks.count.HP_clif_wis_message_post ) { - void (*postHookFunc) (int *fd, const char *nick, const char *mes, int *mes_len); + void (*postHookFunc) (int *fd, const char *nick, const char *mes, size_t *mes_len); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_wis_message_post[hIndex].func; postHookFunc(&fd, nick, mes, &mes_len); @@ -10933,10 +10933,10 @@ void HP_clif_wis_end(int fd, int flag) { } return; } -void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len) { +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, int *len); + 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); @@ -10950,7 +10950,7 @@ void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len 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, int *len); + 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); @@ -10958,10 +10958,10 @@ void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len } return; } -void HP_clif_disp_message(struct block_list *src, const char *mes, int len, enum send_target target) { +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 ) { - void (*preHookFunc) (struct block_list *src, const char *mes, int *len, enum send_target *target); + void (*preHookFunc) (struct block_list *src, const char *mes, size_t *len, enum send_target *target); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_disp_message_pre[hIndex].func; preHookFunc(src, mes, &len, &target); @@ -10975,7 +10975,7 @@ void HP_clif_disp_message(struct block_list *src, const char *mes, int len, enum HPMHooks.source.clif.disp_message(src, mes, len, target); } if( HPMHooks.count.HP_clif_disp_message_post ) { - void (*postHookFunc) (struct block_list *src, const char *mes, int *len, enum send_target *target); + void (*postHookFunc) (struct block_list *src, const char *mes, size_t *len, enum send_target *target); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_disp_message_post[hIndex].func; postHookFunc(src, mes, &len, &target); @@ -10983,10 +10983,10 @@ void HP_clif_disp_message(struct block_list *src, const char *mes, int len, enum } return; } -void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type, enum send_target target) { +void HP_clif_broadcast(struct block_list *bl, const char *mes, size_t len, int type, enum send_target target) { int hIndex = 0; if( HPMHooks.count.HP_clif_broadcast_pre ) { - void (*preHookFunc) (struct block_list *bl, const char *mes, int *len, int *type, enum send_target *target); + void (*preHookFunc) (struct block_list *bl, const char *mes, size_t *len, int *type, enum send_target *target); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_broadcast_pre[hIndex].func; preHookFunc(bl, mes, &len, &type, &target); @@ -11000,7 +11000,7 @@ void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type HPMHooks.source.clif.broadcast(bl, mes, len, type, target); } if( HPMHooks.count.HP_clif_broadcast_post ) { - void (*postHookFunc) (struct block_list *bl, const char *mes, int *len, int *type, enum send_target *target); + void (*postHookFunc) (struct block_list *bl, const char *mes, size_t *len, int *type, enum send_target *target); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_broadcast_post[hIndex].func; postHookFunc(bl, mes, &len, &type, &target); @@ -11008,10 +11008,10 @@ void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type } return; } -void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target) { +void HP_clif_broadcast2(struct block_list *bl, const char *mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target) { int hIndex = 0; if( HPMHooks.count.HP_clif_broadcast2_pre ) { - void (*preHookFunc) (struct block_list *bl, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); + void (*preHookFunc) (struct block_list *bl, const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_broadcast2_pre[hIndex].func; preHookFunc(bl, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &target); @@ -11025,7 +11025,7 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigne HPMHooks.source.clif.broadcast2(bl, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, target); } if( HPMHooks.count.HP_clif_broadcast2_post ) { - void (*postHookFunc) (struct block_list *bl, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); + void (*postHookFunc) (struct block_list *bl, const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_broadcast2_post[hIndex].func; postHookFunc(bl, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &target); @@ -11033,10 +11033,10 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigne } return; } -void HP_clif_messagecolor(struct block_list *bl, unsigned long color, const char *msg) { +void HP_clif_messagecolor(struct block_list *bl, unsigned int color, const char *msg) { int hIndex = 0; if( HPMHooks.count.HP_clif_messagecolor_pre ) { - void (*preHookFunc) (struct block_list *bl, unsigned long *color, const char *msg); + void (*preHookFunc) (struct block_list *bl, unsigned int *color, const char *msg); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_messagecolor_pre[hIndex].func; preHookFunc(bl, &color, msg); @@ -11050,7 +11050,7 @@ void HP_clif_messagecolor(struct block_list *bl, unsigned long color, const char HPMHooks.source.clif.messagecolor(bl, color, msg); } if( HPMHooks.count.HP_clif_messagecolor_post ) { - void (*postHookFunc) (struct block_list *bl, unsigned long *color, const char *msg); + void (*postHookFunc) (struct block_list *bl, unsigned int *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); @@ -11284,11 +11284,11 @@ int HP_clif_colormes(int fd, enum clif_colors color, const char *msg) { } return retVal___; } -bool HP_clif_process_message(struct map_session_data *sd, int format, char **name_, int *namelen_, char **message_, int *messagelen_) { +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; if( HPMHooks.count.HP_clif_process_message_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *format, char **name_, int *namelen_, char **message_, int *messagelen_); + bool (*preHookFunc) (struct map_session_data *sd, int *format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_message_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_process_message_pre[hIndex].func; retVal___ = preHookFunc(sd, &format, name_, namelen_, message_, messagelen_); @@ -11302,7 +11302,7 @@ bool HP_clif_process_message(struct map_session_data *sd, int format, char **nam retVal___ = HPMHooks.source.clif.process_message(sd, format, name_, namelen_, message_, messagelen_); } if( HPMHooks.count.HP_clif_process_message_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *format, char **name_, int *namelen_, char **message_, int *messagelen_); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_message_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_process_message_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, &format, name_, namelen_, message_, messagelen_); @@ -13262,10 +13262,10 @@ void HP_clif_bg_xy_remove(struct map_session_data *sd) { } return; } -void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, int len) { +void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, size_t len) { int hIndex = 0; if( HPMHooks.count.HP_clif_bg_message_pre ) { - void (*preHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, int *len); + void (*preHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, size_t *len); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_bg_message_pre[hIndex].func; preHookFunc(bgd, &src_id, name, mes, &len); @@ -13279,7 +13279,7 @@ void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *n HPMHooks.source.clif.bg_message(bgd, src_id, name, mes, len); } if( HPMHooks.count.HP_clif_bg_message_post ) { - void (*postHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, int *len); + void (*postHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, size_t *len); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_bg_message_post[hIndex].func; postHookFunc(bgd, &src_id, name, mes, &len); @@ -14097,13 +14097,13 @@ void HP_clif_quest_send_mission(struct map_session_data *sd) { } return; } -void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd, int index) { +void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) { int hIndex = 0; if( HPMHooks.count.HP_clif_quest_add_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct quest *qd, int *index); + void (*preHookFunc) (struct map_session_data *sd, struct quest *qd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_quest_add_pre[hIndex].func; - preHookFunc(sd, qd, &index); + preHookFunc(sd, qd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -14111,13 +14111,13 @@ void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd, int index) } } { - HPMHooks.source.clif.quest_add(sd, qd, index); + HPMHooks.source.clif.quest_add(sd, qd); } if( HPMHooks.count.HP_clif_quest_add_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct quest *qd, int *index); + void (*postHookFunc) (struct map_session_data *sd, struct quest *qd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_quest_add_post[hIndex].func; - postHookFunc(sd, qd, &index); + postHookFunc(sd, qd); } } return; @@ -14172,13 +14172,13 @@ void HP_clif_quest_update_status(struct map_session_data *sd, int quest_id, bool } return; } -void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *qd, int index) { +void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *qd) { int hIndex = 0; if( HPMHooks.count.HP_clif_quest_update_objective_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct quest *qd, int *index); + void (*preHookFunc) (struct map_session_data *sd, struct quest *qd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_quest_update_objective_pre[hIndex].func; - preHookFunc(sd, qd, &index); + preHookFunc(sd, qd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -14186,13 +14186,13 @@ void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *q } } { - HPMHooks.source.clif.quest_update_objective(sd, qd, index); + HPMHooks.source.clif.quest_update_objective(sd, qd); } if( HPMHooks.count.HP_clif_quest_update_objective_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct quest *qd, int *index); + void (*postHookFunc) (struct map_session_data *sd, struct quest *qd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_quest_update_objective_post[hIndex].func; - postHookFunc(sd, qd, &index); + postHookFunc(sd, qd); } } return; @@ -15047,10 +15047,10 @@ void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) { } return; } -void HP_clif_PartyBookingRefuseVolunteer(unsigned long aid, struct map_session_data *sd) { +void HP_clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre ) { - void (*preHookFunc) (unsigned long *aid, struct map_session_data *sd); + void (*preHookFunc) (unsigned int *aid, struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_pre[hIndex].func; preHookFunc(&aid, sd); @@ -15064,7 +15064,7 @@ void HP_clif_PartyBookingRefuseVolunteer(unsigned long aid, struct map_session_d HPMHooks.source.clif.PartyBookingRefuseVolunteer(aid, sd); } if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post ) { - void (*postHookFunc) (unsigned long *aid, struct map_session_data *sd); + void (*postHookFunc) (unsigned int *aid, struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_post[hIndex].func; postHookFunc(&aid, sd); @@ -23253,14 +23253,14 @@ struct guild_castle* HP_guild_mapname2gc(const char *mapname) { } return retVal___; } -struct guild_castle* HP_guild_mapindex2gc(short mapindex) { +struct guild_castle* HP_guild_mapindex2gc(short map_index) { int hIndex = 0; struct guild_castle* retVal___ = NULL; if( HPMHooks.count.HP_guild_mapindex2gc_pre ) { - struct guild_castle* (*preHookFunc) (short *mapindex); + struct guild_castle* (*preHookFunc) (short *map_index); for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_guild_mapindex2gc_pre[hIndex].func; - retVal___ = preHookFunc(&mapindex); + retVal___ = preHookFunc(&map_index); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -23268,13 +23268,13 @@ struct guild_castle* HP_guild_mapindex2gc(short mapindex) { } } { - retVal___ = HPMHooks.source.guild.mapindex2gc(mapindex); + retVal___ = HPMHooks.source.guild.mapindex2gc(map_index); } if( HPMHooks.count.HP_guild_mapindex2gc_post ) { - struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short *mapindex); + struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short *map_index); for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_guild_mapindex2gc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mapindex); + retVal___ = postHookFunc(retVal___, &map_index); } } return retVal___; @@ -27396,11 +27396,11 @@ 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 HP_intif_broadcast(const char *mes, size_t len, int type) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_intif_broadcast_pre ) { - int (*preHookFunc) (const char *mes, int *len, int *type); + int (*preHookFunc) (const char *mes, size_t *len, int *type); 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); @@ -27414,7 +27414,7 @@ int HP_intif_broadcast(const char *mes, int len, int type) { retVal___ = HPMHooks.source.intif.broadcast(mes, len, type); } if( HPMHooks.count.HP_intif_broadcast_post ) { - int (*postHookFunc) (int retVal___, const char *mes, int *len, int *type); + int (*postHookFunc) (int retVal___, const char *mes, size_t *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); @@ -27422,11 +27422,11 @@ int HP_intif_broadcast(const char *mes, int len, int type) { } return retVal___; } -int HP_intif_broadcast2(const char *mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY) { +int HP_intif_broadcast2(const char *mes, size_t 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 ) { - int (*preHookFunc) (const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); + int (*preHookFunc) (const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); 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); @@ -27440,7 +27440,7 @@ int HP_intif_broadcast2(const char *mes, int len, unsigned long fontColor, short retVal___ = HPMHooks.source.intif.broadcast2(mes, len, fontColor, fontType, fontSize, fontAlign, fontY); } if( HPMHooks.count.HP_intif_broadcast2_post ) { - int (*postHookFunc) (int retVal___, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); + int (*postHookFunc) (int retVal___, const char *mes, size_t *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); @@ -27474,11 +27474,11 @@ int HP_intif_main_message(struct map_session_data *sd, const char *message) { } return retVal___; } -int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) { +int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, size_t mes_len) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_intif_wis_message_pre ) { - int (*preHookFunc) (struct map_session_data *sd, char *nick, char *mes, int *mes_len); + int (*preHookFunc) (struct map_session_data *sd, char *nick, char *mes, size_t *mes_len); 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); @@ -27492,7 +27492,7 @@ int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int retVal___ = HPMHooks.source.intif.wis_message(sd, nick, mes, mes_len); } if( HPMHooks.count.HP_intif_wis_message_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *nick, char *mes, int *mes_len); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *nick, char *mes, size_t *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); @@ -28046,11 +28046,11 @@ int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int le } return retVal___; } -int HP_intif_guild_change_gm(int guild_id, const char *name, int len) { +int HP_intif_guild_change_gm(int guild_id, const char *name, size_t len) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_intif_guild_change_gm_pre ) { - int (*preHookFunc) (int *guild_id, const char *name, int *len); + int (*preHookFunc) (int *guild_id, const char *name, size_t *len); for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_intif_guild_change_gm_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, name, &len); @@ -28064,7 +28064,7 @@ int HP_intif_guild_change_gm(int guild_id, const char *name, int len) { retVal___ = HPMHooks.source.intif.guild_change_gm(guild_id, name, len); } if( HPMHooks.count.HP_intif_guild_change_gm_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, const char *name, int *len); + int (*postHookFunc) (int retVal___, int *guild_id, const char *name, size_t *len); for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_intif_guild_change_gm_post[hIndex].func; retVal___ = postHookFunc(retVal___, &guild_id, name, &len); @@ -28539,31 +28539,30 @@ int HP_intif_homunculus_requestdelete(int homun_id) { } return retVal___; } -int HP_intif_request_questlog(struct map_session_data *sd) { +void HP_intif_request_questlog(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; if( HPMHooks.count.HP_intif_request_questlog_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + void (*preHookFunc) (struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_intif_request_questlog_pre[hIndex].func; - retVal___ = preHookFunc(sd); + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.intif.request_questlog(sd); + HPMHooks.source.intif.request_questlog(sd); } if( HPMHooks.count.HP_intif_request_questlog_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); + void (*postHookFunc) (struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_intif_request_questlog_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + postHookFunc(sd); } } - return retVal___; + return; } int HP_intif_quest_save(struct map_session_data *sd) { int hIndex = 0; @@ -35031,14 +35030,14 @@ bool HP_map_blid_exists(int id) { } return retVal___; } -int16 HP_map_mapindex2mapid(unsigned short mapindex) { +int16 HP_map_mapindex2mapid(unsigned short map_index) { int hIndex = 0; int16 retVal___ = 0; if( HPMHooks.count.HP_map_mapindex2mapid_pre ) { - int16 (*preHookFunc) (unsigned short *mapindex); + int16 (*preHookFunc) (unsigned short *map_index); for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func; - retVal___ = preHookFunc(&mapindex); + retVal___ = preHookFunc(&map_index); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35046,13 +35045,13 @@ int16 HP_map_mapindex2mapid(unsigned short mapindex) { } } { - retVal___ = HPMHooks.source.map.mapindex2mapid(mapindex); + retVal___ = HPMHooks.source.map.mapindex2mapid(map_index); } if( HPMHooks.count.HP_map_mapindex2mapid_post ) { - int16 (*postHookFunc) (int16 retVal___, unsigned short *mapindex); + int16 (*postHookFunc) (int16 retVal___, unsigned short *map_index); for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_map_mapindex2mapid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mapindex); + retVal___ = postHookFunc(retVal___, &map_index); } } return retVal___; @@ -35109,14 +35108,14 @@ int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { } return retVal___; } -int HP_map_setipport(unsigned short mapindex, uint32 ip, uint16 port) { +int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_map_setipport_pre ) { - int (*preHookFunc) (unsigned short *mapindex, uint32 *ip, uint16 *port); + int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_map_setipport_pre[hIndex].func; - retVal___ = preHookFunc(&mapindex, &ip, &port); + retVal___ = preHookFunc(&map_index, &ip, &port); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35124,25 +35123,25 @@ int HP_map_setipport(unsigned short mapindex, uint32 ip, uint16 port) { } } { - retVal___ = HPMHooks.source.map.setipport(mapindex, ip, port); + retVal___ = HPMHooks.source.map.setipport(map_index, ip, port); } if( HPMHooks.count.HP_map_setipport_post ) { - int (*postHookFunc) (int retVal___, unsigned short *mapindex, uint32 *ip, uint16 *port); + int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port); for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_map_setipport_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mapindex, &ip, &port); + retVal___ = postHookFunc(retVal___, &map_index, &ip, &port); } } return retVal___; } -int HP_map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) { +int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_map_eraseipport_pre ) { - int (*preHookFunc) (unsigned short *mapindex, uint32 *ip, uint16 *port); + int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_map_eraseipport_pre[hIndex].func; - retVal___ = preHookFunc(&mapindex, &ip, &port); + retVal___ = preHookFunc(&map_index, &ip, &port); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35150,13 +35149,13 @@ int HP_map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) { } } { - retVal___ = HPMHooks.source.map.eraseipport(mapindex, ip, port); + retVal___ = HPMHooks.source.map.eraseipport(map_index, ip, port); } if( HPMHooks.count.HP_map_eraseipport_post ) { - int (*postHookFunc) (int retVal___, unsigned short *mapindex, uint32 *ip, uint16 *port); + int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port); for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_map_eraseipport_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mapindex, &ip, &port); + retVal___ = postHookFunc(retVal___, &map_index, &ip, &port); } } return retVal___; @@ -38339,14 +38338,14 @@ int HP_mob_db_searchname(const char *str) { } return retVal___; } -int HP_mob_db_searchname_array_sub(struct mob_db *mob, const char *str, int flag) { +int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int flag) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) { - int (*preHookFunc) (struct mob_db *mob, const char *str, int *flag); + int (*preHookFunc) (struct mob_db *monster, const char *str, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_pre[hIndex].func; - retVal___ = preHookFunc(mob, str, &flag); + retVal___ = preHookFunc(monster, str, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38354,13 +38353,13 @@ int HP_mob_db_searchname_array_sub(struct mob_db *mob, const char *str, int flag } } { - retVal___ = HPMHooks.source.mob.db_searchname_array_sub(mob, str, flag); + retVal___ = HPMHooks.source.mob.db_searchname_array_sub(monster, str, flag); } if( HPMHooks.count.HP_mob_db_searchname_array_sub_post ) { - int (*postHookFunc) (int retVal___, struct mob_db *mob, const char *str, int *flag); + int (*postHookFunc) (int retVal___, struct mob_db *monster, const char *str, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mob, str, &flag); + retVal___ = postHookFunc(retVal___, monster, str, &flag); } } return retVal___; @@ -44809,32 +44808,6 @@ int HP_pc_class2idx(int class_) { } return retVal___; } -int HP_pc_get_group_level(struct map_session_data *sd) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_get_group_level_pre ) { - int (*preHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_group_level_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_get_group_level_pre[hIndex].func; - retVal___ = preHookFunc(sd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.pc.get_group_level(sd); - } - if( HPMHooks.count.HP_pc_get_group_level_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_group_level_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_get_group_level_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); - } - } - return retVal___; -} bool HP_pc_can_give_items(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; @@ -44913,32 +44886,6 @@ bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { } return retVal___; } -bool HP_pc_has_permission(struct map_session_data *sd, unsigned int permission) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_has_permission_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, unsigned int *permission); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_permission_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_has_permission_pre[hIndex].func; - retVal___ = preHookFunc(sd, &permission); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.pc.has_permission(sd, permission); - } - if( HPMHooks.count.HP_pc_has_permission_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *permission); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_permission_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_has_permission_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &permission); - } - } - return retVal___; -} int HP_pc_set_group(struct map_session_data *sd, int group_id) { int hIndex = 0; int retVal___ = 0; @@ -45431,14 +45378,14 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) { } return retVal___; } -int HP_pc_setpos(struct map_session_data *sd, unsigned short mapindex, int x, int y, clr_type clrtype) { +int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_pc_setpos_pre ) { - int (*preHookFunc) (struct map_session_data *sd, unsigned short *mapindex, int *x, int *y, clr_type *clrtype); + int (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func; - retVal___ = preHookFunc(sd, &mapindex, &x, &y, &clrtype); + retVal___ = preHookFunc(sd, &map_index, &x, &y, &clrtype); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45446,25 +45393,25 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short mapindex, int x, in } } { - retVal___ = HPMHooks.source.pc.setpos(sd, mapindex, x, y, clrtype); + retVal___ = HPMHooks.source.pc.setpos(sd, map_index, x, y, clrtype); } if( HPMHooks.count.HP_pc_setpos_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *mapindex, int *x, int *y, clr_type *clrtype); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *map_index, int *x, int *y, 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, &mapindex, &x, &y, &clrtype); + retVal___ = postHookFunc(retVal___, sd, &map_index, &x, &y, &clrtype); } } return retVal___; } -int HP_pc_setsavepoint(struct map_session_data *sd, short mapindex, int x, int y) { +int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int y) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_pc_setsavepoint_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *mapindex, int *x, int *y); + int (*preHookFunc) (struct map_session_data *sd, short *map_index, int *x, int *y); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_setsavepoint_pre[hIndex].func; - retVal___ = preHookFunc(sd, &mapindex, &x, &y); + retVal___ = preHookFunc(sd, &map_index, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45472,13 +45419,13 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short mapindex, int x, int y } } { - retVal___ = HPMHooks.source.pc.setsavepoint(sd, mapindex, x, y); + retVal___ = HPMHooks.source.pc.setsavepoint(sd, map_index, x, y); } if( HPMHooks.count.HP_pc_setsavepoint_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *mapindex, int *x, int *y); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *map_index, int *x, int *y); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_setsavepoint_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &mapindex, &x, &y); + retVal___ = postHookFunc(retVal___, sd, &map_index, &x, &y); } } return retVal___; @@ -50930,6 +50877,31 @@ void HP_quest_init(bool minimal) { } return; } +void HP_quest_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_quest_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.quest.final(); + } + if( HPMHooks.count.HP_quest_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} void HP_quest_reload(void) { int hIndex = 0; if( HPMHooks.count.HP_quest_reload_pre ) { @@ -50955,13 +50927,13 @@ void HP_quest_reload(void) { } return; } -int HP_quest_search_db(int quest_id) { +struct quest_db* HP_quest_db(int quest_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_quest_search_db_pre ) { - int (*preHookFunc) (int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_search_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_search_db_pre[hIndex].func; + struct quest_db* retVal___ = NULL; + if( HPMHooks.count.HP_quest_db_pre ) { + struct quest_db* (*preHookFunc) (int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_db_pre[hIndex].func; retVal___ = preHookFunc(&quest_id); } if( *HPMforce_return ) { @@ -50970,12 +50942,12 @@ int HP_quest_search_db(int quest_id) { } } { - retVal___ = HPMHooks.source.quest.search_db(quest_id); + retVal___ = HPMHooks.source.quest.db(quest_id); } - if( HPMHooks.count.HP_quest_search_db_post ) { - int (*postHookFunc) (int retVal___, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_search_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_search_db_post[hIndex].func; + if( HPMHooks.count.HP_quest_db_post ) { + struct quest_db* (*postHookFunc) (struct quest_db* retVal___, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_db_post[hIndex].func; retVal___ = postHookFunc(retVal___, &quest_id); } } @@ -51142,11 +51114,11 @@ void HP_quest_update_objective(TBL_PC *sd, int mob_id) { } return; } -int HP_quest_update_status(TBL_PC *sd, int quest_id, quest_state qs) { +int HP_quest_update_status(TBL_PC *sd, int quest_id, enum quest_state qs) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_quest_update_status_pre ) { - int (*preHookFunc) (TBL_PC *sd, int *quest_id, quest_state *qs); + int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_state *qs); for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_quest_update_status_pre[hIndex].func; retVal___ = preHookFunc(sd, &quest_id, &qs); @@ -51160,7 +51132,7 @@ int HP_quest_update_status(TBL_PC *sd, int quest_id, quest_state qs) { retVal___ = HPMHooks.source.quest.update_status(sd, quest_id, qs); } if( HPMHooks.count.HP_quest_update_status_post ) { - int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, quest_state *qs); + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, enum quest_state *qs); for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_quest_update_status_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, &quest_id, &qs); @@ -51168,11 +51140,11 @@ int HP_quest_update_status(TBL_PC *sd, int quest_id, quest_state qs) { } return retVal___; } -int HP_quest_check(TBL_PC *sd, int quest_id, quest_check_type type) { +int HP_quest_check(TBL_PC *sd, int quest_id, enum quest_check_type type) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_quest_check_pre ) { - int (*preHookFunc) (TBL_PC *sd, int *quest_id, quest_check_type *type); + int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_check_type *type); for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_quest_check_pre[hIndex].func; retVal___ = preHookFunc(sd, &quest_id, &type); @@ -51186,7 +51158,7 @@ int HP_quest_check(TBL_PC *sd, int quest_id, quest_check_type type) { retVal___ = HPMHooks.source.quest.check(sd, quest_id, type); } if( HPMHooks.count.HP_quest_check_post ) { - int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, quest_check_type *type); + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, enum quest_check_type *type); for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_quest_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, &quest_id, &type); @@ -51194,6 +51166,31 @@ int HP_quest_check(TBL_PC *sd, int quest_id, quest_check_type type) { } return retVal___; } +void HP_quest_clear(void) { + int hIndex = 0; + if( HPMHooks.count.HP_quest_clear_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_clear_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.quest.clear(); + } + if( HPMHooks.count.HP_quest_clear_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} int HP_quest_read_db(void) { int hIndex = 0; int retVal___ = 0; @@ -51323,6 +51320,32 @@ struct script_code* HP_script_parse(const char *src, const char *file, int line, } return retVal___; } +bool HP_script_add_builtin(const struct script_function *buildin, bool override) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_script_add_builtin_pre ) { + bool (*preHookFunc) (const struct script_function *buildin, bool *override); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_builtin_pre[hIndex].func; + retVal___ = preHookFunc(buildin, &override); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.add_builtin(buildin, override); + } + if( HPMHooks.count.HP_script_add_builtin_post ) { + bool (*postHookFunc) (bool retVal___, const struct script_function *buildin, bool *override); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_builtin_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buildin, &override); + } + } + return retVal___; +} void HP_script_parse_builtin(void) { int hIndex = 0; if( HPMHooks.count.HP_script_parse_builtin_pre ) { @@ -52728,31 +52751,6 @@ void HP_script_reportfunc(struct script_state *st) { } return; } -void HP_script_disp_error_message2(const char *mes, const char *pos, int report) { - int hIndex = 0; - if( HPMHooks.count.HP_script_disp_error_message2_pre ) { - void (*preHookFunc) (const char *mes, const char *pos, int *report); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_error_message2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_disp_error_message2_pre[hIndex].func; - preHookFunc(mes, pos, &report); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.script.disp_error_message2(mes, pos, report); - } - if( HPMHooks.count.HP_script_disp_error_message2_post ) { - void (*postHookFunc) (const char *mes, const char *pos, int *report); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_error_message2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_disp_error_message2_post[hIndex].func; - postHookFunc(mes, pos, &report); - } - } - return; -} void HP_script_disp_warning_message(const char *mes, const char *pos) { int hIndex = 0; if( HPMHooks.count.HP_script_disp_warning_message_pre ) { @@ -54419,14 +54417,14 @@ const char* HP_script_getfuncname(struct script_state *st) { } return retVal___; } -bool HP_script_local_casecheck_add_str(const char *p, int h) { +unsigned int HP_script_calc_hash_ci(const char *p) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_script_local_casecheck_add_str_pre ) { - bool (*preHookFunc) (const char *p, int *h); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_local_casecheck_add_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_local_casecheck_add_str_pre[hIndex].func; - retVal___ = preHookFunc(p, &h); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_script_calc_hash_ci_pre ) { + unsigned int (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_calc_hash_ci_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54434,42 +54432,17 @@ bool HP_script_local_casecheck_add_str(const char *p, int h) { } } { - retVal___ = HPMHooks.source.script.local_casecheck_add_str(p, h); + retVal___ = HPMHooks.source.script.calc_hash_ci(p); } - if( HPMHooks.count.HP_script_local_casecheck_add_str_post ) { - bool (*postHookFunc) (bool retVal___, const char *p, int *h); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_local_casecheck_add_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_local_casecheck_add_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &h); + if( HPMHooks.count.HP_script_calc_hash_ci_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_calc_hash_ci_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -void HP_script_local_casecheck_clear(void) { - int hIndex = 0; - if( HPMHooks.count.HP_script_local_casecheck_clear_pre ) { - void (*preHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_local_casecheck_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_local_casecheck_clear_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.script.local_casecheck_clear(); - } - if( HPMHooks.count.HP_script_local_casecheck_clear_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_local_casecheck_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_local_casecheck_clear_post[hIndex].func; - postHookFunc(); - } - } - return; -} /* searchstore */ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { int hIndex = 0; @@ -56049,14 +56022,14 @@ int HP_skill_name2id(const char *name) { } return retVal___; } -int HP_skill_isammotype(struct map_session_data *sd, int skill) { +int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_skill_isammotype_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *skill); + int (*preHookFunc) (struct map_session_data *sd, int *skill_id); for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill); + retVal___ = preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56064,13 +56037,13 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill) { } } { - retVal___ = HPMHooks.source.skill.isammotype(sd, skill); + retVal___ = HPMHooks.source.skill.isammotype(sd, skill_id); } if( HPMHooks.count.HP_skill_isammotype_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill_id); for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_skill_isammotype_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill); + retVal___ = postHookFunc(retVal___, sd, &skill_id); } } return retVal___; @@ -60948,13 +60921,13 @@ int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt } return retVal___; } -void HP_status_calc_misc(struct block_list *bl, struct status_data *status, int level) { +void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int level) { int hIndex = 0; if( HPMHooks.count.HP_status_calc_misc_pre ) { - void (*preHookFunc) (struct block_list *bl, struct status_data *status, int *level); + void (*preHookFunc) (struct block_list *bl, struct status_data *st, int *level); for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_status_calc_misc_pre[hIndex].func; - preHookFunc(bl, status, &level); + preHookFunc(bl, st, &level); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60962,13 +60935,13 @@ void HP_status_calc_misc(struct block_list *bl, struct status_data *status, int } } { - HPMHooks.source.status.calc_misc(bl, status, level); + HPMHooks.source.status.calc_misc(bl, st, level); } if( HPMHooks.count.HP_status_calc_misc_post ) { - void (*postHookFunc) (struct block_list *bl, struct status_data *status, int *level); + void (*postHookFunc) (struct block_list *bl, struct status_data *st, int *level); for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_status_calc_misc_post[hIndex].func; - postHookFunc(bl, status, &level); + postHookFunc(bl, st, &level); } } return; |