/// <summary> /// Determines whether the specified <see cref="GameID"/> is equal to this instance. /// </summary> /// <param name="gid">The <see cref="GameID"/> to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="GameID"/> is equal to this instance; otherwise, <c>false</c>. /// </returns> public bool Equals(GameID gid) { if (( object )gid == null) { return(false); } return(gameid.Data == gid.gameid.Data); }
/// <summary> /// Retrieves the number of current players for a given <see cref="GameID"/>. /// Results are returned in a <see cref="NumberOfPlayersCallback"/>. /// </summary> /// <param name="gameId">The GameID to request the number of players for.</param> /// <returns>The Job ID of the request. This can be used to find the appropriate <see cref="NumberOfPlayersCallback"/>.</returns> public JobID GetNumberOfCurrentPlayers( GameID gameId ) { var msg = new ClientMsg<MsgClientGetNumberOfCurrentPlayers>(); msg.SourceJobID = Client.GetNextJobID(); msg.Body.GameID = gameId; Client.Send( msg ); return msg.SourceJobID; }
public void PlayGame( GameID game ) { var clientMsg = new ClientMsgProtobuf<CMsgClientGamesPlayed>( EMsg.ClientGamesPlayedNoDataBlob ); clientMsg.Body.games_played.Add( new CMsgClientGamesPlayed.GamePlayed { game_id = game, } ); Client.Send( clientMsg ); }
/// <summary> /// Retrieves the number of current players for a given <see cref="GameID"/>. /// Results are returned in a <see cref="NumberOfPlayersCallback"/>. /// </summary> /// <param name="gameId">The GameID to request the number of players for.</param> /// <returns>The Job ID of the request. This can be used to find the appropriate <see cref="NumberOfPlayersCallback"/>.</returns> public AsyncJob<NumberOfPlayersCallback> GetNumberOfCurrentPlayers( GameID gameId ) { var msg = new ClientMsg<MsgClientGetNumberOfCurrentPlayers>(); msg.SourceJobID = Client.GetNextJobID(); msg.Body.GameID = gameId; Client.Send( msg ); return new AsyncJob<NumberOfPlayersCallback>( this.Client, msg.SourceJobID ); }
/// <summary> /// Retrieves the number of current players for a given <see cref="GameID"/>. /// Results are returned in a <see cref="NumberOfPlayersCallback"/>. /// </summary> /// <param name="gameId">The GameID to request the number of players for.</param> /// <returns>The Job ID of the request. This can be used to find the appropriate <see cref="NumberOfPlayersCallback"/>.</returns> public AsyncJob <NumberOfPlayersCallback> GetNumberOfCurrentPlayers(GameID gameId) { var msg = new ClientMsg <MsgClientGetNumberOfCurrentPlayers>(); msg.SourceJobID = Client.GetNextJobID(); msg.Body.GameID = gameId; Client.Send(msg); return(new AsyncJob <NumberOfPlayersCallback>(this.Client, msg.SourceJobID)); }
/// <summary> /// Retrieves the number of current players or a given <see cref="GameID"/>. /// Results are returned in a <see cref="NumberOfPlayersCallback"/> from a <see cref="SteamClient.JobCallback<T>"/>. /// </summary> /// <param name="gameId">The GameID to request the number of players for.</param> /// <returns>The Job ID of the request. This can be used to find the appropriate <see cref="SteamClient.JobCallback<T>"/>.</returns> public JobID GetNumberOfCurrentPlayers(GameID gameId) { var msg = new ClientMsg <MsgClientGetNumberOfCurrentPlayers>(); msg.SourceJobID = Client.GetNextJobID(); msg.Body.GameID = gameId; Client.Send(msg); return(msg.SourceJobID); }
internal ChatInviteCallback(CMsgClientChatInvite invite) { this.InvitedID = invite.steam_id_invited; this.ChatRoomID = invite.steam_id_chat; this.PatronID = invite.steam_id_patron; this.ChatRoomType = ( EChatRoomType )invite.chatroom_type; this.FriendChatID = invite.steam_id_friend_chat; this.ChatRoomName = invite.chat_name; this.GameID = invite.game_id; }
/// <summary> /// Determines whether the specified <see cref="System.Object"/> is equal to this instance. /// </summary> /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>. /// </returns> public override bool Equals(System.Object obj) { if (obj == null) { return(false); } GameID gid = obj as GameID; if ((System.Object)gid == null) { return(false); } return(gameid.Data == gid.gameid.Data); }
public AsyncJob <NumberOfPlayersCallback> GetNumberOfCurrentPlayers(GameID gameId) { return(GetNumberOfCurrentPlayers(gameId.AppID)); }
internal ChatInviteCallback( CMsgClientChatInvite invite ) { this.InvitedID = invite.steam_id_invited; this.ChatRoomID = invite.steam_id_chat; this.PatronID = invite.steam_id_patron; this.ChatRoomType = ( EChatRoomType )invite.chatroom_type; this.FriendChatID = invite.steam_id_friend_chat; this.ChatRoomName = invite.chat_name; this.GameID = invite.game_id; }
public User() { GameID = new GameID(); }
/// <summary> /// Determines whether the specified <see cref="GameID"/> is equal to this instance. /// </summary> /// <param name="gid">The <see cref="GameID"/> to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="GameID"/> is equal to this instance; otherwise, <c>false</c>. /// </returns> public bool Equals( GameID gid ) { if ( ( object )gid == null ) return false; return gameid.Data == gid.gameid.Data; }
public AsyncJob<NumberOfPlayersCallback> GetNumberOfCurrentPlayers( GameID gameId ) { return GetNumberOfCurrentPlayers( gameId.AppID ); }