summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMDataCheck.h1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc105
4 files changed, 126 insertions, 0 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 43dc9ee5c..be798ceb5 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -301,6 +301,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "cdelayed_damage", sizeof(struct cdelayed_damage), SERVER_TYPE_MAP },
{ "clif_interface", sizeof(struct clif_interface), SERVER_TYPE_MAP },
{ "hCSData", sizeof(struct hCSData), SERVER_TYPE_MAP },
+ { "merge_item", sizeof(struct merge_item), SERVER_TYPE_MAP },
{ "s_packet_db", sizeof(struct s_packet_db), SERVER_TYPE_MAP },
#else
#define MAP_CLIF_H
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 09f33bff6..e35a4c81c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1345,6 +1345,14 @@ struct {
struct HPMHookPoint *HP_clif_parse_roulette_db_post;
struct HPMHookPoint *HP_clif_roulette_generate_ack_pre;
struct HPMHookPoint *HP_clif_roulette_generate_ack_post;
+ struct HPMHookPoint *HP_clif_openmergeitem_pre;
+ struct HPMHookPoint *HP_clif_openmergeitem_post;
+ struct HPMHookPoint *HP_clif_cancelmergeitem_pre;
+ struct HPMHookPoint *HP_clif_cancelmergeitem_post;
+ struct HPMHookPoint *HP_clif_comparemergeitem_pre;
+ struct HPMHookPoint *HP_clif_comparemergeitem_post;
+ struct HPMHookPoint *HP_clif_ackmergeitems_pre;
+ struct HPMHookPoint *HP_clif_ackmergeitems_post;
struct HPMHookPoint *HP_clif_pWantToConnection_pre;
struct HPMHookPoint *HP_clif_pWantToConnection_post;
struct HPMHookPoint *HP_clif_pLoadEndAck_pre;
@@ -6552,6 +6560,14 @@ struct {
int HP_clif_parse_roulette_db_post;
int HP_clif_roulette_generate_ack_pre;
int HP_clif_roulette_generate_ack_post;
+ int HP_clif_openmergeitem_pre;
+ int HP_clif_openmergeitem_post;
+ int HP_clif_cancelmergeitem_pre;
+ int HP_clif_cancelmergeitem_post;
+ int HP_clif_comparemergeitem_pre;
+ int HP_clif_comparemergeitem_post;
+ int HP_clif_ackmergeitems_pre;
+ int HP_clif_ackmergeitems_post;
int HP_clif_pWantToConnection_pre;
int HP_clif_pWantToConnection_post;
int HP_clif_pLoadEndAck_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 8c1456412..6501c0943 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -683,6 +683,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->npc_market_purchase_ack, HP_clif_npc_market_purchase_ack) },
{ HP_POP(clif->parse_roulette_db, HP_clif_parse_roulette_db) },
{ HP_POP(clif->roulette_generate_ack, HP_clif_roulette_generate_ack) },
+ { HP_POP(clif->openmergeitem, HP_clif_openmergeitem) },
+ { HP_POP(clif->cancelmergeitem, HP_clif_cancelmergeitem) },
+ { HP_POP(clif->comparemergeitem, HP_clif_comparemergeitem) },
+ { HP_POP(clif->ackmergeitems, HP_clif_ackmergeitems) },
{ HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) },
{ HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) },
{ HP_POP(clif->pTickSend, HP_clif_pTickSend) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index c623747aa..04f31aea5 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -17751,6 +17751,111 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re
}
return;
}
+void HP_clif_openmergeitem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_openmergeitem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_openmergeitem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.openmergeitem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_openmergeitem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_openmergeitem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cancelmergeitem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cancelmergeitem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_cancelmergeitem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+int HP_clif_comparemergeitem(const void *a, const void *b) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_clif_comparemergeitem_pre ) {
+ int (*preHookFunc) (const void *a, const void *b);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_comparemergeitem_pre[hIndex].func;
+ retVal___ = preHookFunc(a, b);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.comparemergeitem(a, b);
+ }
+ if( HPMHooks.count.HP_clif_comparemergeitem_post ) {
+ int (*postHookFunc) (int retVal___, const void *a, const void *b);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_comparemergeitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, a, b);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_ackmergeitems_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_ackmergeitems_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.ackmergeitems(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_ackmergeitems_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_ackmergeitems_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pWantToConnection_pre ) {