summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/int_rodex.c24
-rw-r--r--src/common/mmo.h5
-rw-r--r--src/map/clif.c95
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/intif.c6
-rw-r--r--src/map/packets.h4
-rw-r--r--src/map/packets_struct.h23
-rw-r--r--src/map/rodex.c11
-rw-r--r--src/map/rodex.h2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc36
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc70
11 files changed, 213 insertions, 64 deletions
diff --git a/src/char/int_rodex.c b/src/char/int_rodex.c
index c45c88eb0..994e8110e 100644
--- a/src/char/int_rodex.c
+++ b/src/char/int_rodex.c
@@ -92,6 +92,19 @@ static int inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64
return -1;
}
break;
+
+ case RODEX_OPENTYPE_UNSET:
+ if (SQL_ERROR == SQL->StmtPrepare(stmt,
+ "SELECT `mail_id`, `sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `receiver_accountid`,"
+ "`title`, `body`, `zeny`, `type`, `is_read`, `send_date`, `expire_date`, `weight`"
+ "FROM `%s` WHERE `expire_date` > '%d' AND (`receiver_id` = '%d' or `receiver_accountid` = '%d') AND `mail_id` > '%"PRId64"'"
+ "ORDER BY `mail_id` ASC", rodex_db, (int)time(NULL), char_id, account_id, mail_id)
+ ) {
+ SqlStmt_ShowDebug(stmt);
+ SQL->StmtFree(stmt);
+ return -1;
+ }
+ break;
}
if (SQL_ERROR == SQL->StmtExecute(stmt)
@@ -173,7 +186,18 @@ static int inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64
msg.type &= ~MAIL_TYPE_ZENY;
}
+#if PACKETVER >= 20170419
+ if (opentype == RODEX_OPENTYPE_UNSET) {
+ if (msg.receiver_id != 0)
+ msg.opentype = RODEX_OPENTYPE_MAIL;
+ else
+ msg.opentype = RODEX_OPENTYPE_ACCOUNT;
+ } else {
+ msg.opentype = opentype;
+ }
+#else
msg.opentype = opentype;
+#endif
#if PACKETVER < 20160601
// NPC Message Type isn't supported in old clients
msg.type &= ~MAIL_TYPE_NPC;
diff --git a/src/common/mmo.h b/src/common/mmo.h
index fe67d6efb..84ed25e4c 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -276,7 +276,11 @@ STATIC_ASSERT(MAX_ITEM_OPTIONS <= 5, "This value is limited by the client and da
#define RODEX_BODY_LENGTH (500 + 1)
#define RODEX_MAX_ITEM (5)
#define RODEX_EXPIRE (1 * 15 * 24 * 60 * 60)
+#if PACKETVER >= 20170419
+#define RODEX_MAIL_PER_PAGE 32
+#else
#define RODEX_MAIL_PER_PAGE 7
+#endif
// The following system marks a different job ID system used by the map server,
// which makes a lot more sense than the normal one. [Skotlex]
@@ -851,6 +855,7 @@ enum rodex_opentype {
RODEX_OPENTYPE_MAIL = 0,
RODEX_OPENTYPE_ACCOUNT = 1,
RODEX_OPENTYPE_RETURN = 2,
+ RODEX_OPENTYPE_UNSET = 3,
};
enum MAIL_TYPE {
diff --git a/src/map/clif.c b/src/map/clif.c
index a17210cf4..088c92ea8 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -19470,8 +19470,9 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
packet = WFIFOP(fd, 0);
packet->PacketType = ((page_start == (VECTOR_LENGTH(sd->rodex.messages) - 1)) ? rodexmailList : rodexnextpage);
+#if PACKETVER < 20170419
packet->opentype = open_type;
-
+#endif
inner = WFIFOP(fd, size);
while (page_start >= 0 && count < RODEX_MAIL_PER_PAGE) {
@@ -19484,7 +19485,11 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
inner->MailID = msg->id;
inner->Isread = msg->is_read == true ? 1 : 0;
inner->type = msg->type;
+#if PACKETVER >= 20170419
+ inner->openType = msg->opentype;
+#else
inner->regDateTime = (int)time(NULL) - msg->send_date;
+#endif
inner->expireDateTime = msg->expire_date - (int)time(NULL);
if (open_type == RODEX_OPENTYPE_RETURN) {
inner->expireDateTime += RODEX_EXPIRE;
@@ -19502,12 +19507,80 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
}
packet->PacketLength = size;
+#if PACKETVER < 20170419
packet->cnt = count;
+#endif
packet->IsEnd = page_start > 0 ? 0 : 1;
WFIFOSET(fd, size);
#endif
}
+void clif_rodex_send_mails_all(int fd, struct map_session_data *sd)
+{
+#if PACKETVER >= 20170419
+ struct PACKET_ZC_MAIL_LIST *packet;
+ struct maillistinfo *inner;
+ int16 size = sizeof(*packet);
+ int packetMailCount = 0;
+ int mailListCount = 0;
+ int mailsSize = VECTOR_LENGTH(sd->rodex.messages);
+ int i;
+
+ nullpo_retv(sd);
+
+ WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
+ packet = WFIFOP(fd, 0);
+ packet->PacketType = rodexmailList;
+ inner = WFIFOP(fd, size);
+
+ i = mailsSize - 1;
+ while (i >= 0) {
+ struct rodex_message *msg = &VECTOR_INDEX(sd->rodex.messages, i);
+ --i;
+
+ if (msg->is_deleted)
+ continue;
+
+ inner->MailID = msg->id;
+ inner->Isread = msg->is_read == true ? 1 : 0;
+ inner->type = msg->type;
+ inner->openType = msg->opentype;
+ inner->expireDateTime = msg->expire_date - (int)time(NULL);
+ if (msg->opentype == RODEX_OPENTYPE_RETURN) {
+ inner->expireDateTime += RODEX_EXPIRE;
+ }
+ inner->Titlelength = (int16)strlen(msg->title) + 1;
+ if (msg->opentype != RODEX_OPENTYPE_RETURN) {
+ strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name));
+ } else {
+ strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name));
+ }
+ strncpy(inner->title, msg->title, inner->Titlelength);
+ size += sizeof(*inner) + inner->Titlelength;
+ inner = WFIFOP(fd, size);
+ packetMailCount ++;
+ mailListCount ++;
+ if (packetMailCount == RODEX_MAIL_PER_PAGE) {
+ packet->PacketLength = size;
+ packet->IsEnd = mailListCount > mailsSize ? 1 : 0;
+ WFIFOSET(fd, size);
+ WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
+ packet = WFIFOP(fd, 0);
+ packet->PacketType = rodexmailList;
+ size = sizeof(*packet);
+ inner = WFIFOP(fd, size);
+ packetMailCount = 0;
+ }
+ }
+
+ if (packetMailCount > 0 || mailListCount == 0) {
+ packet->PacketLength = size;
+ packet->IsEnd = 1;
+ WFIFOSET(fd, size);
+ }
+#endif
+}
+
void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type, int count)
{
#if PACKETVER >= 20131218
@@ -19521,8 +19594,9 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
packet = WFIFOP(fd, 0);
packet->PacketType = rodexmailList;
+#if PACKETVER < 20170419
packet->opentype = open_type;
-
+#endif
inner = WFIFOP(fd, size);
i = VECTOR_LENGTH(sd->rodex.messages) - 1;
@@ -19537,7 +19611,11 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
inner->MailID = msg->id;
inner->Isread = msg->is_read == true ? 1 : 0;
inner->type = msg->type;
+#if PACKETVER >= 20170419
+ inner->openType = msg->opentype;
+#else
inner->regDateTime = (int)time(NULL) - msg->send_date;
+#endif
inner->expireDateTime = msg->expire_date - (int)time(NULL);
if (open_type == RODEX_OPENTYPE_RETURN) {
inner->expireDateTime += RODEX_EXPIRE;
@@ -19555,7 +19633,9 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
}
packet->PacketLength = size;
+#if PACKETVER < 20170419
packet->cnt = count;
+#endif
packet->IsEnd = 1;
WFIFOSET(fd, size);
#endif
@@ -19730,14 +19810,22 @@ void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) __at
void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_REFRESH_MAIL_LIST *packet = RFIFOP(fd, 0);
+#if PACKETVER >= 20170419
+ rodex->refresh(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID);
+#else
rodex->refresh(sd, packet->opentype, packet->Upper_MailID);
+#endif
}
void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_OPEN_MAIL *packet = RFIFOP(fd, 0);
- rodex->open(sd, packet->opentype);
+#if PACKETVER >= 20170419
+ rodex->open(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID);
+#else
+ rodex->open(sd, packet->opentype, packet->Upper_MailID);
+#endif
rodex->clean(sd, 1);
}
@@ -20822,4 +20910,5 @@ void clif_defaults(void) {
clif->pRodexRequestItems = clif_parse_rodex_request_items;
clif->rodex_request_items = clif_rodex_request_items;
clif->rodex_icon = clif_rodex_icon;
+ clif->rodex_send_mails_all = clif_rodex_send_mails_all;
}
diff --git a/src/map/clif.h b/src/map/clif.h
index be7bdd2d6..851c823ea 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1378,6 +1378,7 @@ struct clif_interface {
void (*rodex_send_mail_result) (int fd, struct map_session_data *sd, int8 result);
void (*rodex_send_maillist) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start);
void (*rodex_send_refresh) (int fd, struct map_session_data *sd, int8 open_type, int count);
+ void (*rodex_send_mails_all) (int fd, struct map_session_data *sd);
void (*pRodexReadMail) (int fd, struct map_session_data *sd);
void (*rodex_read_mail) (struct map_session_data *sd, int8 opentype, struct rodex_message *msg);
void (*pRodexNextMaillist) (int fd, struct map_session_data *sd);
diff --git a/src/map/intif.c b/src/map/intif.c
index 1458fc710..60edc8d8b 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -2433,7 +2433,9 @@ int intif_rodex_requestinbox(int char_id, int account_id, int8 flag, int8 openty
void intif_parse_RequestRodexOpenInbox(int fd)
{
struct map_session_data *sd;
+#if PACKETVER < 20170419
int8 opentype = RFIFOB(fd, 8);
+#endif
int8 flag = RFIFOB(fd, 9);
int8 is_end = RFIFOB(fd, 10);
int count = RFIFOL(fd, 11);
@@ -2461,10 +2463,14 @@ void intif_parse_RequestRodexOpenInbox(int fd)
}
if (is_end == true) {
+#if PACKETVER >= 20170419
+ clif->rodex_send_mails_all(sd->fd, sd);
+#else
if (flag == 0)
clif->rodex_send_maillist(sd->fd, sd, opentype, VECTOR_LENGTH(sd->rodex.messages) - 1);
else
clif->rodex_send_refresh(sd->fd, sd, opentype, count);
+#endif
}
}
diff --git a/src/map/packets.h b/src/map/packets.h
index 358b1ff25..e9d895440 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -9476,8 +9476,8 @@ packet(0x96e,-1,clif->ackmergeitems);
// 2017-02-28aRagexeRE
#if PACKETVER >= 20170228
// new packets
- packet(0x0ac0,26);
- packet(0x0ac1,26);
+ packet(0x0ac0,26,clif->pRodexOpenMailbox); // CZ_OPEN_RODEXBOX
+ packet(0x0ac1,26,clif->pRodexRefreshMaillist); // CZ_REQ_REFRESH_RODEX
packet(0x0ac2,-1);
packet(0x0ac3,2);
packet(0x0ac4,-1);
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 207c345da..03b555e2b 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -318,10 +318,12 @@ enum packet_headers {
rodexadditem = 0x0A05,
rodexremoveitem = 0x0A07,
rodexopenwrite = 0x0A12,
-#if PACKETVER < 20160600
+#if PACKETVER < 20160601
rodexmailList = 0x09F0,
-#else // PACKETVER >= 20160600
+#elif PACKETVER < 20170419
rodexmailList = 0x0A7D,
+#else // PACKETVER >= 20170419
+ rodexmailList = 0x0Ac2,
#endif
#if PACKETVER < 20160316
rodexcheckplayer = 0x0A14,
@@ -1369,11 +1371,16 @@ struct PACKET_ZC_NOTIFY_UNREADMAIL {
} __attribute__((packed));
struct maillistinfo {
+#if PACKETVER >= 20170419
+ uint8 openType;
+#endif
int64 MailID;
int8 Isread;
uint8 type;
char SenderName[24];
+#if PACKETVER < 20170419
int32 regDateTime;
+#endif
int32 expireDateTime;
int16 Titlelength;
char title[];
@@ -1382,8 +1389,10 @@ struct maillistinfo {
struct PACKET_ZC_MAIL_LIST {
int16 PacketType;
int16 PacketLength;
+#if PACKETVER < 20170419
int8 opentype;
int8 cnt;
+#endif
int8 IsEnd;
} __attribute__((packed));
@@ -1395,8 +1404,13 @@ struct PACKET_CZ_REQ_NEXT_MAIL_LIST {
struct PACKET_CZ_REQ_OPEN_MAIL {
int16 PacketType;
+#if PACKETVER >= 20170419
+ int64 Upper_MailID;
+ int8 unknown[16];
+#else
int8 opentype;
int64 Upper_MailID;
+#endif
} __attribute__((packed));
struct PACKET_CZ_REQ_READ_MAIL {
@@ -1429,8 +1443,13 @@ struct PACKET_ZC_ACK_DELETE_MAIL {
struct PACKET_CZ_REQ_REFRESH_MAIL_LIST {
int16 PacketType;
+#if PACKETVER >= 20170419
+ int64 Upper_MailID;
+ int8 unknown[16];
+#else
int8 opentype;
int64 Upper_MailID;
+#endif
} __attribute__((packed));
struct PACKET_CZ_REQ_ZENY_FROM_MAIL {
diff --git a/src/map/rodex.c b/src/map/rodex.c
index 63d7242db..dcecb6b8f 100644
--- a/src/map/rodex.c
+++ b/src/map/rodex.c
@@ -547,13 +547,18 @@ void rodex_clean(struct map_session_data *sd, int8 flag)
/// User request to open rodex, load mails from char-server
/// @param sd : Who's requesting
/// @param open_type : Box Type (see RODEX_OPENTYPE)
-void rodex_open(struct map_session_data *sd, int8 open_type)
+void rodex_open(struct map_session_data *sd, int8 open_type, int64 first_mail_id)
{
+#if PACKETVER >= 20170419
+ const int type = 1;
+#else
+ const int type = 0;
+#endif
nullpo_retv(sd);
if (open_type == RODEX_OPENTYPE_ACCOUNT && battle_config.feature_rodex_use_accountmail == false)
open_type = RODEX_OPENTYPE_MAIL;
- intif->rodex_requestinbox(sd->status.char_id, sd->status.account_id, 0, open_type, 0);
+ intif->rodex_requestinbox(sd->status.char_id, sd->status.account_id, type, open_type, first_mail_id);
}
/// User request to read next page of mails
@@ -568,7 +573,7 @@ void rodex_next_page(struct map_session_data *sd, int8 open_type, int64 last_mai
if (open_type == RODEX_OPENTYPE_ACCOUNT && battle_config.feature_rodex_use_accountmail == false) {
// Should not happen
open_type = RODEX_OPENTYPE_MAIL;
- rodex->open(sd, open_type);
+ rodex->open(sd, open_type, 0);
return;
}
diff --git a/src/map/rodex.h b/src/map/rodex.h
index 18ecd91d6..ddf7cb32b 100644
--- a/src/map/rodex.h
+++ b/src/map/rodex.h
@@ -60,7 +60,7 @@ struct rodex_interface {
void (*final) (void);
bool (*isenabled) (void);
- void (*open) (struct map_session_data *sd, int8 open_type);
+ void (*open) (struct map_session_data *sd, int8 open_type, int64 first_mail_id);
void (*next_page) (struct map_session_data *sd, int8 open_type, int64 last_mail_id);
void (*refresh) (struct map_session_data *sd, int8 open_type, int64 first_mail_id);
void (*add_item) (struct map_session_data *sd, int16 idx, int16 amount);
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index cbd11e1b8..8f6bd1371 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1180,8 +1180,8 @@ typedef void (*HPMHOOK_pre_clif_viewequip_ack) (struct map_session_data **sd, st
typedef void (*HPMHOOK_post_clif_viewequip_ack) (struct map_session_data *sd, struct map_session_data *tsd);
typedef void (*HPMHOOK_pre_clif_equpcheckbox) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_equpcheckbox) (struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, unsigned int *exp, char *type, bool *is_quest);
-typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest);
+typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest);
+typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest);
typedef void (*HPMHOOK_pre_clif_font) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_font) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_progressbar) (struct map_session_data **sd, unsigned int *color, unsigned int *second);
@@ -2508,8 +2508,8 @@ typedef int (*HPMHOOK_pre_guild_getindex) (const struct guild **g, int *account_
typedef int (*HPMHOOK_post_guild_getindex) (int retVal___, const struct guild *g, int account_id, int char_id);
typedef int (*HPMHOOK_pre_guild_getposition) (struct guild **g, struct map_session_data **sd);
typedef int (*HPMHOOK_post_guild_getposition) (int retVal___, struct guild *g, struct map_session_data *sd);
-typedef unsigned int (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, unsigned int *exp);
-typedef unsigned int (*HPMHOOK_post_guild_payexp) (unsigned int retVal___, struct map_session_data *sd, unsigned int exp);
+typedef uint64 (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, uint64 *exp);
+typedef uint64 (*HPMHOOK_post_guild_payexp) (uint64 retVal___, struct map_session_data *sd, uint64 exp);
typedef int (*HPMHOOK_pre_guild_getexp) (struct map_session_data **sd, int *exp);
typedef int (*HPMHOOK_post_guild_getexp) (int retVal___, struct map_session_data *sd, int exp);
typedef int (*HPMHOOK_pre_guild_create) (struct map_session_data **sd, const char **name);
@@ -5418,16 +5418,16 @@ typedef int (*HPMHOOK_pre_pc_checkbaselevelup) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_checkbaselevelup) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_checkjoblevelup) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_checkjoblevelup) (int retVal___, struct map_session_data *sd);
-typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest);
-typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest);
-typedef unsigned int (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd);
-typedef unsigned int (*HPMHOOK_post_pc_nextbaseexp) (unsigned int retVal___, const struct map_session_data *sd);
-typedef unsigned int (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd);
-typedef unsigned int (*HPMHOOK_post_pc_thisbaseexp) (unsigned int retVal___, const struct map_session_data *sd);
-typedef unsigned int (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd);
-typedef unsigned int (*HPMHOOK_post_pc_nextjobexp) (unsigned int retVal___, const struct map_session_data *sd);
-typedef unsigned int (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd);
-typedef unsigned int (*HPMHOOK_post_pc_thisjobexp) (unsigned int retVal___, const struct map_session_data *sd);
+typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest);
+typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest);
+typedef uint64 (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd);
+typedef uint64 (*HPMHOOK_post_pc_nextbaseexp) (uint64 retVal___, const struct map_session_data *sd);
+typedef uint64 (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd);
+typedef uint64 (*HPMHOOK_post_pc_thisbaseexp) (uint64 retVal___, const struct map_session_data *sd);
+typedef uint64 (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd);
+typedef uint64 (*HPMHOOK_post_pc_nextjobexp) (uint64 retVal___, const struct map_session_data *sd);
+typedef uint64 (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd);
+typedef uint64 (*HPMHOOK_post_pc_thisjobexp) (uint64 retVal___, const struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_gets_status_point) (int *level);
typedef int (*HPMHOOK_post_pc_gets_status_point) (int retVal___, int level);
typedef int (*HPMHOOK_pre_pc_need_status_point) (struct map_session_data **sd, int *type, int *val);
@@ -5634,8 +5634,8 @@ typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill **
typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target);
typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate);
typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate);
-typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, unsigned int **base_exp, unsigned int **job_exp, struct block_list **src);
-typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src);
+typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src);
+typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src);
typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_pc_respawn_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef int (*HPMHOOK_pre_pc_jobchange_killclone) (struct block_list **bl, va_list ap);
@@ -5892,8 +5892,8 @@ typedef void (*HPMHOOK_pre_rodex_final) (void);
typedef void (*HPMHOOK_post_rodex_final) (void);
typedef bool (*HPMHOOK_pre_rodex_isenabled) (void);
typedef bool (*HPMHOOK_post_rodex_isenabled) (bool retVal___);
-typedef void (*HPMHOOK_pre_rodex_open) (struct map_session_data **sd, int8 *open_type);
-typedef void (*HPMHOOK_post_rodex_open) (struct map_session_data *sd, int8 open_type);
+typedef void (*HPMHOOK_pre_rodex_open) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id);
+typedef void (*HPMHOOK_post_rodex_open) (struct map_session_data *sd, int8 open_type, int64 first_mail_id);
typedef void (*HPMHOOK_pre_rodex_next_page) (struct map_session_data **sd, int8 *open_type, int64 *last_mail_id);
typedef void (*HPMHOOK_post_rodex_next_page) (struct map_session_data *sd, int8 open_type, int64 last_mail_id);
typedef void (*HPMHOOK_pre_rodex_refresh) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 786536aea..d7247fcff 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -10602,10 +10602,10 @@ void HP_clif_equpcheckbox(struct map_session_data *sd) {
}
return;
}
-void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) {
+void HP_clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is_quest) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_displayexp_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, unsigned int *exp, char *type, bool *is_quest);
+ void (*preHookFunc) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_displayexp_pre[hIndex].func;
@@ -10620,7 +10620,7 @@ void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type
HPMHooks.source.clif.displayexp(sd, exp, type, is_quest);
}
if (HPMHooks.count.HP_clif_displayexp_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest);
+ void (*postHookFunc) (struct map_session_data *sd, uint64 exp, char type, bool is_quest);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_displayexp_post[hIndex].func;
postHookFunc(sd, exp, type, is_quest);
@@ -27645,11 +27645,11 @@ int HP_guild_getposition(struct guild *g, struct map_session_data *sd) {
}
return retVal___;
}
-unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) {
+uint64 HP_guild_payexp(struct map_session_data *sd, uint64 exp) {
int hIndex = 0;
- unsigned int retVal___ = 0;
+ uint64 retVal___ = 0;
if (HPMHooks.count.HP_guild_payexp_pre > 0) {
- unsigned int (*preHookFunc) (struct map_session_data **sd, unsigned int *exp);
+ uint64 (*preHookFunc) (struct map_session_data **sd, uint64 *exp);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_guild_payexp_pre[hIndex].func;
@@ -27664,7 +27664,7 @@ unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) {
retVal___ = HPMHooks.source.guild.payexp(sd, exp);
}
if (HPMHooks.count.HP_guild_payexp_post > 0) {
- unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, unsigned int exp);
+ uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd, uint64 exp);
for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_guild_payexp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, exp);
@@ -55930,11 +55930,11 @@ int HP_pc_checkjoblevelup(struct map_session_data *sd) {
}
return retVal___;
}
-bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) {
+bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_pc_gainexp_pre > 0) {
- bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest);
+ bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func;
@@ -55949,7 +55949,7 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned
retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest);
}
if (HPMHooks.count.HP_pc_gainexp_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, src, base_exp, job_exp, is_quest);
@@ -55957,11 +55957,11 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned
}
return retVal___;
}
-unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) {
+uint64 HP_pc_nextbaseexp(const struct map_session_data *sd) {
int hIndex = 0;
- unsigned int retVal___ = 0;
+ uint64 retVal___ = 0;
if (HPMHooks.count.HP_pc_nextbaseexp_pre > 0) {
- unsigned int (*preHookFunc) (const struct map_session_data **sd);
+ uint64 (*preHookFunc) (const struct map_session_data **sd);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func;
@@ -55976,7 +55976,7 @@ unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) {
retVal___ = HPMHooks.source.pc.nextbaseexp(sd);
}
if (HPMHooks.count.HP_pc_nextbaseexp_post > 0) {
- unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd);
+ uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_nextbaseexp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd);
@@ -55984,11 +55984,11 @@ unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) {
}
return retVal___;
}
-unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) {
+uint64 HP_pc_thisbaseexp(const struct map_session_data *sd) {
int hIndex = 0;
- unsigned int retVal___ = 0;
+ uint64 retVal___ = 0;
if (HPMHooks.count.HP_pc_thisbaseexp_pre > 0) {
- unsigned int (*preHookFunc) (const struct map_session_data **sd);
+ uint64 (*preHookFunc) (const struct map_session_data **sd);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func;
@@ -56003,7 +56003,7 @@ unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) {
retVal___ = HPMHooks.source.pc.thisbaseexp(sd);
}
if (HPMHooks.count.HP_pc_thisbaseexp_post > 0) {
- unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd);
+ uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_thisbaseexp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd);
@@ -56011,11 +56011,11 @@ unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) {
}
return retVal___;
}
-unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) {
+uint64 HP_pc_nextjobexp(const struct map_session_data *sd) {
int hIndex = 0;
- unsigned int retVal___ = 0;
+ uint64 retVal___ = 0;
if (HPMHooks.count.HP_pc_nextjobexp_pre > 0) {
- unsigned int (*preHookFunc) (const struct map_session_data **sd);
+ uint64 (*preHookFunc) (const struct map_session_data **sd);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func;
@@ -56030,7 +56030,7 @@ unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) {
retVal___ = HPMHooks.source.pc.nextjobexp(sd);
}
if (HPMHooks.count.HP_pc_nextjobexp_post > 0) {
- unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd);
+ uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_nextjobexp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd);
@@ -56038,11 +56038,11 @@ unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) {
}
return retVal___;
}
-unsigned int HP_pc_thisjobexp(const struct map_session_data *sd) {
+uint64 HP_pc_thisjobexp(const struct map_session_data *sd) {
int hIndex = 0;
- unsigned int retVal___ = 0;
+ uint64 retVal___ = 0;
if (HPMHooks.count.HP_pc_thisjobexp_pre > 0) {
- unsigned int (*preHookFunc) (const struct map_session_data **sd);
+ uint64 (*preHookFunc) (const struct map_session_data **sd);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func;
@@ -56057,7 +56057,7 @@ unsigned int HP_pc_thisjobexp(const struct map_session_data *sd) {
retVal___ = HPMHooks.source.pc.thisjobexp(sd);
}
if (HPMHooks.count.HP_pc_thisjobexp_post > 0) {
- unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd);
+ uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_thisjobexp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd);
@@ -58826,10 +58826,10 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, sh
}
return retVal___;
}
-void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) {
+void HP_pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src) {
int hIndex = 0;
if (HPMHooks.count.HP_pc_calcexp_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, unsigned int **base_exp, unsigned int **job_exp, struct block_list **src);
+ void (*preHookFunc) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func;
@@ -58844,7 +58844,7 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned
HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src);
}
if (HPMHooks.count.HP_pc_calcexp_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src);
+ void (*postHookFunc) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_calcexp_post[hIndex].func;
postHookFunc(sd, base_exp, job_exp, src);
@@ -61893,14 +61893,14 @@ bool HP_rodex_isenabled(void) {
}
return retVal___;
}
-void HP_rodex_open(struct map_session_data *sd, int8 open_type) {
+void HP_rodex_open(struct map_session_data *sd, int8 open_type, int64 first_mail_id) {
int hIndex = 0;
if (HPMHooks.count.HP_rodex_open_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int8 *open_type);
+ void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_rodex_open_pre[hIndex].func;
- preHookFunc(&sd, &open_type);
+ preHookFunc(&sd, &open_type, &first_mail_id);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -61908,13 +61908,13 @@ void HP_rodex_open(struct map_session_data *sd, int8 open_type) {
}
}
{
- HPMHooks.source.rodex.open(sd, open_type);
+ HPMHooks.source.rodex.open(sd, open_type, first_mail_id);
}
if (HPMHooks.count.HP_rodex_open_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int8 open_type);
+ void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 first_mail_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_rodex_open_post[hIndex].func;
- postHookFunc(sd, open_type);
+ postHookFunc(sd, open_type, first_mail_id);
}
}
return;