Implementing private messages in lobby chat, ticket #12. Some cosmetic improvements are still missing.

This commit is contained in:
lotodore
2011-02-11 23:02:29 +00:00
parent 02518c67b2
commit c4b8e567ed
25 changed files with 220 additions and 27 deletions
+3 -3
View File
@@ -1396,9 +1396,9 @@ ServerLobbyThread::HandleNetPacketChatRequest(SessionWrapper session, const Chat
boost::shared_ptr<NetPacket> packet(new NetPacket(NetPacket::Alloc));
packet->GetMsg()->present = PokerTHMessage_PR_chatMessage;
ChatMessage_t *netChat = &packet->GetMsg()->choice.chatMessage;
netChat->chatType.present = chatType_PR_chatTypeLobby;
ChatTypeLobby_t *netLobbyChat = &netChat->chatType.choice.chatTypeLobby;
netLobbyChat->playerId = session.playerData->GetUniqueId();
netChat->chatType.present = chatType_PR_chatTypePrivate;
ChatTypePrivate_t *netPrivateChat = &netChat->chatType.choice.chatTypePrivate;
netPrivateChat->playerId = session.playerData->GetUniqueId();
OCTET_STRING_fromBuf(
&netChat->chatText,
(char *)chatRequest.chatText.buf,