summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/HPMDataCheck.h5
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc141
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc36
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc897
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc1
6 files changed, 688 insertions, 393 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index e97a655e3..40c949d53 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -160,6 +160,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define MAP_BUYINGSTORE_H
#endif // MAP_BUYINGSTORE_H
+ #ifdef MAP_CHANNEL_H
+ { "Channel_Config", sizeof(struct Channel_Config), SERVER_TYPE_MAP },
+ #else
+ #define MAP_CHANNEL_H
+ #endif // MAP_CHANNEL_H
#ifdef MAP_CHRIF_H
{ "auth_node", sizeof(struct auth_node), SERVER_TYPE_MAP },
#else
diff --git a/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc
index 8482b9f80..6b1b84c69 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc
@@ -8,6 +8,7 @@ if( !(atcommand = GET_SYMBOL("atcommand") ) ) return false;
if( !(battle = GET_SYMBOL("battle") ) ) return false;
if( !(bg = GET_SYMBOL("battlegrounds") ) ) return false;
if( !(buyingstore = GET_SYMBOL("buyingstore") ) ) return false;
+if( !(channel = GET_SYMBOL("channel") ) ) return false;
if( !(chat = GET_SYMBOL("chat") ) ) return false;
if( !(chrif = GET_SYMBOL("chrif") ) ) return false;
if( !(clif = GET_SYMBOL("clif") ) ) return false;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 053c884d4..e538f53a2 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -249,6 +249,46 @@ struct {
struct HPMHookPoint *HP_buyingstore_searchall_post;
struct HPMHookPoint *HP_buyingstore_getuid_pre;
struct HPMHookPoint *HP_buyingstore_getuid_post;
+ struct HPMHookPoint *HP_channel_init_pre;
+ struct HPMHookPoint *HP_channel_init_post;
+ struct HPMHookPoint *HP_channel_final_pre;
+ struct HPMHookPoint *HP_channel_final_post;
+ struct HPMHookPoint *HP_channel_search_pre;
+ struct HPMHookPoint *HP_channel_search_post;
+ struct HPMHookPoint *HP_channel_create_pre;
+ struct HPMHookPoint *HP_channel_create_post;
+ struct HPMHookPoint *HP_channel_delete_pre;
+ struct HPMHookPoint *HP_channel_delete_post;
+ struct HPMHookPoint *HP_channel_set_password_pre;
+ struct HPMHookPoint *HP_channel_set_password_post;
+ struct HPMHookPoint *HP_channel_ban_pre;
+ struct HPMHookPoint *HP_channel_ban_post;
+ struct HPMHookPoint *HP_channel_unban_pre;
+ struct HPMHookPoint *HP_channel_unban_post;
+ struct HPMHookPoint *HP_channel_set_options_pre;
+ struct HPMHookPoint *HP_channel_set_options_post;
+ struct HPMHookPoint *HP_channel_send_pre;
+ struct HPMHookPoint *HP_channel_send_post;
+ struct HPMHookPoint *HP_channel_join_sub_pre;
+ struct HPMHookPoint *HP_channel_join_sub_post;
+ struct HPMHookPoint *HP_channel_join_pre;
+ struct HPMHookPoint *HP_channel_join_post;
+ struct HPMHookPoint *HP_channel_leave_pre;
+ struct HPMHookPoint *HP_channel_leave_post;
+ struct HPMHookPoint *HP_channel_leave_sub_pre;
+ struct HPMHookPoint *HP_channel_leave_sub_post;
+ struct HPMHookPoint *HP_channel_quit_pre;
+ struct HPMHookPoint *HP_channel_quit_post;
+ struct HPMHookPoint *HP_channel_map_join_pre;
+ struct HPMHookPoint *HP_channel_map_join_post;
+ struct HPMHookPoint *HP_channel_guild_join_alliance_pre;
+ struct HPMHookPoint *HP_channel_guild_join_alliance_post;
+ struct HPMHookPoint *HP_channel_guild_leave_alliance_pre;
+ struct HPMHookPoint *HP_channel_guild_leave_alliance_post;
+ struct HPMHookPoint *HP_channel_quit_guild_pre;
+ struct HPMHookPoint *HP_channel_quit_guild_post;
+ struct HPMHookPoint *HP_channel_config_read_pre;
+ struct HPMHookPoint *HP_channel_config_read_post;
struct HPMHookPoint *HP_chat_create_pc_chat_pre;
struct HPMHookPoint *HP_chat_create_pc_chat_post;
struct HPMHookPoint *HP_chat_join_pre;
@@ -1271,32 +1311,12 @@ struct {
struct HPMHookPoint *HP_clif_noask_sub_post;
struct HPMHookPoint *HP_clif_bc_ready_pre;
struct HPMHookPoint *HP_clif_bc_ready_post;
+ struct HPMHookPoint *HP_clif_channel_msg_pre;
+ struct HPMHookPoint *HP_clif_channel_msg_post;
+ struct HPMHookPoint *HP_clif_channel_msg2_pre;
+ struct HPMHookPoint *HP_clif_channel_msg2_post;
struct HPMHookPoint *HP_clif_undisguise_timer_pre;
struct HPMHookPoint *HP_clif_undisguise_timer_post;
- struct HPMHookPoint *HP_clif_chsys_create_pre;
- struct HPMHookPoint *HP_clif_chsys_create_post;
- struct HPMHookPoint *HP_clif_chsys_msg_pre;
- struct HPMHookPoint *HP_clif_chsys_msg_post;
- struct HPMHookPoint *HP_clif_chsys_msg2_pre;
- struct HPMHookPoint *HP_clif_chsys_msg2_post;
- struct HPMHookPoint *HP_clif_chsys_send_pre;
- struct HPMHookPoint *HP_clif_chsys_send_post;
- struct HPMHookPoint *HP_clif_chsys_join_pre;
- struct HPMHookPoint *HP_clif_chsys_join_post;
- struct HPMHookPoint *HP_clif_chsys_left_pre;
- struct HPMHookPoint *HP_clif_chsys_left_post;
- struct HPMHookPoint *HP_clif_chsys_delete_pre;
- struct HPMHookPoint *HP_clif_chsys_delete_post;
- struct HPMHookPoint *HP_clif_chsys_mjoin_pre;
- struct HPMHookPoint *HP_clif_chsys_mjoin_post;
- struct HPMHookPoint *HP_clif_chsys_quit_pre;
- struct HPMHookPoint *HP_clif_chsys_quit_post;
- struct HPMHookPoint *HP_clif_chsys_quitg_pre;
- struct HPMHookPoint *HP_clif_chsys_quitg_post;
- struct HPMHookPoint *HP_clif_chsys_gjoin_pre;
- struct HPMHookPoint *HP_clif_chsys_gjoin_post;
- struct HPMHookPoint *HP_clif_chsys_gleave_pre;
- struct HPMHookPoint *HP_clif_chsys_gleave_post;
struct HPMHookPoint *HP_clif_bank_deposit_pre;
struct HPMHookPoint *HP_clif_bank_deposit_post;
struct HPMHookPoint *HP_clif_bank_withdraw_pre;
@@ -1385,8 +1405,6 @@ struct {
struct HPMHookPoint *HP_clif_pChatLeave_post;
struct HPMHookPoint *HP_clif_pTradeRequest_pre;
struct HPMHookPoint *HP_clif_pTradeRequest_post;
- struct HPMHookPoint *HP_clif_chann_config_read_pre;
- struct HPMHookPoint *HP_clif_chann_config_read_post;
struct HPMHookPoint *HP_clif_pTradeAck_pre;
struct HPMHookPoint *HP_clif_pTradeAck_post;
struct HPMHookPoint *HP_clif_pTradeAddItem_pre;
@@ -5406,6 +5424,46 @@ struct {
int HP_buyingstore_searchall_post;
int HP_buyingstore_getuid_pre;
int HP_buyingstore_getuid_post;
+ int HP_channel_init_pre;
+ int HP_channel_init_post;
+ int HP_channel_final_pre;
+ int HP_channel_final_post;
+ int HP_channel_search_pre;
+ int HP_channel_search_post;
+ int HP_channel_create_pre;
+ int HP_channel_create_post;
+ int HP_channel_delete_pre;
+ int HP_channel_delete_post;
+ int HP_channel_set_password_pre;
+ int HP_channel_set_password_post;
+ int HP_channel_ban_pre;
+ int HP_channel_ban_post;
+ int HP_channel_unban_pre;
+ int HP_channel_unban_post;
+ int HP_channel_set_options_pre;
+ int HP_channel_set_options_post;
+ int HP_channel_send_pre;
+ int HP_channel_send_post;
+ int HP_channel_join_sub_pre;
+ int HP_channel_join_sub_post;
+ int HP_channel_join_pre;
+ int HP_channel_join_post;
+ int HP_channel_leave_pre;
+ int HP_channel_leave_post;
+ int HP_channel_leave_sub_pre;
+ int HP_channel_leave_sub_post;
+ int HP_channel_quit_pre;
+ int HP_channel_quit_post;
+ int HP_channel_map_join_pre;
+ int HP_channel_map_join_post;
+ int HP_channel_guild_join_alliance_pre;
+ int HP_channel_guild_join_alliance_post;
+ int HP_channel_guild_leave_alliance_pre;
+ int HP_channel_guild_leave_alliance_post;
+ int HP_channel_quit_guild_pre;
+ int HP_channel_quit_guild_post;
+ int HP_channel_config_read_pre;
+ int HP_channel_config_read_post;
int HP_chat_create_pc_chat_pre;
int HP_chat_create_pc_chat_post;
int HP_chat_join_pre;
@@ -6428,32 +6486,12 @@ struct {
int HP_clif_noask_sub_post;
int HP_clif_bc_ready_pre;
int HP_clif_bc_ready_post;
+ int HP_clif_channel_msg_pre;
+ int HP_clif_channel_msg_post;
+ int HP_clif_channel_msg2_pre;
+ int HP_clif_channel_msg2_post;
int HP_clif_undisguise_timer_pre;
int HP_clif_undisguise_timer_post;
- int HP_clif_chsys_create_pre;
- int HP_clif_chsys_create_post;
- int HP_clif_chsys_msg_pre;
- int HP_clif_chsys_msg_post;
- int HP_clif_chsys_msg2_pre;
- int HP_clif_chsys_msg2_post;
- int HP_clif_chsys_send_pre;
- int HP_clif_chsys_send_post;
- int HP_clif_chsys_join_pre;
- int HP_clif_chsys_join_post;
- int HP_clif_chsys_left_pre;
- int HP_clif_chsys_left_post;
- int HP_clif_chsys_delete_pre;
- int HP_clif_chsys_delete_post;
- int HP_clif_chsys_mjoin_pre;
- int HP_clif_chsys_mjoin_post;
- int HP_clif_chsys_quit_pre;
- int HP_clif_chsys_quit_post;
- int HP_clif_chsys_quitg_pre;
- int HP_clif_chsys_quitg_post;
- int HP_clif_chsys_gjoin_pre;
- int HP_clif_chsys_gjoin_post;
- int HP_clif_chsys_gleave_pre;
- int HP_clif_chsys_gleave_post;
int HP_clif_bank_deposit_pre;
int HP_clif_bank_deposit_post;
int HP_clif_bank_withdraw_pre;
@@ -6542,8 +6580,6 @@ struct {
int HP_clif_pChatLeave_post;
int HP_clif_pTradeRequest_pre;
int HP_clif_pTradeRequest_post;
- int HP_clif_chann_config_read_pre;
- int HP_clif_chann_config_read_post;
int HP_clif_pTradeAck_pre;
int HP_clif_pTradeAck_post;
int HP_clif_pTradeAddItem_pre;
@@ -10323,6 +10359,7 @@ struct {
struct battle_interface battle;
struct battleground_interface bg;
struct buyingstore_interface buyingstore;
+ struct channel_interface channel;
struct chat_interface chat;
struct chrif_interface chrif;
struct clif_interface clif;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index ff637a1b3..f3ea65b93 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -131,6 +131,27 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(buyingstore->search, HP_buyingstore_search) },
{ HP_POP(buyingstore->searchall, HP_buyingstore_searchall) },
{ HP_POP(buyingstore->getuid, HP_buyingstore_getuid) },
+/* channel */
+ { HP_POP(channel->init, HP_channel_init) },
+ { HP_POP(channel->final, HP_channel_final) },
+ { HP_POP(channel->search, HP_channel_search) },
+ { HP_POP(channel->create, HP_channel_create) },
+ { HP_POP(channel->delete, HP_channel_delete) },
+ { HP_POP(channel->set_password, HP_channel_set_password) },
+ { HP_POP(channel->ban, HP_channel_ban) },
+ { HP_POP(channel->unban, HP_channel_unban) },
+ { HP_POP(channel->set_options, HP_channel_set_options) },
+ { HP_POP(channel->send, HP_channel_send) },
+ { HP_POP(channel->join_sub, HP_channel_join_sub) },
+ { HP_POP(channel->join, HP_channel_join) },
+ { HP_POP(channel->leave, HP_channel_leave) },
+ { HP_POP(channel->leave_sub, HP_channel_leave_sub) },
+ { HP_POP(channel->quit, HP_channel_quit) },
+ { HP_POP(channel->map_join, HP_channel_map_join) },
+ { HP_POP(channel->guild_join_alliance, HP_channel_guild_join_alliance) },
+ { HP_POP(channel->guild_leave_alliance, HP_channel_guild_leave_alliance) },
+ { HP_POP(channel->quit_guild, HP_channel_quit_guild) },
+ { HP_POP(channel->config_read, HP_channel_config_read) },
/* chat */
{ HP_POP(chat->create_pc_chat, HP_chat_create_pc_chat) },
{ HP_POP(chat->join, HP_chat_join) },
@@ -645,19 +666,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->user_count, HP_clif_user_count) },
{ HP_POP(clif->noask_sub, HP_clif_noask_sub) },
{ HP_POP(clif->bc_ready, HP_clif_bc_ready) },
+ { HP_POP(clif->channel_msg, HP_clif_channel_msg) },
+ { HP_POP(clif->channel_msg2, HP_clif_channel_msg2) },
{ HP_POP(clif->undisguise_timer, HP_clif_undisguise_timer) },
- { HP_POP(clif->chsys_create, HP_clif_chsys_create) },
- { HP_POP(clif->chsys_msg, HP_clif_chsys_msg) },
- { HP_POP(clif->chsys_msg2, HP_clif_chsys_msg2) },
- { HP_POP(clif->chsys_send, HP_clif_chsys_send) },
- { HP_POP(clif->chsys_join, HP_clif_chsys_join) },
- { HP_POP(clif->chsys_left, HP_clif_chsys_left) },
- { HP_POP(clif->chsys_delete, HP_clif_chsys_delete) },
- { HP_POP(clif->chsys_mjoin, HP_clif_chsys_mjoin) },
- { HP_POP(clif->chsys_quit, HP_clif_chsys_quit) },
- { HP_POP(clif->chsys_quitg, HP_clif_chsys_quitg) },
- { HP_POP(clif->chsys_gjoin, HP_clif_chsys_gjoin) },
- { HP_POP(clif->chsys_gleave, HP_clif_chsys_gleave) },
{ HP_POP(clif->bank_deposit, HP_clif_bank_deposit) },
{ HP_POP(clif->bank_withdraw, HP_clif_bank_withdraw) },
{ HP_POP(clif->show_modifiers, HP_clif_show_modifiers) },
@@ -702,7 +713,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pKickFromChat, HP_clif_pKickFromChat) },
{ HP_POP(clif->pChatLeave, HP_clif_pChatLeave) },
{ HP_POP(clif->pTradeRequest, HP_clif_pTradeRequest) },
- { HP_POP(clif->chann_config_read, HP_clif_chann_config_read) },
{ HP_POP(clif->pTradeAck, HP_clif_pTradeAck) },
{ HP_POP(clif->pTradeAddItem, HP_clif_pTradeAddItem) },
{ HP_POP(clif->pTradeOk, HP_clif_pTradeOk) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index e5b91f005..97d2838b4 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -3340,6 +3340,533 @@ unsigned int HP_buyingstore_getuid(void) {
}
return retVal___;
}
+/* channel */
+int HP_channel_init(bool minimal) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_channel_init_pre ) {
+ int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_init_pre[hIndex].func;
+ retVal___ = preHookFunc(&minimal);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.channel.init(minimal);
+ }
+ if( HPMHooks.count.HP_channel_init_post ) {
+ int (*postHookFunc) (int retVal___, bool *minimal);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &minimal);
+ }
+ }
+ return retVal___;
+}
+void HP_channel_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.final();
+ }
+ if( HPMHooks.count.HP_channel_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct channel_data* HP_channel_search(const char *name, struct map_session_data *sd) {
+ int hIndex = 0;
+ struct channel_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_channel_search_pre ) {
+ struct channel_data* (*preHookFunc) (const char *name, struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_search_pre[hIndex].func;
+ retVal___ = preHookFunc(name, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.channel.search(name, sd);
+ }
+ if( HPMHooks.count.HP_channel_search_post ) {
+ struct channel_data* (*postHookFunc) (struct channel_data* retVal___, const char *name, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, sd);
+ }
+ }
+ return retVal___;
+}
+struct channel_data* HP_channel_create(enum channel_types type, const char *name, unsigned char color) {
+ int hIndex = 0;
+ struct channel_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_channel_create_pre ) {
+ struct channel_data* (*preHookFunc) (enum channel_types *type, const char *name, unsigned char *color);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_create_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, name, &color);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.channel.create(type, name, color);
+ }
+ if( HPMHooks.count.HP_channel_create_post ) {
+ struct channel_data* (*postHookFunc) (struct channel_data* retVal___, enum channel_types *type, const char *name, unsigned char *color);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type, name, &color);
+ }
+ }
+ return retVal___;
+}
+void HP_channel_delete(struct channel_data *chan) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_delete_pre ) {
+ void (*preHookFunc) (struct channel_data *chan);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_delete_pre[hIndex].func;
+ preHookFunc(chan);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.delete(chan);
+ }
+ if( HPMHooks.count.HP_channel_delete_post ) {
+ void (*postHookFunc) (struct channel_data *chan);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_delete_post[hIndex].func;
+ postHookFunc(chan);
+ }
+ }
+ return;
+}
+void HP_channel_set_password(struct channel_data *chan, const char *password) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_set_password_pre ) {
+ void (*preHookFunc) (struct channel_data *chan, const char *password);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_set_password_pre[hIndex].func;
+ preHookFunc(chan, password);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.set_password(chan, password);
+ }
+ if( HPMHooks.count.HP_channel_set_password_post ) {
+ void (*postHookFunc) (struct channel_data *chan, const char *password);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_set_password_post[hIndex].func;
+ postHookFunc(chan, password);
+ }
+ }
+ return;
+}
+enum channel_operation_status HP_channel_ban(struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ enum channel_operation_status retVal___ = HCS_STATUS_FAIL;
+ if( HPMHooks.count.HP_channel_ban_pre ) {
+ enum channel_operation_status (*preHookFunc) (struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_ban_pre[hIndex].func;
+ retVal___ = preHookFunc(chan, ssd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.channel.ban(chan, ssd, tsd);
+ }
+ if( HPMHooks.count.HP_channel_ban_post ) {
+ enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_ban_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, chan, ssd, tsd);
+ }
+ }
+ return retVal___;
+}
+enum channel_operation_status HP_channel_unban(struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ enum channel_operation_status retVal___ = HCS_STATUS_FAIL;
+ if( HPMHooks.count.HP_channel_unban_pre ) {
+ enum channel_operation_status (*preHookFunc) (struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_unban_pre[hIndex].func;
+ retVal___ = preHookFunc(chan, ssd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.channel.unban(chan, ssd, tsd);
+ }
+ if( HPMHooks.count.HP_channel_unban_post ) {
+ enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_unban_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, chan, ssd, tsd);
+ }
+ }
+ return retVal___;
+}
+void HP_channel_set_options(struct channel_data *chan, unsigned int options) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_set_options_pre ) {
+ void (*preHookFunc) (struct channel_data *chan, unsigned int *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_set_options_pre[hIndex].func;
+ preHookFunc(chan, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.set_options(chan, options);
+ }
+ if( HPMHooks.count.HP_channel_set_options_post ) {
+ void (*postHookFunc) (struct channel_data *chan, unsigned int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_set_options_post[hIndex].func;
+ postHookFunc(chan, &options);
+ }
+ }
+ return;
+}
+void HP_channel_send(struct channel_data *chan, struct map_session_data *sd, const char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_send_pre ) {
+ void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd, const char *msg);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_send_pre[hIndex].func;
+ preHookFunc(chan, sd, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.send(chan, sd, msg);
+ }
+ if( HPMHooks.count.HP_channel_send_post ) {
+ void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, const char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_send_post[hIndex].func;
+ postHookFunc(chan, sd, msg);
+ }
+ }
+ return;
+}
+void HP_channel_join_sub(struct channel_data *chan, struct map_session_data *sd, bool stealth) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_join_sub_pre ) {
+ void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd, bool *stealth);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_join_sub_pre[hIndex].func;
+ preHookFunc(chan, sd, &stealth);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.join_sub(chan, sd, stealth);
+ }
+ if( HPMHooks.count.HP_channel_join_sub_post ) {
+ void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, bool *stealth);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_join_sub_post[hIndex].func;
+ postHookFunc(chan, sd, &stealth);
+ }
+ }
+ return;
+}
+enum channel_operation_status HP_channel_join(struct channel_data *chan, struct map_session_data *sd, const char *password, bool silent) {
+ int hIndex = 0;
+ enum channel_operation_status retVal___ = HCS_STATUS_FAIL;
+ if( HPMHooks.count.HP_channel_join_pre ) {
+ enum channel_operation_status (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd, const char *password, bool *silent);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_join_pre[hIndex].func;
+ retVal___ = preHookFunc(chan, sd, password, &silent);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.channel.join(chan, sd, password, silent);
+ }
+ if( HPMHooks.count.HP_channel_join_post ) {
+ enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, struct map_session_data *sd, const char *password, bool *silent);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_join_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, chan, sd, password, &silent);
+ }
+ }
+ return retVal___;
+}
+void HP_channel_leave(struct channel_data *chan, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_leave_pre ) {
+ void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_leave_pre[hIndex].func;
+ preHookFunc(chan, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.leave(chan, sd);
+ }
+ if( HPMHooks.count.HP_channel_leave_post ) {
+ void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_leave_post[hIndex].func;
+ postHookFunc(chan, sd);
+ }
+ }
+ return;
+}
+void HP_channel_leave_sub(struct channel_data *chan, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_leave_sub_pre ) {
+ void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_leave_sub_pre[hIndex].func;
+ preHookFunc(chan, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.leave_sub(chan, sd);
+ }
+ if( HPMHooks.count.HP_channel_leave_sub_post ) {
+ void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_leave_sub_post[hIndex].func;
+ postHookFunc(chan, sd);
+ }
+ }
+ return;
+}
+void HP_channel_quit(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_quit_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_quit_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.quit(sd);
+ }
+ if( HPMHooks.count.HP_channel_quit_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_quit_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_channel_map_join(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_map_join_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_map_join_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.map_join(sd);
+ }
+ if( HPMHooks.count.HP_channel_map_join_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_map_join_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_channel_guild_join_alliance(const struct guild *g_source, const struct guild *g_ally) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_guild_join_alliance_pre ) {
+ void (*preHookFunc) (const struct guild *g_source, const struct guild *g_ally);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_guild_join_alliance_pre[hIndex].func;
+ preHookFunc(g_source, g_ally);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.guild_join_alliance(g_source, g_ally);
+ }
+ if( HPMHooks.count.HP_channel_guild_join_alliance_post ) {
+ void (*postHookFunc) (const struct guild *g_source, const struct guild *g_ally);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_guild_join_alliance_post[hIndex].func;
+ postHookFunc(g_source, g_ally);
+ }
+ }
+ return;
+}
+void HP_channel_guild_leave_alliance(const struct guild *g_source, const struct guild *g_ally) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_guild_leave_alliance_pre ) {
+ void (*preHookFunc) (const struct guild *g_source, const struct guild *g_ally);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_guild_leave_alliance_pre[hIndex].func;
+ preHookFunc(g_source, g_ally);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.guild_leave_alliance(g_source, g_ally);
+ }
+ if( HPMHooks.count.HP_channel_guild_leave_alliance_post ) {
+ void (*postHookFunc) (const struct guild *g_source, const struct guild *g_ally);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_guild_leave_alliance_post[hIndex].func;
+ postHookFunc(g_source, g_ally);
+ }
+ }
+ return;
+}
+void HP_channel_quit_guild(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_quit_guild_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_quit_guild_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.quit_guild(sd);
+ }
+ if( HPMHooks.count.HP_channel_quit_guild_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_quit_guild_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_channel_config_read(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_channel_config_read_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_channel_config_read_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.channel.config_read();
+ }
+ if( HPMHooks.count.HP_channel_config_read_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_channel_config_read_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* chat */
bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) {
int hIndex = 0;
@@ -16769,275 +17296,14 @@ void HP_clif_bc_ready(void) {
}
return;
}
-int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_clif_undisguise_timer_pre ) {
- int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_undisguise_timer_pre[hIndex].func;
- retVal___ = preHookFunc(&tid, &tick, &id, &data);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.clif.undisguise_timer(tid, tick, id, data);
- }
- if( HPMHooks.count.HP_clif_undisguise_timer_post ) {
- int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_undisguise_timer_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
- }
- }
- return retVal___;
-}
-void HP_clif_chsys_create(struct hChSysCh *channel, char *name, char *pass, unsigned char color) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_create_pre ) {
- void (*preHookFunc) (struct hChSysCh *channel, char *name, char *pass, unsigned char *color);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_create_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_create_pre[hIndex].func;
- preHookFunc(channel, name, pass, &color);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_create(channel, name, pass, color);
- }
- if( HPMHooks.count.HP_clif_chsys_create_post ) {
- void (*postHookFunc) (struct hChSysCh *channel, char *name, char *pass, unsigned char *color);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_create_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_create_post[hIndex].func;
- postHookFunc(channel, name, pass, &color);
- }
- }
- return;
-}
-void HP_clif_chsys_msg(struct hChSysCh *channel, struct map_session_data *sd, char *msg) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_msg_pre ) {
- void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, char *msg);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_msg_pre[hIndex].func;
- preHookFunc(channel, sd, msg);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_msg(channel, sd, msg);
- }
- if( HPMHooks.count.HP_clif_chsys_msg_post ) {
- void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, char *msg);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_msg_post[hIndex].func;
- postHookFunc(channel, sd, msg);
- }
- }
- return;
-}
-void HP_clif_chsys_msg2(struct hChSysCh *channel, char *msg) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_msg2_pre ) {
- void (*preHookFunc) (struct hChSysCh *channel, char *msg);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg2_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_msg2_pre[hIndex].func;
- preHookFunc(channel, msg);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_msg2(channel, msg);
- }
- if( HPMHooks.count.HP_clif_chsys_msg2_post ) {
- void (*postHookFunc) (struct hChSysCh *channel, char *msg);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg2_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_msg2_post[hIndex].func;
- postHookFunc(channel, msg);
- }
- }
- return;
-}
-void HP_clif_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_send_pre ) {
- void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, const char *msg);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_send_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_send_pre[hIndex].func;
- preHookFunc(channel, sd, msg);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_send(channel, sd, msg);
- }
- if( HPMHooks.count.HP_clif_chsys_send_post ) {
- void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, const char *msg);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_send_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_send_post[hIndex].func;
- postHookFunc(channel, sd, msg);
- }
- }
- return;
-}
-void HP_clif_chsys_join(struct hChSysCh *channel, struct map_session_data *sd) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_join_pre ) {
- void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_join_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_join_pre[hIndex].func;
- preHookFunc(channel, sd);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_join(channel, sd);
- }
- if( HPMHooks.count.HP_clif_chsys_join_post ) {
- void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_join_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_join_post[hIndex].func;
- postHookFunc(channel, sd);
- }
- }
- return;
-}
-void HP_clif_chsys_left(struct hChSysCh *channel, struct map_session_data *sd) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_left_pre ) {
- void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_left_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_left_pre[hIndex].func;
- preHookFunc(channel, sd);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_left(channel, sd);
- }
- if( HPMHooks.count.HP_clif_chsys_left_post ) {
- void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_left_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_left_post[hIndex].func;
- postHookFunc(channel, sd);
- }
- }
- return;
-}
-void HP_clif_chsys_delete(struct hChSysCh *channel) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_delete_pre ) {
- void (*preHookFunc) (struct hChSysCh *channel);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_delete_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_delete_pre[hIndex].func;
- preHookFunc(channel);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_delete(channel);
- }
- if( HPMHooks.count.HP_clif_chsys_delete_post ) {
- void (*postHookFunc) (struct hChSysCh *channel);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_delete_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_delete_post[hIndex].func;
- postHookFunc(channel);
- }
- }
- return;
-}
-void HP_clif_chsys_mjoin(struct map_session_data *sd) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_mjoin_pre ) {
- void (*preHookFunc) (struct map_session_data *sd);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_mjoin_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_mjoin_pre[hIndex].func;
- preHookFunc(sd);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_mjoin(sd);
- }
- if( HPMHooks.count.HP_clif_chsys_mjoin_post ) {
- void (*postHookFunc) (struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_mjoin_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_mjoin_post[hIndex].func;
- postHookFunc(sd);
- }
- }
- return;
-}
-void HP_clif_chsys_quit(struct map_session_data *sd) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_quit_pre ) {
- void (*preHookFunc) (struct map_session_data *sd);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quit_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_quit_pre[hIndex].func;
- preHookFunc(sd);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chsys_quit(sd);
- }
- if( HPMHooks.count.HP_clif_chsys_quit_post ) {
- void (*postHookFunc) (struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quit_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_quit_post[hIndex].func;
- postHookFunc(sd);
- }
- }
- return;
-}
-void HP_clif_chsys_quitg(struct map_session_data *sd) {
+void HP_clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, char *msg) {
int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_quitg_pre ) {
- void (*preHookFunc) (struct map_session_data *sd);
+ if( HPMHooks.count.HP_clif_channel_msg_pre ) {
+ void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd, char *msg);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quitg_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_quitg_pre[hIndex].func;
- preHookFunc(sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_channel_msg_pre[hIndex].func;
+ preHookFunc(chan, sd, msg);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -17045,25 +17311,25 @@ void HP_clif_chsys_quitg(struct map_session_data *sd) {
}
}
{
- HPMHooks.source.clif.chsys_quitg(sd);
+ HPMHooks.source.clif.channel_msg(chan, sd, msg);
}
- if( HPMHooks.count.HP_clif_chsys_quitg_post ) {
- void (*postHookFunc) (struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quitg_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_quitg_post[hIndex].func;
- postHookFunc(sd);
+ if( HPMHooks.count.HP_clif_channel_msg_post ) {
+ void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_channel_msg_post[hIndex].func;
+ postHookFunc(chan, sd, msg);
}
}
return;
}
-void HP_clif_chsys_gjoin(struct guild *g1, struct guild *g2) {
+void HP_clif_channel_msg2(struct channel_data *chan, char *msg) {
int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_gjoin_pre ) {
- void (*preHookFunc) (struct guild *g1, struct guild *g2);
+ if( HPMHooks.count.HP_clif_channel_msg2_pre ) {
+ void (*preHookFunc) (struct channel_data *chan, char *msg);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gjoin_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_gjoin_pre[hIndex].func;
- preHookFunc(g1, g2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_channel_msg2_pre[hIndex].func;
+ preHookFunc(chan, msg);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -17071,42 +17337,43 @@ void HP_clif_chsys_gjoin(struct guild *g1, struct guild *g2) {
}
}
{
- HPMHooks.source.clif.chsys_gjoin(g1, g2);
+ HPMHooks.source.clif.channel_msg2(chan, msg);
}
- if( HPMHooks.count.HP_clif_chsys_gjoin_post ) {
- void (*postHookFunc) (struct guild *g1, struct guild *g2);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gjoin_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_gjoin_post[hIndex].func;
- postHookFunc(g1, g2);
+ if( HPMHooks.count.HP_clif_channel_msg2_post ) {
+ void (*postHookFunc) (struct channel_data *chan, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_channel_msg2_post[hIndex].func;
+ postHookFunc(chan, msg);
}
}
return;
}
-void HP_clif_chsys_gleave(struct guild *g1, struct guild *g2) {
+int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
- if( HPMHooks.count.HP_clif_chsys_gleave_pre ) {
- void (*preHookFunc) (struct guild *g1, struct guild *g2);
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_clif_undisguise_timer_pre ) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gleave_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chsys_gleave_pre[hIndex].func;
- preHookFunc(g1, g2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_undisguise_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.clif.chsys_gleave(g1, g2);
+ retVal___ = HPMHooks.source.clif.undisguise_timer(tid, tick, id, data);
}
- if( HPMHooks.count.HP_clif_chsys_gleave_post ) {
- void (*postHookFunc) (struct guild *g1, struct guild *g2);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gleave_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chsys_gleave_post[hIndex].func;
- postHookFunc(g1, g2);
+ if( HPMHooks.count.HP_clif_undisguise_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_undisguise_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
}
}
- return;
+ return retVal___;
}
void HP_clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason) {
int hIndex = 0;
@@ -18255,32 +18522,6 @@ void HP_clif_pTradeRequest(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_chann_config_read(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_clif_chann_config_read_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chann_config_read_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_clif_chann_config_read_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.chann_config_read();
- }
- if( HPMHooks.count.HP_clif_chann_config_read_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chann_config_read_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_clif_chann_config_read_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
void HP_clif_pTradeAck(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTradeAck_pre ) {
@@ -32696,10 +32937,10 @@ void HP_ircbot_send(char *str) {
}
return;
}
-void HP_ircbot_relay(char *name, const char *msg) {
+void HP_ircbot_relay(const char *name, const char *msg) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_relay_pre ) {
- void (*preHookFunc) (char *name, const char *msg);
+ void (*preHookFunc) (const char *name, const char *msg);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_relay_pre[hIndex].func;
@@ -32714,7 +32955,7 @@ void HP_ircbot_relay(char *name, const char *msg) {
HPMHooks.source.ircbot.relay(name, msg);
}
if( HPMHooks.count.HP_ircbot_relay_post ) {
- void (*postHookFunc) (char *name, const char *msg);
+ void (*postHookFunc) (const char *name, const char *msg);
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_ircbot_relay_post[hIndex].func;
postHookFunc(name, msg);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index 53bb6bcad..d7d7ac1ac 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -8,6 +8,7 @@ memcpy(&HPMHooks.source.atcommand, atcommand, sizeof(struct atcommand_interface)
memcpy(&HPMHooks.source.battle, battle, sizeof(struct battle_interface));
memcpy(&HPMHooks.source.bg, bg, sizeof(struct battleground_interface));
memcpy(&HPMHooks.source.buyingstore, buyingstore, sizeof(struct buyingstore_interface));
+memcpy(&HPMHooks.source.channel, channel, sizeof(struct channel_interface));
memcpy(&HPMHooks.source.chat, chat, sizeof(struct chat_interface));
memcpy(&HPMHooks.source.chrif, chrif, sizeof(struct chrif_interface));
memcpy(&HPMHooks.source.clif, clif, sizeof(struct clif_interface));