diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 26 |
3 files changed, 31 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index d73525b70..feb929dbc 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -977,6 +977,8 @@ struct { struct HPMHookPoint *HP_clif_party_show_picker_post; struct HPMHookPoint *HP_clif_partyinvitationstate_pre; struct HPMHookPoint *HP_clif_partyinvitationstate_post; + struct HPMHookPoint *HP_clif_PartyLeaderChanged_pre; + struct HPMHookPoint *HP_clif_PartyLeaderChanged_post; struct HPMHookPoint *HP_clif_guild_created_pre; struct HPMHookPoint *HP_clif_guild_created_post; struct HPMHookPoint *HP_clif_guild_belonginfo_pre; @@ -6014,6 +6016,8 @@ struct { int HP_clif_party_show_picker_post; int HP_clif_partyinvitationstate_pre; int HP_clif_partyinvitationstate_post; + int HP_clif_PartyLeaderChanged_pre; + int HP_clif_PartyLeaderChanged_post; int HP_clif_guild_created_pre; int HP_clif_guild_created_post; int HP_clif_guild_belonginfo_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 05d484d20..7c6e6305b 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -498,6 +498,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->party_xy_remove, HP_clif_party_xy_remove) }, { HP_POP(clif->party_show_picker, HP_clif_party_show_picker) }, { HP_POP(clif->partyinvitationstate, HP_clif_partyinvitationstate) }, + { HP_POP(clif->PartyLeaderChanged, HP_clif_PartyLeaderChanged) }, { HP_POP(clif->guild_created, HP_clif_guild_created) }, { HP_POP(clif->guild_belonginfo, HP_clif_guild_belonginfo) }, { HP_POP(clif->guild_masterormember, HP_clif_guild_masterormember) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 8f209fe5c..4cc8bbf18 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -12937,6 +12937,32 @@ void HP_clif_partyinvitationstate(struct map_session_data *sd) { } return; } +void HP_clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, int new_leader_aid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyLeaderChanged_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *prev_leader_aid, int *new_leader_aid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyLeaderChanged_pre[hIndex].func; + preHookFunc(sd, &prev_leader_aid, &new_leader_aid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyLeaderChanged(sd, prev_leader_aid, new_leader_aid); + } + if( HPMHooks.count.HP_clif_PartyLeaderChanged_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *prev_leader_aid, int *new_leader_aid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyLeaderChanged_post[hIndex].func; + postHookFunc(sd, &prev_leader_aid, &new_leader_aid); + } + } + return; +} void HP_clif_guild_created(struct map_session_data *sd, int flag) { int hIndex = 0; if( HPMHooks.count.HP_clif_guild_created_pre ) { |