diff options
Diffstat (limited to 'src/net/tmwa/charserverhandler.cpp')
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 21 |
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(); |