summaryrefslogtreecommitdiff
path: root/src/net/eathena/charserverhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-11 19:28:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-11 19:28:57 +0300
commit87c59212f8590a8dd72fac3e320fcb2ada781355 (patch)
tree198d627c44f1164140659827a5c782d30bec375b /src/net/eathena/charserverhandler.cpp
parent02e91411eb9961e95f856bd717d6ca0d8ec0e435 (diff)
downloadmanaplus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.gz
manaplus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.bz2
manaplus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.xz
manaplus-87c59212f8590a8dd72fac3e320fcb2ada781355.zip
Move player attributes into separate file.
Diffstat (limited to 'src/net/eathena/charserverhandler.cpp')
-rw-r--r--src/net/eathena/charserverhandler.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index f24c984ed..fdcf2ed22 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -25,6 +25,8 @@
#include "client.h"
#include "configuration.h"
+#include "being/attributes.h"
+
#include "net/logindata.h"
#include "net/net.h"
@@ -129,8 +131,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[JOB];
jobStat.exp = msg.readInt32();
@@ -148,10 +150,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
tempPlayer->setSubtype(msg.readInt16(), 0); // class (used for race)
@@ -160,7 +162,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
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();