summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2016-02-24 21:41:18 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2016-02-24 21:41:18 +0100
commitcda8f89a9dd0cfea7be1529f506612dfbca25898 (patch)
treec939182804b14fca143673b0628000fe98539778 /src/plugins/HPMHooking
parentff314da1740080a6cf1920f5ab2583ec3c60e3d2 (diff)
downloadhercules-cda8f89a9dd0cfea7be1529f506612dfbca25898.tar.gz
hercules-cda8f89a9dd0cfea7be1529f506612dfbca25898.tar.bz2
hercules-cda8f89a9dd0cfea7be1529f506612dfbca25898.tar.xz
hercules-cda8f89a9dd0cfea7be1529f506612dfbca25898.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc318
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc27
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc285
9 files changed, 426 insertions, 234 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 849354fa1..89bb847ce 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -782,6 +782,8 @@ struct {
struct HPMHookPoint *HP_iMalloc_reallocz_post;
struct HPMHookPoint *HP_iMalloc_astrdup_pre;
struct HPMHookPoint *HP_iMalloc_astrdup_post;
+ struct HPMHookPoint *HP_iMalloc_astrndup_pre;
+ struct HPMHookPoint *HP_iMalloc_astrndup_post;
struct HPMHookPoint *HP_iMalloc_free_pre;
struct HPMHookPoint *HP_iMalloc_free_post;
struct HPMHookPoint *HP_iMalloc_memory_check_pre;
@@ -838,6 +840,8 @@ struct {
struct HPMHookPoint *HP_mapif_auction_bid_post;
struct HPMHookPoint *HP_mapif_parse_auction_bid_pre;
struct HPMHookPoint *HP_mapif_parse_auction_bid_post;
+ struct HPMHookPoint *HP_mapif_elemental_create_pre;
+ struct HPMHookPoint *HP_mapif_elemental_create_post;
struct HPMHookPoint *HP_mapif_elemental_save_pre;
struct HPMHookPoint *HP_mapif_elemental_save_post;
struct HPMHookPoint *HP_mapif_elemental_load_pre;
@@ -938,6 +942,8 @@ struct {
struct HPMHookPoint *HP_mapif_homunculus_saved_post;
struct HPMHookPoint *HP_mapif_homunculus_renamed_pre;
struct HPMHookPoint *HP_mapif_homunculus_renamed_post;
+ struct HPMHookPoint *HP_mapif_homunculus_create_pre;
+ struct HPMHookPoint *HP_mapif_homunculus_create_post;
struct HPMHookPoint *HP_mapif_homunculus_save_pre;
struct HPMHookPoint *HP_mapif_homunculus_save_post;
struct HPMHookPoint *HP_mapif_homunculus_load_pre;
@@ -982,6 +988,8 @@ struct {
struct HPMHookPoint *HP_mapif_mail_send_post;
struct HPMHookPoint *HP_mapif_parse_mail_send_pre;
struct HPMHookPoint *HP_mapif_parse_mail_send_post;
+ struct HPMHookPoint *HP_mapif_mercenary_create_pre;
+ struct HPMHookPoint *HP_mapif_mercenary_create_post;
struct HPMHookPoint *HP_mapif_mercenary_save_pre;
struct HPMHookPoint *HP_mapif_mercenary_save_post;
struct HPMHookPoint *HP_mapif_mercenary_load_pre;
@@ -2181,6 +2189,8 @@ struct {
int HP_iMalloc_reallocz_post;
int HP_iMalloc_astrdup_pre;
int HP_iMalloc_astrdup_post;
+ int HP_iMalloc_astrndup_pre;
+ int HP_iMalloc_astrndup_post;
int HP_iMalloc_free_pre;
int HP_iMalloc_free_post;
int HP_iMalloc_memory_check_pre;
@@ -2237,6 +2247,8 @@ struct {
int HP_mapif_auction_bid_post;
int HP_mapif_parse_auction_bid_pre;
int HP_mapif_parse_auction_bid_post;
+ int HP_mapif_elemental_create_pre;
+ int HP_mapif_elemental_create_post;
int HP_mapif_elemental_save_pre;
int HP_mapif_elemental_save_post;
int HP_mapif_elemental_load_pre;
@@ -2337,6 +2349,8 @@ struct {
int HP_mapif_homunculus_saved_post;
int HP_mapif_homunculus_renamed_pre;
int HP_mapif_homunculus_renamed_post;
+ int HP_mapif_homunculus_create_pre;
+ int HP_mapif_homunculus_create_post;
int HP_mapif_homunculus_save_pre;
int HP_mapif_homunculus_save_post;
int HP_mapif_homunculus_load_pre;
@@ -2381,6 +2395,8 @@ struct {
int HP_mapif_mail_send_post;
int HP_mapif_parse_mail_send_pre;
int HP_mapif_parse_mail_send_post;
+ int HP_mapif_mercenary_create_pre;
+ int HP_mapif_mercenary_create_post;
int HP_mapif_mercenary_save_pre;
int HP_mapif_mercenary_save_post;
int HP_mapif_mercenary_load_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 7f359a9b4..f579fb301 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -423,6 +423,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
{ HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
{ HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
+ { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) },
{ HP_POP(iMalloc->free, HP_iMalloc_free) },
{ HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
{ HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
@@ -452,6 +453,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->parse_auction_close, HP_mapif_parse_auction_close) },
{ HP_POP(mapif->auction_bid, HP_mapif_auction_bid) },
{ HP_POP(mapif->parse_auction_bid, HP_mapif_parse_auction_bid) },
+ { HP_POP(mapif->elemental_create, HP_mapif_elemental_create) },
{ HP_POP(mapif->elemental_save, HP_mapif_elemental_save) },
{ HP_POP(mapif->elemental_load, HP_mapif_elemental_load) },
{ HP_POP(mapif->elemental_delete, HP_mapif_elemental_delete) },
@@ -502,6 +504,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->homunculus_loaded, HP_mapif_homunculus_loaded) },
{ HP_POP(mapif->homunculus_saved, HP_mapif_homunculus_saved) },
{ HP_POP(mapif->homunculus_renamed, HP_mapif_homunculus_renamed) },
+ { HP_POP(mapif->homunculus_create, HP_mapif_homunculus_create) },
{ HP_POP(mapif->homunculus_save, HP_mapif_homunculus_save) },
{ HP_POP(mapif->homunculus_load, HP_mapif_homunculus_load) },
{ HP_POP(mapif->homunculus_delete, HP_mapif_homunculus_delete) },
@@ -524,6 +527,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->parse_mail_return, HP_mapif_parse_mail_return) },
{ HP_POP(mapif->mail_send, HP_mapif_mail_send) },
{ HP_POP(mapif->parse_mail_send, HP_mapif_parse_mail_send) },
+ { HP_POP(mapif->mercenary_create, HP_mapif_mercenary_create) },
{ HP_POP(mapif->mercenary_save, HP_mapif_mercenary_save) },
{ HP_POP(mapif->mercenary_load, HP_mapif_mercenary_load) },
{ HP_POP(mapif->mercenary_delete, HP_mapif_mercenary_delete) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 10b518e98..6ede0eb2b 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -771,11 +771,11 @@ int HP_chr_check_char_name(char *name, char *esc_name) {
}
return retVal___;
}
-int HP_chr_make_new_char_sql(struct char_session_data *sd, char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style) {
+int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_chr_make_new_char_sql_pre ) {
- int (*preHookFunc) (struct char_session_data *sd, char *name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style);
+ int (*preHookFunc) (struct char_session_data *sd, const char *name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_pre[hIndex].func;
@@ -790,7 +790,7 @@ int HP_chr_make_new_char_sql(struct char_session_data *sd, char *name_, int str,
retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style);
}
if( HPMHooks.count.HP_chr_make_new_char_sql_post ) {
- int (*postHookFunc) (int retVal___, struct char_session_data *sd, char *name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style);
+ int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name_, &str, &agi, &vit, &int_, &dex, &luk, &slot, &hair_color, &hair_style);
@@ -2137,10 +2137,10 @@ void HP_chr_parse_frommap_char_select_req(int fd) {
}
return;
}
-void HP_chr_change_map_server_ack(int fd, uint8 *data, bool ok) {
+void HP_chr_change_map_server_ack(int fd, const uint8 *data, bool ok) {
int hIndex = 0;
if( HPMHooks.count.HP_chr_change_map_server_ack_pre ) {
- void (*preHookFunc) (int *fd, uint8 *data, bool *ok);
+ void (*preHookFunc) (int *fd, const uint8 *data, bool *ok);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chr_change_map_server_ack_pre[hIndex].func;
@@ -2155,7 +2155,7 @@ void HP_chr_change_map_server_ack(int fd, uint8 *data, bool ok) {
HPMHooks.source.chr.change_map_server_ack(fd, data, ok);
}
if( HPMHooks.count.HP_chr_change_map_server_ack_post ) {
- void (*postHookFunc) (int *fd, uint8 *data, bool *ok);
+ void (*postHookFunc) (int *fd, const uint8 *data, bool *ok);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chr_change_map_server_ack_post[hIndex].func;
postHookFunc(&fd, data, &ok);
@@ -5865,11 +5865,11 @@ void HP_inter_guild_sql_final(void) {
}
return;
}
-int HP_inter_guild_search_guildname(char *str) {
+int HP_inter_guild_search_guildname(const char *str) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_inter_guild_search_guildname_pre ) {
- int (*preHookFunc) (char *str);
+ int (*preHookFunc) (const char *str);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_pre[hIndex].func;
@@ -5884,7 +5884,7 @@ int HP_inter_guild_search_guildname(char *str) {
retVal___ = HPMHooks.source.inter_guild.search_guildname(str);
}
if( HPMHooks.count.HP_inter_guild_search_guildname_post ) {
- int (*postHookFunc) (int retVal___, char *str);
+ int (*postHookFunc) (int retVal___, const char *str);
for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_post[hIndex].func;
retVal___ = postHookFunc(retVal___, str);
@@ -7391,15 +7391,15 @@ int HP_inter_party_CharOffline(int char_id, int party_id) {
return retVal___;
}
/* inter_pet */
-int HP_inter_pet_tosql(int pet_id, struct s_pet *p) {
+int HP_inter_pet_tosql(const struct s_pet *p) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_inter_pet_tosql_pre ) {
- int (*preHookFunc) (int *pet_id, struct s_pet *p);
+ int (*preHookFunc) (const struct s_pet *p);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_inter_pet_tosql_pre[hIndex].func;
- retVal___ = preHookFunc(&pet_id, p);
+ retVal___ = preHookFunc(p);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -7407,13 +7407,13 @@ int HP_inter_pet_tosql(int pet_id, struct s_pet *p) {
}
}
{
- retVal___ = HPMHooks.source.inter_pet.tosql(pet_id, p);
+ retVal___ = HPMHooks.source.inter_pet.tosql(p);
}
if( HPMHooks.count.HP_inter_pet_tosql_post ) {
- int (*postHookFunc) (int retVal___, int *pet_id, struct s_pet *p);
+ int (*postHookFunc) (int retVal___, const struct s_pet *p);
for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_inter_pet_tosql_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &pet_id, p);
+ retVal___ = postHookFunc(retVal___, p);
}
}
return retVal___;
@@ -7635,11 +7635,11 @@ int HP_inter_storage_fromsql(int account_id, struct storage_data *p) {
}
return retVal___;
}
-int HP_inter_storage_guild_storage_tosql(int guild_id, struct guild_storage *p) {
+int HP_inter_storage_guild_storage_tosql(int guild_id, const struct guild_storage *p) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre ) {
- int (*preHookFunc) (int *guild_id, struct guild_storage *p);
+ int (*preHookFunc) (int *guild_id, const struct guild_storage *p);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_pre[hIndex].func;
@@ -7654,7 +7654,7 @@ int HP_inter_storage_guild_storage_tosql(int guild_id, struct guild_storage *p)
retVal___ = HPMHooks.source.inter_storage.guild_storage_tosql(guild_id, p);
}
if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_post ) {
- int (*postHookFunc) (int retVal___, int *guild_id, struct guild_storage *p);
+ int (*postHookFunc) (int retVal___, int *guild_id, const struct guild_storage *p);
for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &guild_id, p);
@@ -10177,6 +10177,33 @@ char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *
}
return retVal___;
}
+char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_astrndup_pre ) {
+ char* (*preHookFunc) (const char *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_astrndup_post ) {
+ char* (*postHookFunc) (char* retVal___, const char *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
int hIndex = 0;
if( HPMHooks.count.HP_iMalloc_free_pre ) {
@@ -10518,11 +10545,11 @@ void HP_mapif_char_ban(int char_id, time_t timestamp) {
}
return;
}
-int HP_mapif_sendall(unsigned char *buf, unsigned int len) {
+int HP_mapif_sendall(const unsigned char *buf, unsigned int len) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_sendall_pre ) {
- int (*preHookFunc) (unsigned char *buf, unsigned int *len);
+ int (*preHookFunc) (const unsigned char *buf, unsigned int *len);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_sendall_pre[hIndex].func;
@@ -10537,7 +10564,7 @@ int HP_mapif_sendall(unsigned char *buf, unsigned int len) {
retVal___ = HPMHooks.source.mapif.sendall(buf, len);
}
if( HPMHooks.count.HP_mapif_sendall_post ) {
- int (*postHookFunc) (int retVal___, unsigned char *buf, unsigned int *len);
+ int (*postHookFunc) (int retVal___, const unsigned char *buf, unsigned int *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_sendall_post[hIndex].func;
retVal___ = postHookFunc(retVal___, buf, &len);
@@ -10911,12 +10938,39 @@ void HP_mapif_parse_auction_bid(int fd) {
}
return;
}
-bool HP_mapif_elemental_save(struct s_elemental *ele) {
+bool HP_mapif_elemental_create(struct s_elemental *ele) {
int hIndex = 0;
bool retVal___ = false;
- if( HPMHooks.count.HP_mapif_elemental_save_pre ) {
+ if( HPMHooks.count.HP_mapif_elemental_create_pre ) {
bool (*preHookFunc) (struct s_elemental *ele);
*HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapif_elemental_create_pre[hIndex].func;
+ retVal___ = preHookFunc(ele);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapif.elemental_create(ele);
+ }
+ if( HPMHooks.count.HP_mapif_elemental_create_post ) {
+ bool (*postHookFunc) (bool retVal___, struct s_elemental *ele);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapif_elemental_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ele);
+ }
+ }
+ return retVal___;
+}
+bool HP_mapif_elemental_save(const struct s_elemental *ele) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_mapif_elemental_save_pre ) {
+ bool (*preHookFunc) (const struct s_elemental *ele);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_elemental_save_pre[hIndex].func;
retVal___ = preHookFunc(ele);
@@ -10930,7 +10984,7 @@ bool HP_mapif_elemental_save(struct s_elemental *ele) {
retVal___ = HPMHooks.source.mapif.elemental_save(ele);
}
if( HPMHooks.count.HP_mapif_elemental_save_post ) {
- bool (*postHookFunc) (bool retVal___, struct s_elemental *ele);
+ bool (*postHookFunc) (bool retVal___, const struct s_elemental *ele);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_elemental_save_post[hIndex].func;
retVal___ = postHookFunc(retVal___, ele);
@@ -11018,10 +11072,10 @@ void HP_mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag
}
return;
}
-void HP_mapif_parse_elemental_create(int fd, struct s_elemental *ele) {
+void HP_mapif_parse_elemental_create(int fd, const struct s_elemental *ele) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_parse_elemental_create_pre ) {
- void (*preHookFunc) (int *fd, struct s_elemental *ele);
+ void (*preHookFunc) (int *fd, const struct s_elemental *ele);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_pre[hIndex].func;
@@ -11036,7 +11090,7 @@ void HP_mapif_parse_elemental_create(int fd, struct s_elemental *ele) {
HPMHooks.source.mapif.parse_elemental_create(fd, ele);
}
if( HPMHooks.count.HP_mapif_parse_elemental_create_post ) {
- void (*postHookFunc) (int *fd, struct s_elemental *ele);
+ void (*postHookFunc) (int *fd, const struct s_elemental *ele);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_post[hIndex].func;
postHookFunc(&fd, ele);
@@ -11148,10 +11202,10 @@ void HP_mapif_elemental_saved(int fd, unsigned char flag) {
}
return;
}
-void HP_mapif_parse_elemental_save(int fd, struct s_elemental *ele) {
+void HP_mapif_parse_elemental_save(int fd, const struct s_elemental *ele) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_parse_elemental_save_pre ) {
- void (*preHookFunc) (int *fd, struct s_elemental *ele);
+ void (*preHookFunc) (int *fd, const struct s_elemental *ele);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_pre[hIndex].func;
@@ -11166,7 +11220,7 @@ void HP_mapif_parse_elemental_save(int fd, struct s_elemental *ele) {
HPMHooks.source.mapif.parse_elemental_save(fd, ele);
}
if( HPMHooks.count.HP_mapif_parse_elemental_save_post ) {
- void (*postHookFunc) (int *fd, struct s_elemental *ele);
+ void (*postHookFunc) (int *fd, const struct s_elemental *ele);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_post[hIndex].func;
postHookFunc(&fd, ele);
@@ -11363,11 +11417,11 @@ int HP_mapif_guild_broken(int guild_id, int flag) {
}
return retVal___;
}
-int HP_mapif_guild_message(int guild_id, int account_id, char *mes, int len, int sfd) {
+int HP_mapif_guild_message(int guild_id, int account_id, const char *mes, int len, int sfd) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_guild_message_pre ) {
- int (*preHookFunc) (int *guild_id, int *account_id, char *mes, int *len, int *sfd);
+ int (*preHookFunc) (int *guild_id, int *account_id, const char *mes, int *len, int *sfd);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_guild_message_pre[hIndex].func;
@@ -11382,7 +11436,7 @@ int HP_mapif_guild_message(int guild_id, int account_id, char *mes, int len, int
retVal___ = HPMHooks.source.mapif.guild_message(guild_id, account_id, mes, len, sfd);
}
if( HPMHooks.count.HP_mapif_guild_message_post ) {
- int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, char *mes, int *len, int *sfd);
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, const char *mes, int *len, int *sfd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_guild_message_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &guild_id, &account_id, mes, &len, &sfd);
@@ -11606,11 +11660,11 @@ int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) {
}
return retVal___;
}
-int HP_mapif_guild_castle_dataload(int fd, int sz, int *castle_ids) {
+int HP_mapif_guild_castle_dataload(int fd, int sz, const int *castle_ids) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_guild_castle_dataload_pre ) {
- int (*preHookFunc) (int *fd, int *sz, int *castle_ids);
+ int (*preHookFunc) (int *fd, int *sz, const int *castle_ids);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_pre[hIndex].func;
@@ -11625,7 +11679,7 @@ int HP_mapif_guild_castle_dataload(int fd, int sz, int *castle_ids) {
retVal___ = HPMHooks.source.mapif.guild_castle_dataload(fd, sz, castle_ids);
}
if( HPMHooks.count.HP_mapif_guild_castle_dataload_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *sz, int *castle_ids);
+ int (*postHookFunc) (int retVal___, int *fd, int *sz, const int *castle_ids);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &sz, castle_ids);
@@ -11633,11 +11687,11 @@ int HP_mapif_guild_castle_dataload(int fd, int sz, int *castle_ids) {
}
return retVal___;
}
-int HP_mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_member *master) {
+int HP_mapif_parse_CreateGuild(int fd, int account_id, const char *name, const struct guild_member *master) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_parse_CreateGuild_pre ) {
- int (*preHookFunc) (int *fd, int *account_id, char *name, struct guild_member *master);
+ int (*preHookFunc) (int *fd, int *account_id, const char *name, const struct guild_member *master);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_pre[hIndex].func;
@@ -11652,7 +11706,7 @@ int HP_mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_
retVal___ = HPMHooks.source.mapif.parse_CreateGuild(fd, account_id, name, master);
}
if( HPMHooks.count.HP_mapif_parse_CreateGuild_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *account_id, char *name, struct guild_member *master);
+ int (*postHookFunc) (int retVal___, int *fd, int *account_id, const char *name, const struct guild_member *master);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &account_id, name, master);
@@ -11687,11 +11741,11 @@ int HP_mapif_parse_GuildInfo(int fd, int guild_id) {
}
return retVal___;
}
-int HP_mapif_parse_GuildAddMember(int fd, int guild_id, struct guild_member *m) {
+int HP_mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_member *m) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_parse_GuildAddMember_pre ) {
- int (*preHookFunc) (int *fd, int *guild_id, struct guild_member *m);
+ int (*preHookFunc) (int *fd, int *guild_id, const struct guild_member *m);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_pre[hIndex].func;
@@ -11706,7 +11760,7 @@ int HP_mapif_parse_GuildAddMember(int fd, int guild_id, struct guild_member *m)
retVal___ = HPMHooks.source.mapif.parse_GuildAddMember(fd, guild_id, m);
}
if( HPMHooks.count.HP_mapif_parse_GuildAddMember_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *guild_id, struct guild_member *m);
+ int (*postHookFunc) (int retVal___, int *fd, int *guild_id, const struct guild_member *m);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &guild_id, m);
@@ -11795,11 +11849,11 @@ int HP_mapif_parse_BreakGuild(int fd, int guild_id) {
}
return retVal___;
}
-int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, char *mes, int len) {
+int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_parse_GuildMessage_pre ) {
- int (*preHookFunc) (int *fd, int *guild_id, int *account_id, char *mes, int *len);
+ int (*preHookFunc) (int *fd, int *guild_id, int *account_id, const char *mes, int *len);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_pre[hIndex].func;
@@ -11814,7 +11868,7 @@ int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, char *mes,
retVal___ = HPMHooks.source.mapif.parse_GuildMessage(fd, guild_id, account_id, mes, len);
}
if( HPMHooks.count.HP_mapif_parse_GuildMessage_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, char *mes, int *len);
+ int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, const char *mes, int *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, mes, &len);
@@ -11876,11 +11930,11 @@ int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, i
}
return retVal___;
}
-int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_position *p) {
+int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, const struct guild_position *p) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_parse_GuildPosition_pre ) {
- int (*preHookFunc) (int *fd, int *guild_id, int *idx, struct guild_position *p);
+ int (*preHookFunc) (int *fd, int *guild_id, int *idx, const struct guild_position *p);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_pre[hIndex].func;
@@ -11895,7 +11949,7 @@ int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_pos
retVal___ = HPMHooks.source.mapif.parse_GuildPosition(fd, guild_id, idx, p);
}
if( HPMHooks.count.HP_mapif_parse_GuildPosition_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *idx, struct guild_position *p);
+ int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *idx, const struct guild_position *p);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &guild_id, &idx, p);
@@ -12038,11 +12092,11 @@ int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const c
}
return retVal___;
}
-int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, int *castle_ids) {
+int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, const int *castle_ids) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre ) {
- int (*preHookFunc) (int *fd, int *len, int *castle_ids);
+ int (*preHookFunc) (int *fd, int *len, const int *castle_ids);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_pre[hIndex].func;
@@ -12057,7 +12111,7 @@ int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, int *castle_ids) {
retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataLoad(fd, len, castle_ids);
}
if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *len, int *castle_ids);
+ int (*postHookFunc) (int retVal___, int *fd, int *len, const int *castle_ids);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &len, castle_ids);
@@ -12119,10 +12173,10 @@ int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int
}
return retVal___;
}
-void HP_mapif_homunculus_created(int fd, int account_id, struct s_homunculus *sh, unsigned char flag) {
+void HP_mapif_homunculus_created(int fd, int account_id, const struct s_homunculus *sh, unsigned char flag) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_homunculus_created_pre ) {
- void (*preHookFunc) (int *fd, int *account_id, struct s_homunculus *sh, unsigned char *flag);
+ void (*preHookFunc) (int *fd, int *account_id, const struct s_homunculus *sh, unsigned char *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_homunculus_created_pre[hIndex].func;
@@ -12137,7 +12191,7 @@ void HP_mapif_homunculus_created(int fd, int account_id, struct s_homunculus *sh
HPMHooks.source.mapif.homunculus_created(fd, account_id, sh, flag);
}
if( HPMHooks.count.HP_mapif_homunculus_created_post ) {
- void (*postHookFunc) (int *fd, int *account_id, struct s_homunculus *sh, unsigned char *flag);
+ void (*postHookFunc) (int *fd, int *account_id, const struct s_homunculus *sh, unsigned char *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_homunculus_created_post[hIndex].func;
postHookFunc(&fd, &account_id, sh, &flag);
@@ -12223,10 +12277,10 @@ void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) {
}
return;
}
-void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned char flag, char *name) {
+void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned char flag, const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_homunculus_renamed_pre ) {
- void (*preHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, char *name);
+ void (*preHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_pre[hIndex].func;
@@ -12241,7 +12295,7 @@ void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned c
HPMHooks.source.mapif.homunculus_renamed(fd, account_id, char_id, flag, name);
}
if( HPMHooks.count.HP_mapif_homunculus_renamed_post ) {
- void (*postHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, char *name);
+ void (*postHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_post[hIndex].func;
postHookFunc(&fd, &account_id, &char_id, &flag, name);
@@ -12249,12 +12303,39 @@ void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned c
}
return;
}
-bool HP_mapif_homunculus_save(struct s_homunculus *hd) {
+bool HP_mapif_homunculus_create(struct s_homunculus *hd) {
int hIndex = 0;
bool retVal___ = false;
- if( HPMHooks.count.HP_mapif_homunculus_save_pre ) {
+ if( HPMHooks.count.HP_mapif_homunculus_create_pre ) {
bool (*preHookFunc) (struct s_homunculus *hd);
*HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapif_homunculus_create_pre[hIndex].func;
+ retVal___ = preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapif.homunculus_create(hd);
+ }
+ if( HPMHooks.count.HP_mapif_homunculus_create_post ) {
+ bool (*postHookFunc) (bool retVal___, struct s_homunculus *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapif_homunculus_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd);
+ }
+ }
+ return retVal___;
+}
+bool HP_mapif_homunculus_save(const struct s_homunculus *hd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_mapif_homunculus_save_pre ) {
+ bool (*preHookFunc) (const struct s_homunculus *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_homunculus_save_pre[hIndex].func;
retVal___ = preHookFunc(hd);
@@ -12268,7 +12349,7 @@ bool HP_mapif_homunculus_save(struct s_homunculus *hd) {
retVal___ = HPMHooks.source.mapif.homunculus_save(hd);
}
if( HPMHooks.count.HP_mapif_homunculus_save_post ) {
- bool (*postHookFunc) (bool retVal___, struct s_homunculus *hd);
+ bool (*postHookFunc) (bool retVal___, const struct s_homunculus *hd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_homunculus_save_post[hIndex].func;
retVal___ = postHookFunc(retVal___, hd);
@@ -12330,11 +12411,11 @@ bool HP_mapif_homunculus_delete(int homun_id) {
}
return retVal___;
}
-bool HP_mapif_homunculus_rename(char *name) {
+bool HP_mapif_homunculus_rename(const char *name) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_mapif_homunculus_rename_pre ) {
- bool (*preHookFunc) (char *name);
+ bool (*preHookFunc) (const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_pre[hIndex].func;
@@ -12349,7 +12430,7 @@ bool HP_mapif_homunculus_rename(char *name) {
retVal___ = HPMHooks.source.mapif.homunculus_rename(name);
}
if( HPMHooks.count.HP_mapif_homunculus_rename_post ) {
- bool (*postHookFunc) (bool retVal___, char *name);
+ bool (*postHookFunc) (bool retVal___, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_post[hIndex].func;
retVal___ = postHookFunc(retVal___, name);
@@ -12357,10 +12438,10 @@ bool HP_mapif_homunculus_rename(char *name) {
}
return retVal___;
}
-void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, struct s_homunculus *phd) {
+void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, const struct s_homunculus *phd) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_parse_homunculus_create_pre ) {
- void (*preHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd);
+ void (*preHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus *phd);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_pre[hIndex].func;
@@ -12375,7 +12456,7 @@ void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, struct s_
HPMHooks.source.mapif.parse_homunculus_create(fd, len, account_id, phd);
}
if( HPMHooks.count.HP_mapif_parse_homunculus_create_post ) {
- void (*postHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd);
+ void (*postHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus *phd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_post[hIndex].func;
postHookFunc(&fd, &len, &account_id, phd);
@@ -12435,10 +12516,10 @@ void HP_mapif_parse_homunculus_load(int fd, int account_id, int homun_id) {
}
return;
}
-void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, struct s_homunculus *phd) {
+void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, const struct s_homunculus *phd) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_parse_homunculus_save_pre ) {
- void (*preHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd);
+ void (*preHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus *phd);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_pre[hIndex].func;
@@ -12453,7 +12534,7 @@ void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, struct s_ho
HPMHooks.source.mapif.parse_homunculus_save(fd, len, account_id, phd);
}
if( HPMHooks.count.HP_mapif_parse_homunculus_save_post ) {
- void (*postHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd);
+ void (*postHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus *phd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_post[hIndex].func;
postHookFunc(&fd, &len, &account_id, phd);
@@ -12461,10 +12542,10 @@ void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, struct s_ho
}
return;
}
-void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, char *name) {
+void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_parse_homunculus_rename_pre ) {
- void (*preHookFunc) (int *fd, int *account_id, int *char_id, char *name);
+ void (*preHookFunc) (int *fd, int *account_id, int *char_id, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_pre[hIndex].func;
@@ -12479,7 +12560,7 @@ void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, char
HPMHooks.source.mapif.parse_homunculus_rename(fd, account_id, char_id, name);
}
if( HPMHooks.count.HP_mapif_parse_homunculus_rename_post ) {
- void (*postHookFunc) (int *fd, int *account_id, int *char_id, char *name);
+ void (*postHookFunc) (int *fd, int *account_id, int *char_id, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_post[hIndex].func;
postHookFunc(&fd, &account_id, &char_id, name);
@@ -12825,12 +12906,39 @@ void HP_mapif_parse_mail_send(int fd) {
}
return;
}
-bool HP_mapif_mercenary_save(struct s_mercenary *merc) {
+bool HP_mapif_mercenary_create(struct s_mercenary *merc) {
int hIndex = 0;
bool retVal___ = false;
- if( HPMHooks.count.HP_mapif_mercenary_save_pre ) {
+ if( HPMHooks.count.HP_mapif_mercenary_create_pre ) {
bool (*preHookFunc) (struct s_mercenary *merc);
*HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapif_mercenary_create_pre[hIndex].func;
+ retVal___ = preHookFunc(merc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapif.mercenary_create(merc);
+ }
+ if( HPMHooks.count.HP_mapif_mercenary_create_post ) {
+ bool (*postHookFunc) (bool retVal___, struct s_mercenary *merc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapif_mercenary_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, merc);
+ }
+ }
+ return retVal___;
+}
+bool HP_mapif_mercenary_save(const struct s_mercenary *merc) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_mapif_mercenary_save_pre ) {
+ bool (*preHookFunc) (const struct s_mercenary *merc);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_mercenary_save_pre[hIndex].func;
retVal___ = preHookFunc(merc);
@@ -12844,7 +12952,7 @@ bool HP_mapif_mercenary_save(struct s_mercenary *merc) {
retVal___ = HPMHooks.source.mapif.mercenary_save(merc);
}
if( HPMHooks.count.HP_mapif_mercenary_save_post ) {
- bool (*postHookFunc) (bool retVal___, struct s_mercenary *merc);
+ bool (*postHookFunc) (bool retVal___, const struct s_mercenary *merc);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_mercenary_save_post[hIndex].func;
retVal___ = postHookFunc(retVal___, merc);
@@ -12932,10 +13040,10 @@ void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char fla
}
return;
}
-void HP_mapif_parse_mercenary_create(int fd, struct s_mercenary *merc) {
+void HP_mapif_parse_mercenary_create(int fd, const struct s_mercenary *merc) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_parse_mercenary_create_pre ) {
- void (*preHookFunc) (int *fd, struct s_mercenary *merc);
+ void (*preHookFunc) (int *fd, const struct s_mercenary *merc);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_pre[hIndex].func;
@@ -12950,7 +13058,7 @@ void HP_mapif_parse_mercenary_create(int fd, struct s_mercenary *merc) {
HPMHooks.source.mapif.parse_mercenary_create(fd, merc);
}
if( HPMHooks.count.HP_mapif_parse_mercenary_create_post ) {
- void (*postHookFunc) (int *fd, struct s_mercenary *merc);
+ void (*postHookFunc) (int *fd, const struct s_mercenary *merc);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_post[hIndex].func;
postHookFunc(&fd, merc);
@@ -13062,10 +13170,10 @@ void HP_mapif_mercenary_saved(int fd, unsigned char flag) {
}
return;
}
-void HP_mapif_parse_mercenary_save(int fd, struct s_mercenary *merc) {
+void HP_mapif_parse_mercenary_save(int fd, const struct s_mercenary *merc) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_parse_mercenary_save_pre ) {
- void (*preHookFunc) (int *fd, struct s_mercenary *merc);
+ void (*preHookFunc) (int *fd, const struct s_mercenary *merc);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_pre[hIndex].func;
@@ -13080,7 +13188,7 @@ void HP_mapif_parse_mercenary_save(int fd, struct s_mercenary *merc) {
HPMHooks.source.mapif.parse_mercenary_save(fd, merc);
}
if( HPMHooks.count.HP_mapif_parse_mercenary_save_post ) {
- void (*postHookFunc) (int *fd, struct s_mercenary *merc);
+ void (*postHookFunc) (int *fd, const struct s_mercenary *merc);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_post[hIndex].func;
postHookFunc(&fd, merc);
@@ -13302,11 +13410,11 @@ int HP_mapif_party_broken(int party_id, int flag) {
}
return retVal___;
}
-int HP_mapif_party_message(int party_id, int account_id, char *mes, int len, int sfd) {
+int HP_mapif_party_message(int party_id, int account_id, const char *mes, int len, int sfd) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_party_message_pre ) {
- int (*preHookFunc) (int *party_id, int *account_id, char *mes, int *len, int *sfd);
+ int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len, int *sfd);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_party_message_pre[hIndex].func;
@@ -13321,7 +13429,7 @@ int HP_mapif_party_message(int party_id, int account_id, char *mes, int len, int
retVal___ = HPMHooks.source.mapif.party_message(party_id, account_id, mes, len, sfd);
}
if( HPMHooks.count.HP_mapif_party_message_post ) {
- int (*postHookFunc) (int retVal___, int *party_id, int *account_id, char *mes, int *len, int *sfd);
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, const char *mes, int *len, int *sfd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_party_message_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len, &sfd);
@@ -13329,11 +13437,11 @@ int HP_mapif_party_message(int party_id, int account_id, char *mes, int len, int
}
return retVal___;
}
-int HP_mapif_parse_CreateParty(int fd, char *name, int item, int item2, struct party_member *leader) {
+int HP_mapif_parse_CreateParty(int fd, const char *name, int item, int item2, const struct party_member *leader) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_parse_CreateParty_pre ) {
- int (*preHookFunc) (int *fd, char *name, int *item, int *item2, struct party_member *leader);
+ int (*preHookFunc) (int *fd, const char *name, int *item, int *item2, const struct party_member *leader);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_pre[hIndex].func;
@@ -13348,7 +13456,7 @@ int HP_mapif_parse_CreateParty(int fd, char *name, int item, int item2, struct p
retVal___ = HPMHooks.source.mapif.parse_CreateParty(fd, name, item, item2, leader);
}
if( HPMHooks.count.HP_mapif_parse_CreateParty_post ) {
- int (*postHookFunc) (int retVal___, int *fd, char *name, int *item, int *item2, struct party_member *leader);
+ int (*postHookFunc) (int retVal___, int *fd, const char *name, int *item, int *item2, const struct party_member *leader);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, name, &item, &item2, leader);
@@ -13382,11 +13490,11 @@ void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) {
}
return;
}
-int HP_mapif_parse_PartyAddMember(int fd, int party_id, struct party_member *member) {
+int HP_mapif_parse_PartyAddMember(int fd, int party_id, const struct party_member *member) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_parse_PartyAddMember_pre ) {
- int (*preHookFunc) (int *fd, int *party_id, struct party_member *member);
+ int (*preHookFunc) (int *fd, int *party_id, const struct party_member *member);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_pre[hIndex].func;
@@ -13401,7 +13509,7 @@ int HP_mapif_parse_PartyAddMember(int fd, int party_id, struct party_member *mem
retVal___ = HPMHooks.source.mapif.parse_PartyAddMember(fd, party_id, member);
}
if( HPMHooks.count.HP_mapif_parse_PartyAddMember_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *party_id, struct party_member *member);
+ int (*postHookFunc) (int retVal___, int *fd, int *party_id, const struct party_member *member);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &party_id, member);
@@ -13517,11 +13625,11 @@ int HP_mapif_parse_BreakParty(int fd, int party_id) {
}
return retVal___;
}
-int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, char *mes, int len) {
+int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char *mes, int len) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_parse_PartyMessage_pre ) {
- int (*preHookFunc) (int *fd, int *party_id, int *account_id, char *mes, int *len);
+ int (*preHookFunc) (int *fd, int *party_id, int *account_id, const char *mes, int *len);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_pre[hIndex].func;
@@ -13536,7 +13644,7 @@ int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, char *mes,
retVal___ = HPMHooks.source.mapif.parse_PartyMessage(fd, party_id, account_id, mes, len);
}
if( HPMHooks.count.HP_mapif_parse_PartyMessage_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, char *mes, int *len);
+ int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, const char *mes, int *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, mes, &len);
@@ -13706,11 +13814,11 @@ int HP_mapif_delete_pet_ack(int fd, int flag) {
}
return retVal___;
}
-int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) {
+int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_create_pet_pre ) {
- int (*preHookFunc) (int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char *pet_name);
+ int (*preHookFunc) (int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char *pet_name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_create_pet_pre[hIndex].func;
@@ -13725,7 +13833,7 @@ int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, sh
retVal___ = HPMHooks.source.mapif.create_pet(fd, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
}
if( HPMHooks.count.HP_mapif_create_pet_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char *pet_name);
+ int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char *pet_name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_create_pet_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name);
@@ -13760,11 +13868,11 @@ int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) {
}
return retVal___;
}
-int HP_mapif_save_pet(int fd, int account_id, struct s_pet *data) {
+int HP_mapif_save_pet(int fd, int account_id, const struct s_pet *data) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_save_pet_pre ) {
- int (*preHookFunc) (int *fd, int *account_id, struct s_pet *data);
+ int (*preHookFunc) (int *fd, int *account_id, const struct s_pet *data);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_save_pet_pre[hIndex].func;
@@ -13779,7 +13887,7 @@ int HP_mapif_save_pet(int fd, int account_id, struct s_pet *data) {
retVal___ = HPMHooks.source.mapif.save_pet(fd, account_id, data);
}
if( HPMHooks.count.HP_mapif_save_pet_post ) {
- int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *data);
+ int (*postHookFunc) (int retVal___, int *fd, int *account_id, const struct s_pet *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_save_pet_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, &account_id, data);
@@ -14376,11 +14484,11 @@ void HP_mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int
}
return;
}
-int HP_mapif_broadcast(unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd) {
+int HP_mapif_broadcast(const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mapif_broadcast_pre ) {
- int (*preHookFunc) (unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd);
+ int (*preHookFunc) (const unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_broadcast_pre[hIndex].func;
@@ -14395,7 +14503,7 @@ int HP_mapif_broadcast(unsigned char *mes, int len, unsigned int fontColor, shor
retVal___ = HPMHooks.source.mapif.broadcast(mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd);
}
if( HPMHooks.count.HP_mapif_broadcast_post ) {
- int (*postHookFunc) (int retVal___, unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd);
+ int (*postHookFunc) (int retVal___, const unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_broadcast_post[hIndex].func;
retVal___ = postHookFunc(retVal___, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd);
@@ -14430,10 +14538,10 @@ int HP_mapif_wis_message(struct WisData *wd) {
}
return retVal___;
}
-void HP_mapif_wis_response(int fd, unsigned char *src, int flag) {
+void HP_mapif_wis_response(int fd, const unsigned char *src, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_mapif_wis_response_pre ) {
- void (*preHookFunc) (int *fd, unsigned char *src, int *flag);
+ void (*preHookFunc) (int *fd, const unsigned char *src, int *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapif_wis_response_pre[hIndex].func;
@@ -14448,7 +14556,7 @@ void HP_mapif_wis_response(int fd, unsigned char *src, int flag) {
HPMHooks.source.mapif.wis_response(fd, src, flag);
}
if( HPMHooks.count.HP_mapif_wis_response_post ) {
- void (*postHookFunc) (int *fd, unsigned char *src, int *flag);
+ void (*postHookFunc) (int *fd, const unsigned char *src, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapif_wis_response_post[hIndex].func;
postHookFunc(&fd, src, &flag);
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index c8d9d7e0d..67257883f 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -352,6 +352,8 @@ struct {
struct HPMHookPoint *HP_iMalloc_reallocz_post;
struct HPMHookPoint *HP_iMalloc_astrdup_pre;
struct HPMHookPoint *HP_iMalloc_astrdup_post;
+ struct HPMHookPoint *HP_iMalloc_astrndup_pre;
+ struct HPMHookPoint *HP_iMalloc_astrndup_post;
struct HPMHookPoint *HP_iMalloc_free_pre;
struct HPMHookPoint *HP_iMalloc_free_post;
struct HPMHookPoint *HP_iMalloc_memory_check_pre;
@@ -951,6 +953,8 @@ struct {
int HP_iMalloc_reallocz_post;
int HP_iMalloc_astrdup_pre;
int HP_iMalloc_astrdup_post;
+ int HP_iMalloc_astrndup_pre;
+ int HP_iMalloc_astrndup_post;
int HP_iMalloc_free_pre;
int HP_iMalloc_free_post;
int HP_iMalloc_memory_check_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index 7a02e799c..0460f4ca4 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -195,6 +195,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
{ HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
{ HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
+ { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) },
{ HP_POP(iMalloc->free, HP_iMalloc_free) },
{ HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
{ HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 5bbc8fefb..c647ca3e1 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -4425,6 +4425,33 @@ char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *
}
return retVal___;
}
+char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_astrndup_pre ) {
+ char* (*preHookFunc) (const char *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_astrndup_post ) {
+ char* (*postHookFunc) (char* retVal___, const char *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
int hIndex = 0;
if( HPMHooks.count.HP_iMalloc_free_pre ) {
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index c6e55bfe3..e5457e47c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2954,6 +2954,8 @@ struct {
struct HPMHookPoint *HP_iMalloc_reallocz_post;
struct HPMHookPoint *HP_iMalloc_astrdup_pre;
struct HPMHookPoint *HP_iMalloc_astrdup_post;
+ struct HPMHookPoint *HP_iMalloc_astrndup_pre;
+ struct HPMHookPoint *HP_iMalloc_astrndup_post;
struct HPMHookPoint *HP_iMalloc_free_pre;
struct HPMHookPoint *HP_iMalloc_free_post;
struct HPMHookPoint *HP_iMalloc_memory_check_pre;
@@ -8829,6 +8831,8 @@ struct {
int HP_iMalloc_reallocz_post;
int HP_iMalloc_astrdup_pre;
int HP_iMalloc_astrdup_post;
+ int HP_iMalloc_astrndup_pre;
+ int HP_iMalloc_astrndup_post;
int HP_iMalloc_free_pre;
int HP_iMalloc_free_post;
int HP_iMalloc_memory_check_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index c2d104cda..365bda5da 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1514,6 +1514,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
{ HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
{ HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
+ { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) },
{ HP_POP(iMalloc->free, HP_iMalloc_free) },
{ HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
{ HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index fe47e76f0..c181327e2 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -12820,11 +12820,11 @@ void HP_clif_messageln(const int fd, const char *mes) {
}
return;
}
-bool HP_clif_process_message(struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) {
+bool HP_clif_process_message(struct map_session_data *sd, int format, const char **name_, size_t *namelen_, const 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_, size_t *namelen_, char **message_, size_t *messagelen_);
+ bool (*preHookFunc) (struct map_session_data *sd, int *format, const char **name_, size_t *namelen_, const char **message_, size_t *messagelen_);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_process_message_pre[hIndex].func;
@@ -12839,7 +12839,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_, size_t *namelen_, char **message_, size_t *messagelen_);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *format, const char **name_, size_t *namelen_, const 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_);
@@ -16132,10 +16132,10 @@ void HP_clif_auction_openwindow(struct map_session_data *sd) {
}
return;
}
-void HP_clif_auction_results(struct map_session_data *sd, short count, short pages, uint8 *buf) {
+void HP_clif_auction_results(struct map_session_data *sd, short count, short pages, const uint8 *buf) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_auction_results_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, short *count, short *pages, uint8 *buf);
+ void (*preHookFunc) (struct map_session_data *sd, short *count, short *pages, const uint8 *buf);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_auction_results_pre[hIndex].func;
@@ -16150,7 +16150,7 @@ void HP_clif_auction_results(struct map_session_data *sd, short count, short pag
HPMHooks.source.clif.auction_results(sd, count, pages, buf);
}
if( HPMHooks.count.HP_clif_auction_results_post ) {
- void (*postHookFunc) (struct map_session_data *sd, short *count, short *pages, uint8 *buf);
+ void (*postHookFunc) (struct map_session_data *sd, short *count, short *pages, const uint8 *buf);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_auction_results_post[hIndex].func;
postHookFunc(sd, &count, &pages, buf);
@@ -17328,10 +17328,10 @@ void HP_clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_A
}
return;
}
-void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, char *name) {
+void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bgqueue_notice_delete_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, char *name);
+ void (*preHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bgqueue_notice_delete_pre[hIndex].func;
@@ -17346,7 +17346,7 @@ void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUN
HPMHooks.source.clif.bgqueue_notice_delete(sd, response, name);
}
if( HPMHooks.count.HP_clif_bgqueue_notice_delete_post ) {
- void (*postHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, char *name);
+ void (*postHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_bgqueue_notice_delete_post[hIndex].func;
postHookFunc(sd, &response, name);
@@ -17903,14 +17903,14 @@ void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
}
return;
}
-void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_npc_market_purchase *req, unsigned char response) {
+void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_npc_market_purchase_ack_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, struct packet_npc_market_purchase *req, unsigned char *response);
+ void (*preHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char *response);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_pre[hIndex].func;
- preHookFunc(sd, req, &response);
+ preHookFunc(sd, item_list, &response);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -17918,13 +17918,13 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_
}
}
{
- HPMHooks.source.clif.npc_market_purchase_ack(sd, req, response);
+ HPMHooks.source.clif.npc_market_purchase_ack(sd, item_list, response);
}
if( HPMHooks.count.HP_clif_npc_market_purchase_ack_post ) {
- void (*postHookFunc) (struct map_session_data *sd, struct packet_npc_market_purchase *req, unsigned char *response);
+ void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char *response);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_post[hIndex].func;
- postHookFunc(sd, req, &response);
+ postHookFunc(sd, item_list, &response);
}
}
return;
@@ -25330,11 +25330,11 @@ int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int li
}
return retVal___;
}
-int HP_elemental_data_received(struct s_elemental *ele, bool flag) {
+int HP_elemental_data_received(const struct s_elemental *ele, bool flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_data_received_pre ) {
- int (*preHookFunc) (struct s_elemental *ele, bool *flag);
+ int (*preHookFunc) (const struct s_elemental *ele, bool *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_data_received_pre[hIndex].func;
@@ -25349,7 +25349,7 @@ int HP_elemental_data_received(struct s_elemental *ele, bool flag) {
retVal___ = HPMHooks.source.elemental.data_received(ele, flag);
}
if( HPMHooks.count.HP_elemental_data_received_post ) {
- int (*postHookFunc) (int retVal___, struct s_elemental *ele, bool *flag);
+ int (*postHookFunc) (int retVal___, const struct s_elemental *ele, bool *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_elemental_data_received_post[hIndex].func;
retVal___ = postHookFunc(retVal___, ele, &flag);
@@ -26417,11 +26417,11 @@ struct map_session_data* HP_guild_getavailablesd(struct guild *g) {
}
return retVal___;
}
-int HP_guild_getindex(struct guild *g, int account_id, int char_id) {
+int HP_guild_getindex(const struct guild *g, int account_id, int char_id) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_guild_getindex_pre ) {
- int (*preHookFunc) (struct guild *g, int *account_id, int *char_id);
+ int (*preHookFunc) (const struct guild *g, int *account_id, int *char_id);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_getindex_pre[hIndex].func;
@@ -26436,7 +26436,7 @@ int HP_guild_getindex(struct guild *g, int account_id, int char_id) {
retVal___ = HPMHooks.source.guild.getindex(g, account_id, char_id);
}
if( HPMHooks.count.HP_guild_getindex_post ) {
- int (*postHookFunc) (int retVal___, struct guild *g, int *account_id, int *char_id);
+ int (*postHookFunc) (int retVal___, const struct guild *g, int *account_id, int *char_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_getindex_post[hIndex].func;
retVal___ = postHookFunc(retVal___, g, &account_id, &char_id);
@@ -26633,11 +26633,11 @@ int HP_guild_recv_noinfo(int guild_id) {
}
return retVal___;
}
-int HP_guild_recv_info(struct guild *sg) {
+int HP_guild_recv_info(const struct guild *sg) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_guild_recv_info_pre ) {
- int (*preHookFunc) (struct guild *sg);
+ int (*preHookFunc) (const struct guild *sg);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_recv_info_pre[hIndex].func;
@@ -26652,7 +26652,7 @@ int HP_guild_recv_info(struct guild *sg) {
retVal___ = HPMHooks.source.guild.recv_info(sg);
}
if( HPMHooks.count.HP_guild_recv_info_post ) {
- int (*postHookFunc) (int retVal___, struct guild *sg);
+ int (*postHookFunc) (int retVal___, const struct guild *sg);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_recv_info_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sg);
@@ -27225,11 +27225,11 @@ int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, cons
}
return retVal___;
}
-int HP_guild_position_changed(int guild_id, int idx, struct guild_position *p) {
+int HP_guild_position_changed(int guild_id, int idx, const struct guild_position *p) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_guild_position_changed_pre ) {
- int (*preHookFunc) (int *guild_id, int *idx, struct guild_position *p);
+ int (*preHookFunc) (int *guild_id, int *idx, const struct guild_position *p);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_position_changed_pre[hIndex].func;
@@ -27244,7 +27244,7 @@ int HP_guild_position_changed(int guild_id, int idx, struct guild_position *p) {
retVal___ = HPMHooks.source.guild.position_changed(guild_id, idx, p);
}
if( HPMHooks.count.HP_guild_position_changed_post ) {
- int (*postHookFunc) (int retVal___, int *guild_id, int *idx, struct guild_position *p);
+ int (*postHookFunc) (int retVal___, int *guild_id, int *idx, const struct guild_position *p);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_position_changed_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &guild_id, &idx, p);
@@ -27468,11 +27468,11 @@ int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) {
}
return retVal___;
}
-int HP_guild_dobreak(struct map_session_data *sd, char *name) {
+int HP_guild_dobreak(struct map_session_data *sd, const char *name) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_guild_dobreak_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, char *name);
+ int (*preHookFunc) (struct map_session_data *sd, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_dobreak_pre[hIndex].func;
@@ -27487,7 +27487,7 @@ int HP_guild_dobreak(struct map_session_data *sd, char *name) {
retVal___ = HPMHooks.source.guild.dobreak(sd, name);
}
if( HPMHooks.count.HP_guild_dobreak_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_dobreak_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name);
@@ -27629,11 +27629,11 @@ int HP_guild_castledatasave(int castle_id, int index, int value) {
}
return retVal___;
}
-int HP_guild_castledataloadack(int len, struct guild_castle *gc) {
+int HP_guild_castledataloadack(int len, const struct guild_castle *gc) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_guild_castledataloadack_pre ) {
- int (*preHookFunc) (int *len, struct guild_castle *gc);
+ int (*preHookFunc) (int *len, const struct guild_castle *gc);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_castledataloadack_pre[hIndex].func;
@@ -27648,7 +27648,7 @@ int HP_guild_castledataloadack(int len, struct guild_castle *gc) {
retVal___ = HPMHooks.source.guild.castledataloadack(len, gc);
}
if( HPMHooks.count.HP_guild_castledataloadack_post ) {
- int (*postHookFunc) (int retVal___, int *len, struct guild_castle *gc);
+ int (*postHookFunc) (int retVal___, int *len, const struct guild_castle *gc);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_castledataloadack_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &len, gc);
@@ -28342,11 +28342,11 @@ void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) {
}
return;
}
-int HP_guild_check_member(struct guild *g) {
+int HP_guild_check_member(const struct guild *g) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_guild_check_member_pre ) {
- int (*preHookFunc) (struct guild *g);
+ int (*preHookFunc) (const struct guild *g);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_check_member_pre[hIndex].func;
@@ -28361,7 +28361,7 @@ int HP_guild_check_member(struct guild *g) {
retVal___ = HPMHooks.source.guild.check_member(g);
}
if( HPMHooks.count.HP_guild_check_member_post ) {
- int (*postHookFunc) (int retVal___, struct guild *g);
+ int (*postHookFunc) (int retVal___, const struct guild *g);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_check_member_post[hIndex].func;
retVal___ = postHookFunc(retVal___, g);
@@ -29587,11 +29587,11 @@ void HP_homun_hunger_timer_delete(struct homun_data *hd) {
}
return;
}
-int HP_homun_change_name(struct map_session_data *sd, char *name) {
+int HP_homun_change_name(struct map_session_data *sd, const char *name) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_homun_change_name_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, char *name);
+ int (*preHookFunc) (struct map_session_data *sd, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_change_name_pre[hIndex].func;
@@ -29606,7 +29606,7 @@ int HP_homun_change_name(struct map_session_data *sd, char *name) {
retVal___ = HPMHooks.source.homun.change_name(sd, name);
}
if( HPMHooks.count.HP_homun_change_name_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_homun_change_name_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name);
@@ -29614,11 +29614,11 @@ int HP_homun_change_name(struct map_session_data *sd, char *name) {
}
return retVal___;
}
-bool HP_homun_change_name_ack(struct map_session_data *sd, char *name, int flag) {
+bool HP_homun_change_name_ack(struct map_session_data *sd, const char *name, int flag) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_homun_change_name_ack_pre ) {
- bool (*preHookFunc) (struct map_session_data *sd, char *name, int *flag);
+ bool (*preHookFunc) (struct map_session_data *sd, const char *name, int *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_change_name_ack_pre[hIndex].func;
@@ -29633,7 +29633,7 @@ bool HP_homun_change_name_ack(struct map_session_data *sd, char *name, int flag)
retVal___ = HPMHooks.source.homun.change_name_ack(sd, name, flag);
}
if( HPMHooks.count.HP_homun_change_name_ack_post ) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, char *name, int *flag);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *name, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_homun_change_name_ack_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name, &flag);
@@ -29668,11 +29668,11 @@ int HP_homun_db_search(int key, int type) {
}
return retVal___;
}
-bool HP_homun_create(struct map_session_data *sd, struct s_homunculus *hom) {
+bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_homun_create_pre ) {
- bool (*preHookFunc) (struct map_session_data *sd, struct s_homunculus *hom);
+ bool (*preHookFunc) (struct map_session_data *sd, const struct s_homunculus *hom);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_create_pre[hIndex].func;
@@ -29687,7 +29687,7 @@ bool HP_homun_create(struct map_session_data *sd, struct s_homunculus *hom) {
retVal___ = HPMHooks.source.homun.create(sd, hom);
}
if( HPMHooks.count.HP_homun_create_post ) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct s_homunculus *hom);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom);
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_homun_create_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, hom);
@@ -29748,11 +29748,11 @@ bool HP_homun_call(struct map_session_data *sd) {
}
return retVal___;
}
-bool HP_homun_recv_data(int account_id, struct s_homunculus *sh, int flag) {
+bool HP_homun_recv_data(int account_id, const struct s_homunculus *sh, int flag) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_homun_recv_data_pre ) {
- bool (*preHookFunc) (int *account_id, struct s_homunculus *sh, int *flag);
+ bool (*preHookFunc) (int *account_id, const struct s_homunculus *sh, int *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_recv_data_pre[hIndex].func;
@@ -29767,7 +29767,7 @@ bool HP_homun_recv_data(int account_id, struct s_homunculus *sh, int flag) {
retVal___ = HPMHooks.source.homun.recv_data(account_id, sh, flag);
}
if( HPMHooks.count.HP_homun_recv_data_post ) {
- bool (*postHookFunc) (bool retVal___, int *account_id, struct s_homunculus *sh, int *flag);
+ bool (*postHookFunc) (bool retVal___, int *account_id, const struct s_homunculus *sh, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_homun_recv_data_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &account_id, sh, &flag);
@@ -30745,11 +30745,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, size_t mes_len) {
+int HP_intif_wis_message(struct map_session_data *sd, const char *nick, const 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, size_t *mes_len);
+ int (*preHookFunc) (struct map_session_data *sd, const char *nick, const char *mes, size_t *mes_len);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_wis_message_pre[hIndex].func;
@@ -30764,7 +30764,7 @@ int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, siz
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, size_t *mes_len);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *nick, const 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);
@@ -30907,11 +30907,11 @@ int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) {
}
return retVal___;
}
-int HP_intif_create_party(struct party_member *member, char *name, int item, int item2) {
+int HP_intif_create_party(struct party_member *member, const char *name, int item, int item2) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_intif_create_party_pre ) {
- int (*preHookFunc) (struct party_member *member, char *name, int *item, int *item2);
+ int (*preHookFunc) (struct party_member *member, const char *name, int *item, int *item2);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_create_party_pre[hIndex].func;
@@ -30926,7 +30926,7 @@ int HP_intif_create_party(struct party_member *member, char *name, int item, int
retVal___ = HPMHooks.source.intif.create_party(member, name, item, item2);
}
if( HPMHooks.count.HP_intif_create_party_post ) {
- int (*postHookFunc) (int retVal___, struct party_member *member, char *name, int *item, int *item2);
+ int (*postHookFunc) (int retVal___, struct party_member *member, const char *name, int *item, int *item2);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_intif_create_party_post[hIndex].func;
retVal___ = postHookFunc(retVal___, member, name, &item, &item2);
@@ -31716,11 +31716,11 @@ int HP_intif_delete_petdata(int pet_id) {
}
return retVal___;
}
-int HP_intif_rename(struct map_session_data *sd, int type, char *name) {
+int HP_intif_rename(struct map_session_data *sd, int type, const char *name) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_intif_rename_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *type, char *name);
+ int (*preHookFunc) (struct map_session_data *sd, int *type, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_rename_pre[hIndex].func;
@@ -31735,7 +31735,7 @@ int HP_intif_rename(struct map_session_data *sd, int type, char *name) {
retVal___ = HPMHooks.source.intif.rename(sd, type, name);
}
if( HPMHooks.count.HP_intif_rename_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, char *name);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_intif_rename_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, &type, name);
@@ -38938,6 +38938,33 @@ char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *
}
return retVal___;
}
+char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_astrndup_pre ) {
+ char* (*preHookFunc) (const char *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_astrndup_post ) {
+ char* (*postHookFunc) (char* retVal___, const char *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
int hIndex = 0;
if( HPMHooks.count.HP_iMalloc_free_pre ) {
@@ -43666,11 +43693,11 @@ int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int li
}
return retVal___;
}
-int HP_mercenary_data_received(struct s_mercenary *merc, bool flag) {
+int HP_mercenary_data_received(const struct s_mercenary *merc, bool flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_data_received_pre ) {
- int (*preHookFunc) (struct s_mercenary *merc, bool *flag);
+ int (*preHookFunc) (const struct s_mercenary *merc, bool *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_data_received_pre[hIndex].func;
@@ -43685,7 +43712,7 @@ int HP_mercenary_data_received(struct s_mercenary *merc, bool flag) {
retVal___ = HPMHooks.source.mercenary.data_received(merc, flag);
}
if( HPMHooks.count.HP_mercenary_data_received_post ) {
- int (*postHookFunc) (int retVal___, struct s_mercenary *merc, bool *flag);
+ int (*postHookFunc) (int retVal___, const struct s_mercenary *merc, bool *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mercenary_data_received_post[hIndex].func;
retVal___ = postHookFunc(retVal___, merc, &flag);
@@ -48489,15 +48516,15 @@ int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) {
}
return retVal___;
}
-int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short *item_list) {
+int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, struct itemlist *item_list) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_cashshop_buylist_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *points, int *count, unsigned short *item_list);
+ int (*preHookFunc) (struct map_session_data *sd, int *points, struct itemlist *item_list);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &points, &count, item_list);
+ retVal___ = preHookFunc(sd, &points, item_list);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -48505,26 +48532,26 @@ int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, int count,
}
}
{
- retVal___ = HPMHooks.source.npc.cashshop_buylist(sd, points, count, item_list);
+ retVal___ = HPMHooks.source.npc.cashshop_buylist(sd, points, item_list);
}
if( HPMHooks.count.HP_npc_cashshop_buylist_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *points, int *count, unsigned short *item_list);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *points, struct itemlist *item_list);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &points, &count, item_list);
+ retVal___ = postHookFunc(retVal___, sd, &points, item_list);
}
}
return retVal___;
}
-int HP_npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) {
+int HP_npc_buylist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_buylist_sub_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_buylist_sub_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &n, item_list, nd);
+ retVal___ = preHookFunc(sd, item_list, nd);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -48532,13 +48559,13 @@ int HP_npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_
}
}
{
- retVal___ = HPMHooks.source.npc.buylist_sub(sd, n, item_list, nd);
+ retVal___ = HPMHooks.source.npc.buylist_sub(sd, item_list, nd);
}
if( HPMHooks.count.HP_npc_buylist_sub_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_buylist_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd);
+ retVal___ = postHookFunc(retVal___, sd, item_list, nd);
}
}
return retVal___;
@@ -48570,15 +48597,15 @@ int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int
}
return retVal___;
}
-int HP_npc_buylist(struct map_session_data *sd, int n, unsigned short *item_list) {
+int HP_npc_buylist(struct map_session_data *sd, struct itemlist *item_list) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_buylist_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_buylist_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &n, item_list);
+ retVal___ = preHookFunc(sd, item_list);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -48586,26 +48613,26 @@ int HP_npc_buylist(struct map_session_data *sd, int n, unsigned short *item_list
}
}
{
- retVal___ = HPMHooks.source.npc.buylist(sd, n, item_list);
+ retVal___ = HPMHooks.source.npc.buylist(sd, item_list);
}
if( HPMHooks.count.HP_npc_buylist_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_buylist_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &n, item_list);
+ retVal___ = postHookFunc(retVal___, sd, item_list);
}
}
return retVal___;
}
-int HP_npc_selllist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) {
+int HP_npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_selllist_sub_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_selllist_sub_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &n, item_list, nd);
+ retVal___ = preHookFunc(sd, item_list, nd);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -48613,26 +48640,26 @@ int HP_npc_selllist_sub(struct map_session_data *sd, int n, unsigned short *item
}
}
{
- retVal___ = HPMHooks.source.npc.selllist_sub(sd, n, item_list, nd);
+ retVal___ = HPMHooks.source.npc.selllist_sub(sd, item_list, nd);
}
if( HPMHooks.count.HP_npc_selllist_sub_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_selllist_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd);
+ retVal___ = postHookFunc(retVal___, sd, item_list, nd);
}
}
return retVal___;
}
-int HP_npc_selllist(struct map_session_data *sd, int n, unsigned short *item_list) {
+int HP_npc_selllist(struct map_session_data *sd, struct itemlist *item_list) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_selllist_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_selllist_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &n, item_list);
+ retVal___ = preHookFunc(sd, item_list);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -48640,13 +48667,13 @@ int HP_npc_selllist(struct map_session_data *sd, int n, unsigned short *item_lis
}
}
{
- retVal___ = HPMHooks.source.npc.selllist(sd, n, item_list);
+ retVal___ = HPMHooks.source.npc.selllist(sd, item_list);
}
if( HPMHooks.count.HP_npc_selllist_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_selllist_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &n, item_list);
+ retVal___ = postHookFunc(retVal___, sd, item_list);
}
}
return retVal___;
@@ -50124,15 +50151,15 @@ void HP_npc_trader_update(int master) {
}
return;
}
-int HP_npc_market_buylist(struct map_session_data *sd, unsigned short list_size, struct packet_npc_market_purchase *p) {
+int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_npc_market_buylist_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, unsigned short *list_size, struct packet_npc_market_purchase *p);
+ int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &list_size, p);
+ retVal___ = preHookFunc(sd, item_list);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -50140,13 +50167,13 @@ int HP_npc_market_buylist(struct map_session_data *sd, unsigned short list_size,
}
}
{
- retVal___ = HPMHooks.source.npc.market_buylist(sd, list_size, p);
+ retVal___ = HPMHooks.source.npc.market_buylist(sd, item_list);
}
if( HPMHooks.count.HP_npc_market_buylist_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *list_size, struct packet_npc_market_purchase *p);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &list_size, p);
+ retVal___ = postHookFunc(retVal___, sd, item_list);
}
}
return retVal___;
@@ -50524,11 +50551,11 @@ struct map_session_data* HP_party_getavailablesd(struct party_data *p) {
}
return retVal___;
}
-int HP_party_create(struct map_session_data *sd, char *name, int item, int item2) {
+int HP_party_create(struct map_session_data *sd, const char *name, int item, int item2) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_party_create_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, char *name, int *item, int *item2);
+ int (*preHookFunc) (struct map_session_data *sd, const char *name, int *item, int *item2);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_create_pre[hIndex].func;
@@ -50543,7 +50570,7 @@ int HP_party_create(struct map_session_data *sd, char *name, int item, int item2
retVal___ = HPMHooks.source.party.create(sd, name, item, item2);
}
if( HPMHooks.count.HP_party_create_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *item, int *item2);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name, int *item, int *item2);
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_party_create_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name, &item, &item2);
@@ -50551,10 +50578,10 @@ int HP_party_create(struct map_session_data *sd, char *name, int item, int item2
}
return retVal___;
}
-void HP_party_created(int account_id, int char_id, int fail, int party_id, char *name) {
+void HP_party_created(int account_id, int char_id, int fail, int party_id, const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_party_created_pre ) {
- void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name);
+ void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_created_pre[hIndex].func;
@@ -50569,7 +50596,7 @@ void HP_party_created(int account_id, int char_id, int fail, int party_id, char
HPMHooks.source.party.created(account_id, char_id, fail, party_id, name);
}
if( HPMHooks.count.HP_party_created_post ) {
- void (*postHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name);
+ void (*postHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_party_created_post[hIndex].func;
postHookFunc(&account_id, &char_id, &fail, &party_id, name);
@@ -50711,11 +50738,11 @@ int HP_party_leave(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_party_removemember(struct map_session_data *sd, int account_id, char *name) {
+int HP_party_removemember(struct map_session_data *sd, int account_id, const char *name) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_party_removemember_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *account_id, char *name);
+ int (*preHookFunc) (struct map_session_data *sd, int *account_id, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_removemember_pre[hIndex].func;
@@ -50730,7 +50757,7 @@ int HP_party_removemember(struct map_session_data *sd, int account_id, char *nam
retVal___ = HPMHooks.source.party.removemember(sd, account_id, name);
}
if( HPMHooks.count.HP_party_removemember_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, char *name);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_party_removemember_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, &account_id, name);
@@ -50818,11 +50845,11 @@ int HP_party_recv_noinfo(int party_id, int char_id) {
}
return retVal___;
}
-int HP_party_recv_info(struct party *sp, int char_id) {
+int HP_party_recv_info(const struct party *sp, int char_id) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_party_recv_info_pre ) {
- int (*preHookFunc) (struct party *sp, int *char_id);
+ int (*preHookFunc) (const struct party *sp, int *char_id);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_recv_info_pre[hIndex].func;
@@ -50837,7 +50864,7 @@ int HP_party_recv_info(struct party *sp, int char_id) {
retVal___ = HPMHooks.source.party.recv_info(sp, char_id);
}
if( HPMHooks.count.HP_party_recv_info_post ) {
- int (*postHookFunc) (int retVal___, struct party *sp, int *char_id);
+ int (*postHookFunc) (int retVal___, const struct party *sp, int *char_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_party_recv_info_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sp, &char_id);
@@ -52530,11 +52557,11 @@ int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int
}
return retVal___;
}
-bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) {
+bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_pc_authok_pre ) {
- bool (*preHookFunc) (struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers);
+ bool (*preHookFunc) (struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus *st, bool *changing_mapservers);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_authok_pre[hIndex].func;
@@ -52549,7 +52576,7 @@ bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_
retVal___ = HPMHooks.source.pc.authok(sd, login_id2, expiration_time, group_id, st, changing_mapservers);
}
if( HPMHooks.count.HP_pc_authok_post ) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus *st, bool *changing_mapservers);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_authok_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers);
@@ -58921,11 +58948,11 @@ int HP_pet_menu(struct map_session_data *sd, int menunum) {
}
return retVal___;
}
-int HP_pet_change_name(struct map_session_data *sd, char *name) {
+int HP_pet_change_name(struct map_session_data *sd, const char *name) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_change_name_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, char *name);
+ int (*preHookFunc) (struct map_session_data *sd, const char *name);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_change_name_pre[hIndex].func;
@@ -58940,7 +58967,7 @@ int HP_pet_change_name(struct map_session_data *sd, char *name) {
retVal___ = HPMHooks.source.pet.change_name(sd, name);
}
if( HPMHooks.count.HP_pet_change_name_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_change_name_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name);
@@ -58948,11 +58975,11 @@ int HP_pet_change_name(struct map_session_data *sd, char *name) {
}
return retVal___;
}
-int HP_pet_change_name_ack(struct map_session_data *sd, char *name, int flag) {
+int HP_pet_change_name_ack(struct map_session_data *sd, const char *name, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pet_change_name_ack_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, char *name, int *flag);
+ int (*preHookFunc) (struct map_session_data *sd, const char *name, int *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_change_name_ack_pre[hIndex].func;
@@ -58967,7 +58994,7 @@ int HP_pet_change_name_ack(struct map_session_data *sd, char *name, int flag) {
retVal___ = HPMHooks.source.pet.change_name_ack(sd, name, flag);
}
if( HPMHooks.count.HP_pet_change_name_ack_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *flag);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_change_name_ack_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name, &flag);
@@ -69609,15 +69636,15 @@ int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_elementalanalysis(struct map_session_data *sd, int n, uint16 skill_lv, unsigned short *item_list) {
+int HP_skill_elementalanalysis(struct map_session_data *sd, uint16 skill_lv, const struct itemlist *item_list) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_elementalanalysis_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list);
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv, const struct itemlist *item_list);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_elementalanalysis_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &n, &skill_lv, item_list);
+ retVal___ = preHookFunc(sd, &skill_lv, item_list);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -69625,26 +69652,26 @@ int HP_skill_elementalanalysis(struct map_session_data *sd, int n, uint16 skill_
}
}
{
- retVal___ = HPMHooks.source.skill.elementalanalysis(sd, n, skill_lv, item_list);
+ retVal___ = HPMHooks.source.skill.elementalanalysis(sd, skill_lv, item_list);
}
if( HPMHooks.count.HP_skill_elementalanalysis_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv, const struct itemlist *item_list);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_elementalanalysis_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &n, &skill_lv, item_list);
+ retVal___ = postHookFunc(retVal___, sd, &skill_lv, item_list);
}
}
return retVal___;
}
-int HP_skill_changematerial(struct map_session_data *sd, int n, unsigned short *item_list) {
+int HP_skill_changematerial(struct map_session_data *sd, const struct itemlist *item_list) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_changematerial_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ int (*preHookFunc) (struct map_session_data *sd, const struct itemlist *item_list);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_changematerial_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &n, item_list);
+ retVal___ = preHookFunc(sd, item_list);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -69652,13 +69679,13 @@ int HP_skill_changematerial(struct map_session_data *sd, int n, unsigned short *
}
}
{
- retVal___ = HPMHooks.source.skill.changematerial(sd, n, item_list);
+ retVal___ = HPMHooks.source.skill.changematerial(sd, item_list);
}
if( HPMHooks.count.HP_skill_changematerial_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const struct itemlist *item_list);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_changematerial_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &n, item_list);
+ retVal___ = postHookFunc(retVal___, sd, item_list);
}
}
return retVal___;