diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-24 14:28:53 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-24 14:28:53 +0100 |
commit | 57834374363965198f8870c9f11111d7c8a12d7f (patch) | |
tree | 1b45896954eba5c15ad7d4b8bb790322a1c21fc1 /source/packets/cPacket_PlayerListItem.cpp | |
parent | Protocol version bumped up to 29 (MC 1.2.4), seems to work. (diff) | |
download | cuberite-57834374363965198f8870c9f11111d7c8a12d7f.tar cuberite-57834374363965198f8870c9f11111d7c8a12d7f.tar.gz cuberite-57834374363965198f8870c9f11111d7c8a12d7f.tar.bz2 cuberite-57834374363965198f8870c9f11111d7c8a12d7f.tar.lz cuberite-57834374363965198f8870c9f11111d7c8a12d7f.tar.xz cuberite-57834374363965198f8870c9f11111d7c8a12d7f.tar.zst cuberite-57834374363965198f8870c9f11111d7c8a12d7f.zip |
Diffstat (limited to 'source/packets/cPacket_PlayerListItem.cpp')
-rw-r--r-- | source/packets/cPacket_PlayerListItem.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/source/packets/cPacket_PlayerListItem.cpp b/source/packets/cPacket_PlayerListItem.cpp deleted file mode 100644 index 3f8be2bde..000000000 --- a/source/packets/cPacket_PlayerListItem.cpp +++ /dev/null @@ -1,56 +0,0 @@ -
-#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
-
-#include "cPacket_PlayerListItem.h"
-#include "../cChatColor.h"
-
-
-
-
-
-cPacket_PlayerListItem::cPacket_PlayerListItem(const AString & a_PlayerName, bool a_Online, short a_Ping)
-{
- m_PacketID = E_PLAYER_LIST_ITEM;
- m_PlayerName = a_PlayerName;
- m_Online = a_Online;
- m_Ping = a_Ping;
-}
-
-
-
-
-
-int cPacket_PlayerListItem::Parse(const char * a_Data, int a_Size)
-{
- int TotalBytes = 0;
- HANDLE_PACKET_READ(ReadString16, m_PlayerName, TotalBytes);
- HANDLE_PACKET_READ(ReadBool, m_Online, TotalBytes);
- HANDLE_PACKET_READ(ReadShort, m_Ping, TotalBytes);
- return TotalBytes;
-}
-
-
-
-
-
-void cPacket_PlayerListItem::Serialize(AString & a_Data) const
-{
- AString PlayerName(m_PlayerName);
- if (PlayerName.length() > 16)
- {
- PlayerName.erase(16);
- }
- else if (PlayerName.length() <= 14)
- {
- PlayerName += cChatColor::White;
- }
-
- AppendByte (a_Data, m_PacketID);
- AppendString16(a_Data, PlayerName);
- AppendBool (a_Data, m_Online);
- AppendShort (a_Data, m_Ping);
-}
-
-
-
-
|