From 9429dc4f5b5b6102a8b575de25ce5d8e7170551f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 27 Sep 2017 22:35:38 +0300 Subject: Change player job level, exp from stat object to attribute. --- src/net/eathena/charserverrecv.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/net/eathena/charserverrecv.cpp') diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp index 3178a6d5f..f60fb1ff0 100644 --- a/src/net/eathena/charserverrecv.cpp +++ b/src/net/eathena/charserverrecv.cpp @@ -91,15 +91,17 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg, else data.mAttributes[Attributes::PLAYER_EXP] = msg.readInt32("exp"); data.mAttributes[Attributes::MONEY] = msg.readInt32("money"); - Stat &jobStat = data.mStats[Attributes::PLAYER_JOB]; if (packetVersion >= 20170830) - jobStat.exp = msg.readInt64("job exp"); + { + data.mAttributes[Attributes::PLAYER_JOB_EXP] = + msg.readInt64("job exp"); + } else - jobStat.exp = msg.readInt32("job exp"); - - const int temp = msg.readInt32("job level"); - jobStat.base = temp; - jobStat.mod = temp; + { + data.mAttributes[Attributes::PLAYER_JOB_EXP] = + msg.readInt32("job exp"); + } + data.mAttributes[Attributes::PLAYER_JOB] =msg.readInt32("job level"); msg.readInt16("shoes?"); const int gloves = msg.readInt16("gloves"); -- cgit v1.2.3-60-g2f50