diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-26 13:28:35 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-26 13:28:35 +0000 |
commit | 5cc5c903df7b535c6bf27987b89a405812d89735 (patch) | |
tree | f6055dd2a3beb0ba4c057ed591d18b0441141b04 /src/net/beinghandler.cpp | |
parent | 15b008dd95252fea93d84d5bfbfa3862c267c50e (diff) | |
download | mana-client-5cc5c903df7b535c6bf27987b89a405812d89735.tar.gz mana-client-5cc5c903df7b535c6bf27987b89a405812d89735.tar.bz2 mana-client-5cc5c903df7b535c6bf27987b89a405812d89735.tar.xz mana-client-5cc5c903df7b535c6bf27987b89a405812d89735.zip |
Implemented "say around" chat.
Diffstat (limited to 'src/net/beinghandler.cpp')
-rw-r--r-- | src/net/beinghandler.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index ed0fc4b2..10de5351 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -383,17 +383,22 @@ void BeingHandler::handleMessage(MessageIn &msg) void BeingHandler::handleBeingEnterMessage(MessageIn &msg) { - // Not sure what do to exactly with this message yet. - /* - unsigned char type = msg.readByte(); - unsigned long id = msg.readLong(); - - if (type == OBJECT_PLAYER) + msg.readByte(); // type + int id = msg.readLong(); + std::string name = msg.readString(); + Being *being; + if (player_node->getName() == name) + { + being = player_node; + being->setId(id); + } + else { - std::string name = msg.readString(); - unsigned char hairStyle = msg.readByte(); - unsigned char hairColor = msg.readByte(); - unsigned char gender = msg.readByte(); + // assume type is player for now, so job 0, TODO + being = beingManager->createBeing(id, 0); + being->setName(name); } - */ + being->setHairStyle(msg.readByte() + 1); + being->setHairColor(msg.readByte() + 1); + being->setSex(msg.readByte()); } |