summaryrefslogtreecommitdiff
path: root/src/net/charserverhandler.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-03-22 23:10:27 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-03-22 23:10:27 +0000
commit346bb6d670d630d65f8c35125831c75d031aac7f (patch)
treec79877ea0d6b46ae748bf4a6d6d3969dc483f0a4 /src/net/charserverhandler.cpp
parent6f9a2e74958d794fb049253833b98982e915df45 (diff)
downloadmana-346bb6d670d630d65f8c35125831c75d031aac7f.tar.gz
mana-346bb6d670d630d65f8c35125831c75d031aac7f.tar.bz2
mana-346bb6d670d630d65f8c35125831c75d031aac7f.tar.xz
mana-346bb6d670d630d65f8c35125831c75d031aac7f.zip
Redesigned the localplayer class to use getters and setters instead of direct access to the member variables. Implemented communication of attributes between server and client.
Diffstat (limited to 'src/net/charserverhandler.cpp')
-rw-r--r--src/net/charserverhandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index ebc11bb3..34fc188d 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -202,10 +202,10 @@ CharServerHandler::readPlayerData(MessageIn &msg, int &slot)
tempPlayer->setSex(msg.readByte());
tempPlayer->setHairStyle(msg.readByte());
tempPlayer->setHairColor(msg.readByte());
- tempPlayer->mLevel = msg.readByte();
- tempPlayer->mMoney = msg.readShort();
- for (int i = 0; i < 6; i++) {
- tempPlayer->mAttr[i] = msg.readByte();
+ tempPlayer->setLevel(msg.readByte());
+ tempPlayer->setMoney(msg.readLong());
+ for (int i = 0; i < 7; i++) {
+ tempPlayer->setAttributeBase(i, msg.readByte());
}
return tempPlayer;
}