mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-22 22:24:30 +00:00
ref[protocol]: 重构protocol的CSharp的解析
This commit is contained in:
@@ -5,8 +5,7 @@ using CsProtocol.Buffer;
|
||||
namespace CsProtocol
|
||||
{
|
||||
// @author jaysunxiao
|
||||
// @version 1.0
|
||||
// @since 2017 10.12 15:39
|
||||
// @version 3.0
|
||||
public class ObjectB : IPacket
|
||||
{
|
||||
public bool flag;
|
||||
@@ -21,7 +20,7 @@ namespace CsProtocol
|
||||
|
||||
public short ProtocolId()
|
||||
{
|
||||
return 1117;
|
||||
return 103;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,17 +29,15 @@ namespace CsProtocol
|
||||
{
|
||||
public short ProtocolId()
|
||||
{
|
||||
return 1117;
|
||||
return 103;
|
||||
}
|
||||
|
||||
public void Write(ByteBuffer buffer, IPacket packet)
|
||||
{
|
||||
if (packet == null)
|
||||
if (buffer.WritePacketFlag(packet))
|
||||
{
|
||||
buffer.WriteBool(false);
|
||||
return;
|
||||
}
|
||||
buffer.WriteBool(true);
|
||||
ObjectB message = (ObjectB) packet;
|
||||
buffer.WriteBool(message.flag);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user