diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-25 19:31:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-25 19:31:40 +0300 |
commit | dbc13a3ad21d1b026eb42ef405e6ab441922de61 (patch) | |
tree | 1807403e53e93798d66dba4836c5c216e8a9010a /src | |
parent | e15a159cc7095f2cec5e3b2fb11958aa02a8a713 (diff) | |
download | manaverse-dbc13a3ad21d1b026eb42ef405e6ab441922de61.tar.gz manaverse-dbc13a3ad21d1b026eb42ef405e6ab441922de61.tar.bz2 manaverse-dbc13a3ad21d1b026eb42ef405e6ab441922de61.tar.xz manaverse-dbc13a3ad21d1b026eb42ef405e6ab441922de61.zip |
Add support for char server packets for packet version >= 20170830.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/charserverrecv.cpp | 10 |
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; |