diff options
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_char.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index ffa2cd7e2..d1bff9280 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -482,6 +482,33 @@ int HP_chr_inventory_to_sql(const struct item items[], int max, int id) { } return retVal___; } +int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_charstatus *p, char sex) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_chr_mmo_gender_pre ) { + int (*preHookFunc) (const struct char_session_data *sd, const struct mmo_charstatus *p, char *sex); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chr_mmo_gender_pre[hIndex].func; + retVal___ = preHookFunc(sd, p, &sex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.mmo_gender(sd, p, sex); + } + if( HPMHooks.count.HP_chr_mmo_gender_post ) { + int (*postHookFunc) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char *sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chr_mmo_gender_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, p, &sex); + } + } + return retVal___; +} int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { int hIndex = 0; int retVal___ = 0; @@ -2244,6 +2271,33 @@ void HP_chr_ask_name_ack(int fd, int acc, const char *name, int type, int result } return; } +int HP_chr_changecharsex(int char_id, int sex) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_chr_changecharsex_pre ) { + int (*preHookFunc) (int *char_id, int *sex); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chr_changecharsex_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &sex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.changecharsex(char_id, sex); + } + if( HPMHooks.count.HP_chr_changecharsex_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chr_changecharsex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &sex); + } + } + return retVal___; +} void HP_chr_parse_frommap_change_account(int fd) { int hIndex = 0; if( HPMHooks.count.HP_chr_parse_frommap_change_account_pre ) { |