summaryrefslogtreecommitdiff
path: root/src/net/eathena/partyhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-17 01:03:34 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-17 01:03:34 +0300
commit5d77b00cba5398482c4eb9422ae4f06ae3509b8f (patch)
treeea8c4b6a012d4c9e27e227621197330f8fc2eacd /src/net/eathena/partyhandler.cpp
parent0c5402def993b1df930cda7fcdaff4f865a84fdb (diff)
downloadplus-5d77b00cba5398482c4eb9422ae4f06ae3509b8f.tar.gz
plus-5d77b00cba5398482c4eb9422ae4f06ae3509b8f.tar.bz2
plus-5d77b00cba5398482c4eb9422ae4f06ae3509b8f.tar.xz
plus-5d77b00cba5398482c4eb9422ae4f06ae3509b8f.zip
Fix sending packets for version 20151001 and bigger.
Diffstat (limited to 'src/net/eathena/partyhandler.cpp')
-rw-r--r--src/net/eathena/partyhandler.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index 67a86c14c..7de6dcd9c 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -125,10 +125,17 @@ void PartyHandler::chat(const std::string &text) const
createOutPacket(CMSG_PARTY_MESSAGE);
const std::string mes = std::string(localPlayer->getName()).append(
" : ").append(text);
-
- outMsg.writeInt16(CAST_S16(mes.length() + 4 + 1), "len");
- outMsg.writeString(mes, CAST_S32(mes.length()), "nick : message");
- outMsg.writeInt8(0, "null char");
+ if (packetVersion >= 20151001)
+ {
+ outMsg.writeInt16(CAST_S16(mes.length() + 4), "len");
+ outMsg.writeString(mes, CAST_S32(mes.length()), "nick : message");
+ }
+ else
+ {
+ outMsg.writeInt16(CAST_S16(mes.length() + 4 + 1), "len");
+ outMsg.writeString(mes, CAST_S32(mes.length()), "nick : message");
+ outMsg.writeInt8(0, "null char");
+ }
}
// +++ must be 3 types item, exp, pickup