summaryrefslogtreecommitdiff
path: root/src/net/tmwa/charserverhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-30 02:05:40 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-01 03:11:26 +0300
commita39f63cdfa5ce15b22f294a8bb1db3a036ce462d (patch)
tree4de71bde947cae0cf5d3196cd97e82f5bc537c5c /src/net/tmwa/charserverhandler.cpp
parent02ec4369acfbf261236631e20dbb76131e7889f8 (diff)
downloadmanaplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.gz
manaplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.bz2
manaplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.xz
manaplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.zip
One part of fixes after auto checking.
Diffstat (limited to 'src/net/tmwa/charserverhandler.cpp')
-rw-r--r--src/net/tmwa/charserverhandler.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 6202070bb..04274a70b 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -174,13 +174,14 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
LocalPlayer *tempPlayer = new LocalPlayer(msg.readInt32(), 0);
tempPlayer->setGender(token.sex);
- character->data.mAttributes[EXP] = msg.readInt32();
- character->data.mAttributes[MONEY] = msg.readInt32();
- character->data.mStats[JOB].exp = msg.readInt32();
+ PlayerInfoBackend &data = character->data;
+ data.mAttributes[EXP] = msg.readInt32();
+ data.mAttributes[MONEY] = msg.readInt32();
+ data.mStats[JOB].exp = msg.readInt32();
int temp = msg.readInt32();
- character->data.mStats[JOB].base = temp;
- character->data.mStats[JOB].mod = temp;
+ data.mStats[JOB].base = temp;
+ data.mStats[JOB].mod = temp;
int shoes = msg.readInt16();
int gloves = msg.readInt16();
@@ -192,10 +193,10 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
msg.readInt32(); // manner
msg.readInt16(); // character points left
- character->data.mAttributes[HP] = msg.readInt16();
- character->data.mAttributes[MAX_HP] = msg.readInt16();
- character->data.mAttributes[MP] = msg.readInt16();
- character->data.mAttributes[MAX_MP] = msg.readInt16();
+ data.mAttributes[HP] = msg.readInt16();
+ data.mAttributes[MAX_HP] = msg.readInt16();
+ data.mAttributes[MP] = msg.readInt16();
+ data.mAttributes[MAX_MP] = msg.readInt16();
msg.readInt16(); // speed
tempPlayer->setSubtype(msg.readInt16()); // class (used for race)
@@ -203,7 +204,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
Uint16 weapon = msg.readInt16(); // server not used it. may be need use?
tempPlayer->setSprite(SPRITE_WEAPON, weapon, "", 1, true);
- character->data.mAttributes[LEVEL] = msg.readInt16();
+ data.mAttributes[LEVEL] = msg.readInt16();
msg.readInt16(); // skill point
int bottomClothes = msg.readInt16();