Equals() public method

Determines whether the specified SteamID is equal to this instance.
public Equals ( SteamID sid ) : bool
sid SteamID The to compare with this instance.
return bool
Example #1
0
                /// <summary>
                /// Checks to see if this lobby member is equal to another. Only the SteamID of the lobby member is taken into account.
                /// </summary>
                /// <param name="obj"></param>
                /// <returns>true, if obj is <see cref="Member"/> with a matching SteamID. Otherwise, false.</returns>
                public override bool Equals(object obj)
                {
                    if (obj is Member member)
                    {
                        return(SteamID.Equals(member.SteamID));
                    }

                    return(false);
                }
Example #2
0
        /// <summary>
        /// Updates a map in the maplist, and keeps the position in the array
        /// </summary>
        /// <param name="maptochange"></param>
        /// <param name="map"></param>
        /// <param name="downloadurl"></param>
        /// <param name="notes"></param>
        /// <param name="sender"></param>
        /// <returns></returns>
        public string ImpEntryUpdate(string maptochange, string map, string downloadurl, string notes, SteamID sender)
        {
            Log.Interface("Reached Here");

            if (notes == null)
            {
                notes = "No Notes";
            }
            int EntryCount = 0;

            if (admincheck(sender) == true | sender.Equals(Maplist[maptochange].Item2))
            {

                foreach (KeyValuePair<string, Tuple<string, string, string, bool>> entry in Maplist)
                {
                    EntryCount = EntryCount + 1;

                    if (entry.Key == maptochange)
                    {
                        UpdateEntryExecute(EntryCount, maptochange, map, downloadurl, notes, sender.ToString());
                        return "Map has been updated";
                    }
                }

            }

            return "The entry was not found";
        }
Example #3
0
		public void ignoredTrade(SteamID steamID) {
			if (currentTrader != null && steamID.Equals(currentTrader.getSteamId())) {
				if (currentTrader.incAttempts() < 3) {
					bot.SteamTrade.Trade(currentTrader.getSteamId());
				} else {
					tradeEnded();
				}
			}
		}