public override int GetHashCode()
        {
            int hash = 1;

            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (activeMatch_ != null)
            {
                hash ^= ActiveMatch.GetHashCode();
            }
            if (menu_ != null)
            {
                hash ^= Menu.GetHashCode();
            }
            if (queue_ != null)
            {
                hash ^= Queue.GetHashCode();
            }
            if (lobby_ != null)
            {
                hash ^= Lobby.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public void MergeFrom(PlayerSession other)
 {
     if (other == null)
     {
         return;
     }
     if (other.State != 0)
     {
         State = other.State;
     }
     if (other.activeMatch_ != null)
     {
         if (activeMatch_ == null)
         {
             activeMatch_ = new global::Rising_Thunder_Server_CS.Protobufs.Tbmatch.PlayerSession.Types.ActiveMatch();
         }
         ActiveMatch.MergeFrom(other.ActiveMatch);
     }
     if (other.menu_ != null)
     {
         if (menu_ == null)
         {
             menu_ = new global::Rising_Thunder_Server_CS.Protobufs.Tbmatch.PlayerSession.Types.Menu();
         }
         Menu.MergeFrom(other.Menu);
     }
     if (other.queue_ != null)
     {
         if (queue_ == null)
         {
             queue_ = new global::Rising_Thunder_Server_CS.Protobufs.Tbmatch.PlayerSession.Types.Queue();
         }
         Queue.MergeFrom(other.Queue);
     }
     if (other.lobby_ != null)
     {
         if (lobby_ == null)
         {
             lobby_ = new global::Rising_Thunder_Server_CS.Protobufs.Tbmatch.PlayerSession.Types.Lobby();
         }
         Lobby.MergeFrom(other.Lobby);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Give up this match. Match will end after this.
        /// </summary>
        public virtual void Concede()
        {
            Logger.Log(this + " has conceded this match.");

            ActiveMatch?.Concede(this);
        }