From 87c59212f8590a8dd72fac3e320fcb2ada781355 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 May 2014 19:28:57 +0300 Subject: Move player attributes into separate file. --- src/net/tmwa/charserverhandler.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/net/tmwa/charserverhandler.cpp') diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index c4fc9001c..7bd057231 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -25,6 +25,8 @@ #include "client.h" #include "configuration.h" +#include "being/attributes.h" + #include "net/logindata.h" #include "net/net.h" @@ -132,8 +134,8 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, tempPlayer->setGender(token.sex); PlayerInfoBackend &data = character->data; - data.mAttributes[PlayerInfo::EXP] = msg.readInt32(); - data.mAttributes[PlayerInfo::MONEY] = msg.readInt32(); + data.mAttributes[Attributes::EXP] = msg.readInt32(); + data.mAttributes[Attributes::MONEY] = msg.readInt32(); Stat &jobStat = data.mStats[static_cast(JOB)]; jobStat.exp = msg.readInt32(); @@ -151,10 +153,10 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, msg.readInt32(); // manner msg.readInt16(); // character points left - data.mAttributes[PlayerInfo::HP] = msg.readInt16(); - data.mAttributes[PlayerInfo::MAX_HP] = msg.readInt16(); - data.mAttributes[PlayerInfo::MP] = msg.readInt16(); - data.mAttributes[PlayerInfo::MAX_MP] = msg.readInt16(); + data.mAttributes[Attributes::HP] = msg.readInt16(); + data.mAttributes[Attributes::MAX_HP] = msg.readInt16(); + data.mAttributes[Attributes::MP] = msg.readInt16(); + data.mAttributes[Attributes::MAX_MP] = msg.readInt16(); msg.readInt16(); // speed const uint16_t race = msg.readInt16(); // class (used for race) @@ -164,7 +166,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, const uint16_t weapon = msg.readInt16(); // unused on server. need use? tempPlayer->setSprite(SPRITE_WEAPON, weapon, "", 1, true); - data.mAttributes[PlayerInfo::LEVEL] = msg.readInt16(); + data.mAttributes[Attributes::LEVEL] = msg.readInt16(); msg.readInt16(); // skill point const int bottomClothes = msg.readInt16(); -- cgit v1.2.3-70-g09d2