diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-03 17:10:43 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-03 17:10:43 +0000 |
commit | 1673de8b5553f6dcd4898c84b8d44ba8b30740f1 (patch) | |
tree | 3dcc47461a6b4914c4e81492e7be885c3a1502ea /src/game-server/accountconnection.cpp | |
parent | 6b7441516002d6e7cca424416bb67c6bc7d7c9d2 (diff) | |
download | manaserv-1673de8b5553f6dcd4898c84b8d44ba8b30740f1.tar.gz manaserv-1673de8b5553f6dcd4898c84b8d44ba8b30740f1.tar.xz manaserv-1673de8b5553f6dcd4898c84b8d44ba8b30740f1.zip |
Split persistent player data from game server data. Enabled inventory code back.
Diffstat (limited to 'src/game-server/accountconnection.cpp')
-rw-r--r-- | src/game-server/accountconnection.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game-server/accountconnection.cpp b/src/game-server/accountconnection.cpp index ceb0b5d..d536abf 100644 --- a/src/game-server/accountconnection.cpp +++ b/src/game-server/accountconnection.cpp @@ -23,10 +23,10 @@ #include "configuration.h" #include "defines.h" -#include "player.h" #include "game-server/accountconnection.hpp" #include "game-server/gamehandler.hpp" #include "game-server/mapmanager.hpp" +#include "game-server/player.hpp" #include "net/messagein.hpp" #include "net/messageout.hpp" #include "utils/logger.h" @@ -53,7 +53,7 @@ bool AccountConnection::start() return true; } -void AccountConnection::sendPlayerData(Player *p) +void AccountConnection::sendPlayerData(PlayerData *p) { MessageOut msg(GAMSG_PLAYER_DATA); msg.writeLong(p->getDatabaseID()); @@ -64,10 +64,10 @@ void AccountConnection::sendPlayerData(Player *p) msg.writeShort(p->getMoney()); for (int j = 0; j < NB_RSTAT; ++j) msg.writeShort(p->getRawStat(j)); - Point pos = p->getPosition(); + Point pos = p->getPos(); msg.writeShort(pos.x); msg.writeShort(pos.y); - msg.writeShort(p->getMapId()); + msg.writeShort(p->getMap()); send(msg); } @@ -80,7 +80,7 @@ void AccountConnection::processMessage(MessageIn &msg) int id = msg.readLong(); std::string name = msg.readString(); Player *ptr = new Player(name, id); - ptr->setGender((Gender)msg.readByte()); + ptr->setGender(msg.readByte()); ptr->setHairStyle(msg.readByte()); ptr->setHairColor(msg.readByte()); ptr->setLevel(msg.readByte()); |