summaryrefslogtreecommitdiff
path: root/src/net/eathena/guildhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/guildhandler.cpp')
-rw-r--r--src/net/eathena/guildhandler.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 3da443dda..9d5e15f48 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -34,6 +34,7 @@
#include "debug.h"
extern Net::GuildHandler *guildHandler;
+extern int packetVersion;
namespace EAthena
{
@@ -125,9 +126,17 @@ void GuildHandler::chat(const std::string &text) const
const std::string str = std::string(localPlayer->getName()).append(
" : ").append(text);
createOutPacket(CMSG_GUILD_MESSAGE);
- outMsg.writeInt16(CAST_U16(str.size() + 4 + 1), "len");
- outMsg.writeString(str, CAST_S32(str.length()), "message");
- outMsg.writeInt8(0, "zero byte");
+ if (packetVersion >= 20151001)
+ {
+ outMsg.writeInt16(CAST_U16(str.size() + 4), "len");
+ outMsg.writeString(str, CAST_S32(str.length()), "message");
+ }
+ else
+ {
+ outMsg.writeInt16(CAST_U16(str.size() + 4 + 1), "len");
+ outMsg.writeString(str, CAST_S32(str.length()), "message");
+ outMsg.writeInt8(0, "zero byte");
+ }
}
void GuildHandler::memberList() const