public static void Serialize(Stream stream, GameAccountState instance)
 {
     if (instance.HasGameLevelInfo)
     {
         stream.WriteByte(10);
         ProtocolParser.WriteUInt32(stream, instance.GameLevelInfo.GetSerializedSize());
         GameLevelInfo.Serialize(stream, instance.GameLevelInfo);
     }
     if (instance.HasGameTimeInfo)
     {
         stream.WriteByte(18);
         ProtocolParser.WriteUInt32(stream, instance.GameTimeInfo.GetSerializedSize());
         GameTimeInfo.Serialize(stream, instance.GameTimeInfo);
     }
     if (instance.HasGameStatus)
     {
         stream.WriteByte(26);
         ProtocolParser.WriteUInt32(stream, instance.GameStatus.GetSerializedSize());
         GameStatus.Serialize(stream, instance.GameStatus);
     }
 }
示例#2
0
 public void Serialize(Stream stream)
 {
     GameTimeInfo.Serialize(stream, this);
 }