summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-08-30 00:10:04 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-19 22:24:50 +0300
commitd38de2853fc91897d696061853a0234e4f535317 (patch)
tree02c83cbe6b4bc99a154ab42999b563cdadc5da51 /src
parent135ca4ad9ecd3ee0b7f548104d92d2a8d74c77a0 (diff)
downloadhercules-d38de2853fc91897d696061853a0234e4f535317.tar.gz
hercules-d38de2853fc91897d696061853a0234e4f535317.tar.bz2
hercules-d38de2853fc91897d696061853a0234e4f535317.tar.xz
hercules-d38de2853fc91897d696061853a0234e4f535317.zip
Update HPM.
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMDataCheck.h6
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc30
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc60
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc15
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc246
5 files changed, 295 insertions, 62 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 31bce72b2..a7d594b0f 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -718,7 +718,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_WARPLIST", sizeof(struct PACKET_ZC_WARPLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_WARPLIST_sub", sizeof(struct PACKET_ZC_WARPLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP },
+ { "ZC_INVENTORY_END", sizeof(struct ZC_INVENTORY_END), SERVER_TYPE_MAP },
+ { "ZC_INVENTORY_START", sizeof(struct ZC_INVENTORY_START), SERVER_TYPE_MAP },
{ "ZC_PROGRESS_ACTOR", sizeof(struct ZC_PROGRESS_ACTOR), SERVER_TYPE_MAP },
+ { "ZC_STORE_ITEMLIST_EQUIP", sizeof(struct ZC_STORE_ITEMLIST_EQUIP), SERVER_TYPE_MAP },
+ { "ZC_STORE_ITEMLIST_NORMAL", sizeof(struct ZC_STORE_ITEMLIST_NORMAL), SERVER_TYPE_MAP },
{ "ach_list_info", sizeof(struct ach_list_info), SERVER_TYPE_MAP },
{ "mail_item", sizeof(struct mail_item), SERVER_TYPE_MAP },
{ "maillistinfo", sizeof(struct maillistinfo), SERVER_TYPE_MAP },
@@ -789,8 +793,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "packet_status_change", sizeof(struct packet_status_change), SERVER_TYPE_MAP },
{ "packet_status_change2", sizeof(struct packet_status_change2), SERVER_TYPE_MAP },
{ "packet_status_change_end", sizeof(struct packet_status_change_end), SERVER_TYPE_MAP },
- { "packet_storelist_equip", sizeof(struct packet_storelist_equip), SERVER_TYPE_MAP },
- { "packet_storelist_normal", sizeof(struct packet_storelist_normal), SERVER_TYPE_MAP },
{ "packet_unequipitem_ack", sizeof(struct packet_unequipitem_ack), SERVER_TYPE_MAP },
{ "packet_unit_walking", sizeof(struct packet_unit_walking), SERVER_TYPE_MAP },
{ "packet_viewequip_ack", sizeof(struct packet_viewequip_ack), SERVER_TYPE_MAP },
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 52c7bb0f6..93fe41952 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1320,12 +1320,18 @@ typedef void (*HPMHOOK_pre_clif_status_change) (struct block_list **bl, int *typ
typedef void (*HPMHOOK_post_clif_status_change) (struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3);
typedef void (*HPMHOOK_pre_clif_insert_card) (struct map_session_data **sd, int *idx_equip, int *idx_card, int *flag);
typedef void (*HPMHOOK_post_clif_insert_card) (struct map_session_data *sd, int idx_equip, int idx_card, int flag);
-typedef void (*HPMHOOK_pre_clif_inventorylist) (struct map_session_data **sd);
-typedef void (*HPMHOOK_post_clif_inventorylist) (struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_equiplist) (struct map_session_data **sd);
-typedef void (*HPMHOOK_post_clif_equiplist) (struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_cartlist) (struct map_session_data **sd);
-typedef void (*HPMHOOK_post_clif_cartlist) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_inventoryList) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_inventoryList) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_inventoryItems) (struct map_session_data **sd, enum inventory_type *type);
+typedef void (*HPMHOOK_post_clif_inventoryItems) (struct map_session_data *sd, enum inventory_type type);
+typedef void (*HPMHOOK_pre_clif_equipList) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_equipList) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_equipItems) (struct map_session_data **sd, enum inventory_type *type);
+typedef void (*HPMHOOK_post_clif_equipItems) (struct map_session_data *sd, enum inventory_type type);
+typedef void (*HPMHOOK_pre_clif_cartList) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_cartList) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_cartItems) (struct map_session_data **sd, enum inventory_type *type);
+typedef void (*HPMHOOK_post_clif_cartItems) (struct map_session_data *sd, enum inventory_type type);
typedef void (*HPMHOOK_pre_clif_favorite_item) (struct map_session_data **sd, unsigned short *index);
typedef void (*HPMHOOK_post_clif_favorite_item) (struct map_session_data *sd, unsigned short index);
typedef void (*HPMHOOK_pre_clif_clearcart) (int *fd);
@@ -1620,8 +1626,16 @@ typedef void (*HPMHOOK_pre_clif_openvendingAck) (int *fd, int *result);
typedef void (*HPMHOOK_post_clif_openvendingAck) (int fd, int result);
typedef void (*HPMHOOK_pre_clif_vendingreport) (struct map_session_data **sd, int *index, int *amount, uint32 *char_id, int *zeny);
typedef void (*HPMHOOK_post_clif_vendingreport) (struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny);
-typedef void (*HPMHOOK_pre_clif_storagelist) (struct map_session_data **sd, struct item **items, int *items_length);
-typedef void (*HPMHOOK_post_clif_storagelist) (struct map_session_data *sd, struct item *items, int items_length);
+typedef void (*HPMHOOK_pre_clif_storageList) (struct map_session_data **sd, struct item **items, int *items_length);
+typedef void (*HPMHOOK_post_clif_storageList) (struct map_session_data *sd, struct item *items, int items_length);
+typedef void (*HPMHOOK_pre_clif_guildStorageList) (struct map_session_data **sd, struct item **items, int *items_length);
+typedef void (*HPMHOOK_post_clif_guildStorageList) (struct map_session_data *sd, struct item *items, int items_length);
+typedef void (*HPMHOOK_pre_clif_storageItems) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length);
+typedef void (*HPMHOOK_post_clif_storageItems) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length);
+typedef void (*HPMHOOK_pre_clif_inventoryStart) (struct map_session_data **sd, enum inventory_type *type, const char **name);
+typedef void (*HPMHOOK_post_clif_inventoryStart) (struct map_session_data *sd, enum inventory_type type, const char *name);
+typedef void (*HPMHOOK_pre_clif_inventoryEnd) (struct map_session_data **sd, enum inventory_type *type);
+typedef void (*HPMHOOK_post_clif_inventoryEnd) (struct map_session_data *sd, enum inventory_type type);
typedef void (*HPMHOOK_pre_clif_updatestorageamount) (struct map_session_data **sd, int *amount, int *max_amount);
typedef void (*HPMHOOK_post_clif_updatestorageamount) (struct map_session_data *sd, int amount, int max_amount);
typedef void (*HPMHOOK_pre_clif_storageitemadded) (struct map_session_data **sd, struct item **i, int *index, int *amount);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 457bf90fe..a0c2603a6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -912,12 +912,18 @@ struct {
struct HPMHookPoint *HP_clif_status_change_post;
struct HPMHookPoint *HP_clif_insert_card_pre;
struct HPMHookPoint *HP_clif_insert_card_post;
- struct HPMHookPoint *HP_clif_inventorylist_pre;
- struct HPMHookPoint *HP_clif_inventorylist_post;
- struct HPMHookPoint *HP_clif_equiplist_pre;
- struct HPMHookPoint *HP_clif_equiplist_post;
- struct HPMHookPoint *HP_clif_cartlist_pre;
- struct HPMHookPoint *HP_clif_cartlist_post;
+ struct HPMHookPoint *HP_clif_inventoryList_pre;
+ struct HPMHookPoint *HP_clif_inventoryList_post;
+ struct HPMHookPoint *HP_clif_inventoryItems_pre;
+ struct HPMHookPoint *HP_clif_inventoryItems_post;
+ struct HPMHookPoint *HP_clif_equipList_pre;
+ struct HPMHookPoint *HP_clif_equipList_post;
+ struct HPMHookPoint *HP_clif_equipItems_pre;
+ struct HPMHookPoint *HP_clif_equipItems_post;
+ struct HPMHookPoint *HP_clif_cartList_pre;
+ struct HPMHookPoint *HP_clif_cartList_post;
+ struct HPMHookPoint *HP_clif_cartItems_pre;
+ struct HPMHookPoint *HP_clif_cartItems_post;
struct HPMHookPoint *HP_clif_favorite_item_pre;
struct HPMHookPoint *HP_clif_favorite_item_post;
struct HPMHookPoint *HP_clif_clearcart_pre;
@@ -1212,8 +1218,16 @@ struct {
struct HPMHookPoint *HP_clif_openvendingAck_post;
struct HPMHookPoint *HP_clif_vendingreport_pre;
struct HPMHookPoint *HP_clif_vendingreport_post;
- struct HPMHookPoint *HP_clif_storagelist_pre;
- struct HPMHookPoint *HP_clif_storagelist_post;
+ struct HPMHookPoint *HP_clif_storageList_pre;
+ struct HPMHookPoint *HP_clif_storageList_post;
+ struct HPMHookPoint *HP_clif_guildStorageList_pre;
+ struct HPMHookPoint *HP_clif_guildStorageList_post;
+ struct HPMHookPoint *HP_clif_storageItems_pre;
+ struct HPMHookPoint *HP_clif_storageItems_post;
+ struct HPMHookPoint *HP_clif_inventoryStart_pre;
+ struct HPMHookPoint *HP_clif_inventoryStart_post;
+ struct HPMHookPoint *HP_clif_inventoryEnd_pre;
+ struct HPMHookPoint *HP_clif_inventoryEnd_post;
struct HPMHookPoint *HP_clif_updatestorageamount_pre;
struct HPMHookPoint *HP_clif_updatestorageamount_post;
struct HPMHookPoint *HP_clif_storageitemadded_pre;
@@ -7477,12 +7491,18 @@ struct {
int HP_clif_status_change_post;
int HP_clif_insert_card_pre;
int HP_clif_insert_card_post;
- int HP_clif_inventorylist_pre;
- int HP_clif_inventorylist_post;
- int HP_clif_equiplist_pre;
- int HP_clif_equiplist_post;
- int HP_clif_cartlist_pre;
- int HP_clif_cartlist_post;
+ int HP_clif_inventoryList_pre;
+ int HP_clif_inventoryList_post;
+ int HP_clif_inventoryItems_pre;
+ int HP_clif_inventoryItems_post;
+ int HP_clif_equipList_pre;
+ int HP_clif_equipList_post;
+ int HP_clif_equipItems_pre;
+ int HP_clif_equipItems_post;
+ int HP_clif_cartList_pre;
+ int HP_clif_cartList_post;
+ int HP_clif_cartItems_pre;
+ int HP_clif_cartItems_post;
int HP_clif_favorite_item_pre;
int HP_clif_favorite_item_post;
int HP_clif_clearcart_pre;
@@ -7777,8 +7797,16 @@ struct {
int HP_clif_openvendingAck_post;
int HP_clif_vendingreport_pre;
int HP_clif_vendingreport_post;
- int HP_clif_storagelist_pre;
- int HP_clif_storagelist_post;
+ int HP_clif_storageList_pre;
+ int HP_clif_storageList_post;
+ int HP_clif_guildStorageList_pre;
+ int HP_clif_guildStorageList_post;
+ int HP_clif_storageItems_pre;
+ int HP_clif_storageItems_post;
+ int HP_clif_inventoryStart_pre;
+ int HP_clif_inventoryStart_post;
+ int HP_clif_inventoryEnd_pre;
+ int HP_clif_inventoryEnd_post;
int HP_clif_updatestorageamount_pre;
int HP_clif_updatestorageamount_post;
int HP_clif_storageitemadded_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 41e6f9208..5eecc1a6f 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -480,9 +480,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->combo_delay, HP_clif_combo_delay) },
{ HP_POP(clif->status_change, HP_clif_status_change) },
{ HP_POP(clif->insert_card, HP_clif_insert_card) },
- { HP_POP(clif->inventorylist, HP_clif_inventorylist) },
- { HP_POP(clif->equiplist, HP_clif_equiplist) },
- { HP_POP(clif->cartlist, HP_clif_cartlist) },
+ { HP_POP(clif->inventoryList, HP_clif_inventoryList) },
+ { HP_POP(clif->inventoryItems, HP_clif_inventoryItems) },
+ { HP_POP(clif->equipList, HP_clif_equipList) },
+ { HP_POP(clif->equipItems, HP_clif_equipItems) },
+ { HP_POP(clif->cartList, HP_clif_cartList) },
+ { HP_POP(clif->cartItems, HP_clif_cartItems) },
{ HP_POP(clif->favorite_item, HP_clif_favorite_item) },
{ HP_POP(clif->clearcart, HP_clif_clearcart) },
{ HP_POP(clif->item_identify_list, HP_clif_item_identify_list) },
@@ -630,7 +633,11 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->openvending, HP_clif_openvending) },
{ HP_POP(clif->openvendingAck, HP_clif_openvendingAck) },
{ HP_POP(clif->vendingreport, HP_clif_vendingreport) },
- { HP_POP(clif->storagelist, HP_clif_storagelist) },
+ { HP_POP(clif->storageList, HP_clif_storageList) },
+ { HP_POP(clif->guildStorageList, HP_clif_guildStorageList) },
+ { HP_POP(clif->storageItems, HP_clif_storageItems) },
+ { HP_POP(clif->inventoryStart, HP_clif_inventoryStart) },
+ { HP_POP(clif->inventoryEnd, HP_clif_inventoryEnd) },
{ HP_POP(clif->updatestorageamount, HP_clif_updatestorageamount) },
{ HP_POP(clif->storageitemadded, HP_clif_storageitemadded) },
{ HP_POP(clif->storageitemremoved, HP_clif_storageitemremoved) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 5690e0735..001863c0e 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -11890,13 +11890,13 @@ void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_car
}
return;
}
-void HP_clif_inventorylist(struct map_session_data *sd) {
+void HP_clif_inventoryList(struct map_session_data *sd) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_inventorylist_pre > 0) {
+ if (HPMHooks.count.HP_clif_inventoryList_pre > 0) {
void (*preHookFunc) (struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_inventorylist_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryList_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_inventoryList_pre[hIndex].func;
preHookFunc(&sd);
}
if (*HPMforce_return) {
@@ -11905,24 +11905,50 @@ void HP_clif_inventorylist(struct map_session_data *sd) {
}
}
{
- HPMHooks.source.clif.inventorylist(sd);
+ HPMHooks.source.clif.inventoryList(sd);
}
- if (HPMHooks.count.HP_clif_inventorylist_post > 0) {
+ if (HPMHooks.count.HP_clif_inventoryList_post > 0) {
void (*postHookFunc) (struct map_session_data *sd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_inventorylist_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryList_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_inventoryList_post[hIndex].func;
postHookFunc(sd);
}
}
return;
}
-void HP_clif_equiplist(struct map_session_data *sd) {
+void HP_clif_inventoryItems(struct map_session_data *sd, enum inventory_type type) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_equiplist_pre > 0) {
+ if (HPMHooks.count.HP_clif_inventoryItems_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryItems_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_inventoryItems_pre[hIndex].func;
+ preHookFunc(&sd, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.inventoryItems(sd, type);
+ }
+ if (HPMHooks.count.HP_clif_inventoryItems_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryItems_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_inventoryItems_post[hIndex].func;
+ postHookFunc(sd, type);
+ }
+ }
+ return;
+}
+void HP_clif_equipList(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_equipList_pre > 0) {
void (*preHookFunc) (struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_equiplist_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipList_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_equipList_pre[hIndex].func;
preHookFunc(&sd);
}
if (*HPMforce_return) {
@@ -11931,24 +11957,50 @@ void HP_clif_equiplist(struct map_session_data *sd) {
}
}
{
- HPMHooks.source.clif.equiplist(sd);
+ HPMHooks.source.clif.equipList(sd);
}
- if (HPMHooks.count.HP_clif_equiplist_post > 0) {
+ if (HPMHooks.count.HP_clif_equipList_post > 0) {
void (*postHookFunc) (struct map_session_data *sd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_equiplist_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipList_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_equipList_post[hIndex].func;
postHookFunc(sd);
}
}
return;
}
-void HP_clif_cartlist(struct map_session_data *sd) {
+void HP_clif_equipItems(struct map_session_data *sd, enum inventory_type type) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_cartlist_pre > 0) {
+ if (HPMHooks.count.HP_clif_equipItems_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipItems_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_equipItems_pre[hIndex].func;
+ preHookFunc(&sd, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.equipItems(sd, type);
+ }
+ if (HPMHooks.count.HP_clif_equipItems_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipItems_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_equipItems_post[hIndex].func;
+ postHookFunc(sd, type);
+ }
+ }
+ return;
+}
+void HP_clif_cartList(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_cartList_pre > 0) {
void (*preHookFunc) (struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_cartlist_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartList_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_cartList_pre[hIndex].func;
preHookFunc(&sd);
}
if (*HPMforce_return) {
@@ -11957,17 +12009,43 @@ void HP_clif_cartlist(struct map_session_data *sd) {
}
}
{
- HPMHooks.source.clif.cartlist(sd);
+ HPMHooks.source.clif.cartList(sd);
}
- if (HPMHooks.count.HP_clif_cartlist_post > 0) {
+ if (HPMHooks.count.HP_clif_cartList_post > 0) {
void (*postHookFunc) (struct map_session_data *sd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_cartlist_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartList_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_cartList_post[hIndex].func;
postHookFunc(sd);
}
}
return;
}
+void HP_clif_cartItems(struct map_session_data *sd, enum inventory_type type) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_cartItems_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartItems_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_cartItems_pre[hIndex].func;
+ preHookFunc(&sd, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cartItems(sd, type);
+ }
+ if (HPMHooks.count.HP_clif_cartItems_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartItems_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_cartItems_post[hIndex].func;
+ postHookFunc(sd, type);
+ }
+ }
+ return;
+}
void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_favorite_item_pre > 0) {
@@ -15809,13 +15887,39 @@ void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, u
}
return;
}
-void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int items_length) {
+void HP_clif_storageList(struct map_session_data *sd, struct item *items, int items_length) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_storageList_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageList_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_storageList_pre[hIndex].func;
+ preHookFunc(&sd, &items, &items_length);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.storageList(sd, items, items_length);
+ }
+ if (HPMHooks.count.HP_clif_storageList_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item *items, int items_length);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageList_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_storageList_post[hIndex].func;
+ postHookFunc(sd, items, items_length);
+ }
+ }
+ return;
+}
+void HP_clif_guildStorageList(struct map_session_data *sd, struct item *items, int items_length) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_storagelist_pre > 0) {
+ if (HPMHooks.count.HP_clif_guildStorageList_pre > 0) {
void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_storagelist_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guildStorageList_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_guildStorageList_pre[hIndex].func;
preHookFunc(&sd, &items, &items_length);
}
if (*HPMforce_return) {
@@ -15824,17 +15928,95 @@ void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int it
}
}
{
- HPMHooks.source.clif.storagelist(sd, items, items_length);
+ HPMHooks.source.clif.guildStorageList(sd, items, items_length);
}
- if (HPMHooks.count.HP_clif_storagelist_post > 0) {
+ if (HPMHooks.count.HP_clif_guildStorageList_post > 0) {
void (*postHookFunc) (struct map_session_data *sd, struct item *items, int items_length);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_storagelist_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guildStorageList_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_guildStorageList_post[hIndex].func;
postHookFunc(sd, items, items_length);
}
}
return;
}
+void HP_clif_storageItems(struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_storageItems_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_storageItems_pre[hIndex].func;
+ preHookFunc(&sd, &type, &items, &items_length);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.storageItems(sd, type, items, items_length);
+ }
+ if (HPMHooks.count.HP_clif_storageItems_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_storageItems_post[hIndex].func;
+ postHookFunc(sd, type, items, items_length);
+ }
+ }
+ return;
+}
+void HP_clif_inventoryStart(struct map_session_data *sd, enum inventory_type type, const char *name) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_inventoryStart_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, const char **name);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryStart_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_inventoryStart_pre[hIndex].func;
+ preHookFunc(&sd, &type, &name);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.inventoryStart(sd, type, name);
+ }
+ if (HPMHooks.count.HP_clif_inventoryStart_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, const char *name);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryStart_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_inventoryStart_post[hIndex].func;
+ postHookFunc(sd, type, name);
+ }
+ }
+ return;
+}
+void HP_clif_inventoryEnd(struct map_session_data *sd, enum inventory_type type) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_inventoryEnd_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryEnd_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_inventoryEnd_pre[hIndex].func;
+ preHookFunc(&sd, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.inventoryEnd(sd, type);
+ }
+ if (HPMHooks.count.HP_clif_inventoryEnd_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryEnd_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_inventoryEnd_post[hIndex].func;
+ postHookFunc(sd, type);
+ }
+ }
+ return;
+}
void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int max_amount) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_updatestorageamount_pre > 0) {