summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-25 19:31:40 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-25 19:31:40 +0300
commitdbc13a3ad21d1b026eb42ef405e6ab441922de61 (patch)
tree1807403e53e93798d66dba4836c5c216e8a9010a /src/net
parente15a159cc7095f2cec5e3b2fb11958aa02a8a713 (diff)
downloadmanaplus-dbc13a3ad21d1b026eb42ef405e6ab441922de61.tar.gz
manaplus-dbc13a3ad21d1b026eb42ef405e6ab441922de61.tar.bz2
manaplus-dbc13a3ad21d1b026eb42ef405e6ab441922de61.tar.xz
manaplus-dbc13a3ad21d1b026eb42ef405e6ab441922de61.zip
Add support for char server packets for packet version >= 20170830.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/charserverrecv.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp
index 487e148bd..9aea7602e 100644
--- a/src/net/eathena/charserverrecv.cpp
+++ b/src/net/eathena/charserverrecv.cpp
@@ -86,10 +86,16 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
tempPlayer->setGender(token.sex);
PlayerInfoBackend &data = character->data;
- data.mAttributes[Attributes::PLAYER_EXP] = msg.readInt32("exp");
+ if (packetVersion >= 20170830)
+ data.mAttributes[Attributes::PLAYER_EXP] = msg.readInt64("exp");
+ else
+ data.mAttributes[Attributes::PLAYER_EXP] = msg.readInt32("exp");
data.mAttributes[Attributes::MONEY] = msg.readInt32("money");
Stat &jobStat = data.mStats[Attributes::PLAYER_JOB];
- jobStat.exp = msg.readInt32("job");
+ if (packetVersion >= 20170830)
+ jobStat.exp = msg.readInt64("job exp");
+ else
+ jobStat.exp = msg.readInt32("job exp");
const int temp = msg.readInt32("job level");
jobStat.base = temp;