mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 23:25:55 +03:00
Added SteamMatchmaking.GetHistoryServers()
This commit is contained in:
parent
5c973b0092
commit
cad7edcec0
@ -167,5 +167,29 @@ public static IEnumerable<ServerInfo> GetFavoriteServers()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a list of servers that you have added to your play history
|
||||||
|
/// </summary>
|
||||||
|
public static IEnumerable<ServerInfo> GetHistoryServers()
|
||||||
|
{
|
||||||
|
var count = Internal.GetFavoriteGameCount();
|
||||||
|
|
||||||
|
for ( int i = 0; i < count; i++ )
|
||||||
|
{
|
||||||
|
uint timeplayed = 0;
|
||||||
|
uint flags = 0;
|
||||||
|
ushort qport = 0;
|
||||||
|
ushort cport = 0;
|
||||||
|
uint ip = 0;
|
||||||
|
AppId appid = default;
|
||||||
|
|
||||||
|
if ( Internal.GetFavoriteGame( i, ref appid, ref ip, ref cport, ref qport, ref flags, ref timeplayed ) )
|
||||||
|
{
|
||||||
|
if ( (flags & ServerInfo.k_unFavoriteFlagHistory) == 0 ) continue;
|
||||||
|
yield return new ServerInfo( ip, cport, qport, timeplayed );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user