2012-02-07 15:49:52 -05:00
|
|
|
|
2011-12-25 20:07:35 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cPacket.h"
|
2012-01-27 09:04:28 -05:00
|
|
|
|
2011-12-25 20:07:35 -05:00
|
|
|
|
2012-02-07 15:49:52 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-25 20:07:35 -05:00
|
|
|
class cPacket_PlayerListItem : public cPacket
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cPacket_PlayerListItem() { m_PacketID = E_PLAYER_LIST_ITEM; }
|
2012-02-07 15:49:52 -05:00
|
|
|
cPacket_PlayerListItem(const AString & a_PlayerName, bool a_Online, short a_Ping);
|
2011-12-25 20:07:35 -05:00
|
|
|
|
2012-02-07 15:49:52 -05:00
|
|
|
virtual int Parse(const char * a_Data, int a_Size) override;
|
|
|
|
virtual void Serialize(AString & a_Data) const override;
|
2011-12-25 20:07:35 -05:00
|
|
|
|
|
|
|
virtual cPacket* Clone() const { return new cPacket_PlayerListItem(*this); }
|
|
|
|
|
2012-02-07 15:49:52 -05:00
|
|
|
AString m_PlayerName; // Supports chat coloring, limited to 16 characters.
|
|
|
|
bool m_Online;
|
|
|
|
short m_Ping;
|
2011-12-25 20:07:35 -05:00
|
|
|
|
|
|
|
static const unsigned int c_Size = 6; // Minimal size ( 6 + string )
|
2012-02-07 15:49:52 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|