Ejemplo n.º 1
0
 public void MergeFrom(Player other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.UserId.Length != 0)
     {
         UserId = other.UserId;
     }
     if (other.team_ != null)
     {
         if (team_ == null)
         {
             Team = new global::TournamentAssistantShared.Models.Team();
         }
         Team.MergeFrom(other.Team);
     }
     if (other.PlayState != global::TournamentAssistantShared.Models.Player.Types.PlayStates.Waiting)
     {
         PlayState = other.PlayState;
     }
     if (other.DownloadState != global::TournamentAssistantShared.Models.Player.Types.DownloadStates.None)
     {
         DownloadState = other.DownloadState;
     }
     if (other.Score != 0)
     {
         Score = other.Score;
     }
     if (other.Combo != 0)
     {
         Combo = other.Combo;
     }
     if (other.Accuracy != 0D)
     {
         Accuracy = other.Accuracy;
     }
     if (other.SongPosition != 0D)
     {
         SongPosition = other.SongPosition;
     }
     if (other.songList_ != null)
     {
         if (songList_ == null)
         {
             SongList = new global::TournamentAssistantShared.Models.Packets.SongList();
         }
         SongList.MergeFrom(other.SongList);
     }
     modList_.Add(other.modList_);
     if (other.streamScreenCoordinates_ != null)
     {
         if (streamScreenCoordinates_ == null)
         {
             StreamScreenCoordinates = new global::TournamentAssistantShared.Models.Player.Types.Point();
         }
         StreamScreenCoordinates.MergeFrom(other.StreamScreenCoordinates);
     }
     if (other.StreamDelayMs != 0L)
     {
         StreamDelayMs = other.StreamDelayMs;
     }
     if (other.StreamSyncStartMs != 0L)
     {
         StreamSyncStartMs = other.StreamSyncStartMs;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }