diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-09-21 06:15:44 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-09-21 06:15:44 +0200 |
commit | 5f11a4f710216e4abefaf6b4ffb032b3a62bfce1 (patch) | |
tree | 4543fe7aba08b0c9330011111833bb89cb6f83de /src/plugins | |
parent | ff787408bcc523ebd4b7919db65423f741351664 (diff) | |
download | hercules-5f11a4f710216e4abefaf6b4ffb032b3a62bfce1.tar.gz hercules-5f11a4f710216e4abefaf6b4ffb032b3a62bfce1.tar.bz2 hercules-5f11a4f710216e4abefaf6b4ffb032b3a62bfce1.tar.xz hercules-5f11a4f710216e4abefaf6b4ffb032b3a62bfce1.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
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 ) { |