1.6.2 protocol implemented, both in MCServer and in ProtoProxy
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1669 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -86,6 +86,7 @@ enum
|
||||
PACKET_UPDATE_SIGN = 0x82,
|
||||
PACKET_PLAYER_LIST_ITEM = 0xC9,
|
||||
PACKET_PLAYER_ABILITIES = 0xca,
|
||||
PACKET_PLUGIN_MESSAGE = 0xfa,
|
||||
PACKET_PING = 0xfe,
|
||||
PACKET_DISCONNECT = 0xff
|
||||
} ;
|
||||
@@ -1039,6 +1040,7 @@ int cProtocol125::ParsePacket(unsigned char a_PacketType)
|
||||
case PACKET_PLAYER_MOVE_LOOK: return ParsePlayerMoveLook();
|
||||
case PACKET_PLAYER_ON_GROUND: return ParsePlayerOnGround();
|
||||
case PACKET_PLAYER_POS: return ParsePlayerPosition();
|
||||
case PACKET_PLUGIN_MESSAGE: return ParsePluginMessage();
|
||||
case PACKET_RESPAWN: return ParseRespawn();
|
||||
case PACKET_SLOT_SELECTED: return ParseSlotSelected();
|
||||
case PACKET_UPDATE_SIGN: return ParseUpdateSign();
|
||||
@@ -1330,6 +1332,28 @@ int cProtocol125::ParsePlayerPosition(void)
|
||||
|
||||
|
||||
|
||||
int cProtocol125::ParsePluginMessage(void)
|
||||
{
|
||||
HANDLE_PACKET_READ(ReadBEUTF16String16, AString, ChannelName);
|
||||
HANDLE_PACKET_READ(ReadBEShort, short, Length);
|
||||
AString Data;
|
||||
if (!m_ReceivedData.ReadString(Data, Length))
|
||||
{
|
||||
m_ReceivedData.CheckValid();
|
||||
return PARSE_INCOMPLETE;
|
||||
}
|
||||
m_ReceivedData.CheckValid();
|
||||
|
||||
// TODO: Process the data
|
||||
LOGD("Received %d bytes of plugin data on channel \"%s\".", Length, ChannelName.c_str());
|
||||
|
||||
return PARSE_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int cProtocol125::ParseRespawn(void)
|
||||
{
|
||||
HANDLE_PACKET_READ(ReadBEInt, int, Dimension);
|
||||
|
||||
Reference in New Issue
Block a user