summaryrefslogtreecommitdiff
path: root/src/net/eathena/partyhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-06 20:41:09 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-06 21:29:13 +0300
commitc41c0f6b4f1e848c202c378810c73fdb25dfe8ae (patch)
tree7558f1688f06d2594fba8e73b05351cb770edeff /src/net/eathena/partyhandler.cpp
parent3a3b35a15867bd56f6bcbe245282cd36d86678c3 (diff)
downloadmanaplus-c41c0f6b4f1e848c202c378810c73fdb25dfe8ae.tar.gz
manaplus-c41c0f6b4f1e848c202c378810c73fdb25dfe8ae.tar.bz2
manaplus-c41c0f6b4f1e848c202c378810c73fdb25dfe8ae.tar.xz
manaplus-c41c0f6b4f1e848c202c378810c73fdb25dfe8ae.zip
Add packet CMSG_PARTY_SETTINGS 0x07d7.
Diffstat (limited to 'src/net/eathena/partyhandler.cpp')
-rw-r--r--src/net/eathena/partyhandler.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index 3aa26b1b5..67a86c14c 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -37,6 +37,7 @@
#include "debug.h"
extern Net::PartyHandler *partyHandler;
+extern int packetVersion;
namespace EAthena
{
@@ -137,9 +138,16 @@ void PartyHandler::setShareExperience(const PartyShareT share) const
return;
createOutPacket(CMSG_PARTY_SETTINGS);
- outMsg.writeInt16(CAST_S16(share), "share exp");
- outMsg.writeInt16(CAST_S16(Ea::PartyRecv::mShareItems),
- "share items");
+ if (packetVersion >= 20090603)
+ {
+ outMsg.writeInt32(CAST_S32(share), "share exp");
+ outMsg.writeInt16(CAST_S16(Ea::PartyRecv::mShareItems),
+ "share items");
+ }
+ else
+ {
+ outMsg.writeInt32(CAST_S32(share), "share exp");
+ }
}
// +++ must be 3 types item, exp, pickup
@@ -149,9 +157,17 @@ void PartyHandler::setShareItems(const PartyShareT share) const
return;
createOutPacket(CMSG_PARTY_SETTINGS);
- outMsg.writeInt16(CAST_S16(Ea::PartyRecv::mShareExp),
- "share exp");
- outMsg.writeInt16(CAST_S16(share), "share items");
+ if (packetVersion >= 20090603)
+ {
+ outMsg.writeInt32(CAST_S32(Ea::PartyRecv::mShareExp),
+ "share exp");
+ outMsg.writeInt16(CAST_S16(share), "share items");
+ }
+ else
+ {
+// outMsg.writeInt32(CAST_S16(Ea::PartyRecv::mShareExp),
+// "share exp");
+ }
}
void PartyHandler::changeLeader(const std::string &name) const