mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +03:00
Fix EnumerateFollowingList and rename to GetFollowingList
This commit is contained in:
parent
1a263c09cf
commit
e4e3b0dbce
@ -310,10 +310,24 @@ public static async Task<int> GetFollowerCount(SteamId steamID)
|
|||||||
return r.Value.Count;
|
return r.Value.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<ulong[]> EnumerateFollowingList(uint StartIndex)
|
public static async Task<SteamId[]> GetFollowingList()
|
||||||
{
|
{
|
||||||
var r = await Internal.EnumerateFollowingList(StartIndex);
|
int resultCount = 0;
|
||||||
return r.Value.GSteamID;
|
var steamIds = new List<SteamId>();
|
||||||
}
|
|
||||||
}
|
FriendsEnumerateFollowingList_t? result;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if ((result = await Internal.EnumerateFollowingList((uint)resultCount)) != null)
|
||||||
|
{
|
||||||
|
resultCount += result.Value.ResultsReturned;
|
||||||
|
|
||||||
|
Array.ForEach(result.Value.GSteamID, id => { if (id > 0) steamIds.Add(id); });
|
||||||
|
}
|
||||||
|
} while (result != null && resultCount < result.Value.TotalResultCount);
|
||||||
|
|
||||||
|
return steamIds.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user