summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2015-04-25 19:13:46 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2015-04-25 19:13:46 +0200
commitd27eea4b5c112ab0209045ad65989697899dced0 (patch)
treea250091348bd5076d78ed28b069e0d141d76a554 /src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
parent5968552a393436aaf2d092cfb5da71903ca31960 (diff)
downloadhercules-d27eea4b5c112ab0209045ad65989697899dced0.tar.gz
hercules-d27eea4b5c112ab0209045ad65989697899dced0.tar.bz2
hercules-d27eea4b5c112ab0209045ad65989697899dced0.tar.xz
hercules-d27eea4b5c112ab0209045ad65989697899dced0.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_char.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc54
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 ) {