summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-10-30 21:59:54 +0300
committerAndrei Karas <akaras@inbox.ru>2018-11-07 06:27:59 +0300
commit6bf0cc3e848426169deb9cdbec0ee08f75000266 (patch)
tree7a4dfa56e4970f694b76299b5e2265d4c3f7d972
parent02293cef263fd93f8dc37bd14dd4eb319d46f88e (diff)
downloadhercules-6bf0cc3e848426169deb9cdbec0ee08f75000266.tar.gz
hercules-6bf0cc3e848426169deb9cdbec0ee08f75000266.tar.bz2
hercules-6bf0cc3e848426169deb9cdbec0ee08f75000266.tar.xz
hercules-6bf0cc3e848426169deb9cdbec0ee08f75000266.zip
Fix packet ZC_FORMATSTRING_MSG_COLOR for old clients.
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/packets_struct.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e86494cd1..985e0229f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9672,7 +9672,9 @@ static void clif_msgtable_str_color(struct map_session_data *sd, enum clif_messa
p->PacketType = 0xa6f;
p->PacketLength = len;
p->messageId = msg_id;
+#if PACKETVER >= 20160406
p->color = color;
+#endif
safestrncpy(p->messageString, value, message_len);
p->messageString[message_len] = 0;
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index a9affc76b..c2363ce08 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -1928,7 +1928,9 @@ struct PACKET_ZC_FORMATSTRING_MSG_COLOR {
uint16 PacketType;
uint16 PacketLength;
uint16 messageId;
+#if PACKETVER >= 20160406
uint32 color;
+#endif
char messageString[];
} __attribute__((packed));