summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-08-13 18:59:02 +0200
committerGitHub <noreply@github.com>2017-08-13 18:59:02 +0200
commitd4c60857823a4782f349f2967315c7ad58d09711 (patch)
tree80bcdb3fa2167423b9bb376a9c8eb14f4dc13f67 /src/map
parent00db1dd28778180603098b56cbf0fa12b58df4bb (diff)
parent3d3642ed7a5e698ab9363b2bc9e0aff53d9c15af (diff)
downloadhercules-d4c60857823a4782f349f2967315c7ad58d09711.tar.gz
hercules-d4c60857823a4782f349f2967315c7ad58d09711.tar.bz2
hercules-d4c60857823a4782f349f2967315c7ad58d09711.tar.xz
hercules-d4c60857823a4782f349f2967315c7ad58d09711.zip
Merge pull request #1819 from 4144/rodexfixes
Fix some wrong packet versions in rodex code.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 90813bd40..28b20c9e2 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -19266,7 +19266,7 @@ void clif_parse_rodex_add_item(int fd, struct map_session_data *sd)
void clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, int8 result)
{
-#if PACKETVER >= 20140416
+#if PACKETVER >= 20141119
struct PACKET_ZC_ADD_ITEM_TO_MAIL *packet;
int fd, j;
@@ -19428,7 +19428,7 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
nullpo_retv(sd);
- WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * 7);
+ 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);
packet->opentype = open_type;
@@ -19479,7 +19479,7 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
nullpo_retv(sd);
- WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * 7);
+ WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
packet = WFIFOP(fd, 0);
packet->PacketType = rodexmailList;
packet->opentype = open_type;
@@ -19540,7 +19540,7 @@ void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd)
void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rodex_message *msg)
{
-#if PACKETVER >= 20131223
+#if PACKETVER >= 20140115
struct PACKET_ZC_READ_MAIL *sPacket;
struct mail_item *item;
int fd, i, body_len, size;
@@ -19678,7 +19678,8 @@ void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64
void clif_rodex_icon(int fd, bool show)
{
-#if PACKETVER >= 20140716
+// packet add date is 20140716, but from players reports it wrong. Using closer known correct version.
+#if PACKETVER >= 20150513
WFIFOHEAD(fd, 3);
WFIFOW(fd, 0) = rodexicon;
WFIFOB(fd, 2) = (show == true ? 1 : 0);