C# Класс Steamworks.SteamUserStats

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AttachLeaderboardUGC ( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) : SteamAPICall_t

Attaches a piece of user generated content the user's entry on a leaderboard.

hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare().

This call is asynchronous, with the result returned in LeaderboardUGCSet_t.

ClearAchievement ( string pchName ) : bool
DownloadLeaderboardEntries ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) : SteamAPICall_t

Asks the Steam back-end for a set of rows in the leaderboard.

This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t

LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below)

You can ask for more entries than exist, and it will return as many as do exist.

k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries]

k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate

e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after

k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user

DownloadLeaderboardEntriesForUsers ( SteamLeaderboard_t hSteamLeaderboard, CSteamID prgUsers, int cUsers ) : SteamAPICall_t

as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers

if a user doesn't have a leaderboard entry, they won't be included in the result

a max of 100 users can be downloaded at a time, with only one outstanding call at a time

FindLeaderboard ( string pchLeaderboardName ) : SteamAPICall_t

as above, but won't create the leaderboard if it's not found

This call is asynchronous, with the result returned in LeaderboardFindResult_t

FindOrCreateLeaderboard ( string pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) : SteamAPICall_t

Leaderboard functions

asks the Steam back-end for a leaderboard by name, and will create it if it's not yet

This call is asynchronous, with the result returned in LeaderboardFindResult_t

GetAchievement ( string pchName, bool &pbAchieved ) : bool

Achievement flag accessors

GetAchievementAchievedPercent ( string pchName, float &pflPercent ) : bool

Returns the percentage of users who have achieved the specified achievement.

GetAchievementAndUnlockTime ( string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool

Get the achievement status, and the time it was unlocked if unlocked.

If the return value is true, but the unlock time is zero, that means it was unlocked before Steam

began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970.

GetAchievementDisplayAttribute ( string pchName, string pchKey ) : string

Get general attributes for an achievement. Accepts the following keys:

- "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8)

- "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden)

GetAchievementIcon ( string pchName ) : int

Achievement / GroupAchievement metadata

Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set.

A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback

which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the

specified achievement.

GetAchievementName ( uint iAchievement ) : string

Get achievement name iAchievement in [0,GetNumAchievements)

GetDownloadedLeaderboardEntry ( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t &pLeaderboardEntry, int pDetails, int cDetailsMax ) : bool

Returns data about a single leaderboard entry

use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries

e.g.

void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded )

{

for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ )

{

LeaderboardEntry_t leaderboardEntry;

int32 details[3]; // we know this is how many we've stored previously

GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 );

assert( leaderboardEntry.m_cDetails == 3 );

...

}

once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid

GetGlobalStat ( string pchStatName, double &pData ) : bool
GetGlobalStat ( string pchStatName, long &pData ) : bool

Gets the lifetime totals for an aggregated stat

GetGlobalStatHistory ( string pchStatName, double pData, uint cubData ) : int
GetGlobalStatHistory ( string pchStatName, long pData, uint cubData ) : int

Gets history for an aggregated stat. pData will be filled with daily values, starting with today.

So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago,

etc. cubData is the size in bytes of the pubData buffer. Returns the number of

elements actually set.

GetLeaderboardDisplayType ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardDisplayType

returns the display type of the leaderboard

GetLeaderboardEntryCount ( SteamLeaderboard_t hSteamLeaderboard ) : int

returns the total number of entries in a leaderboard, as of the last request

GetLeaderboardName ( SteamLeaderboard_t hSteamLeaderboard ) : string

returns the name of a leaderboard

GetLeaderboardSortMethod ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardSortMethod

returns the sort method of the leaderboard

GetMostAchievedAchievementInfo ( string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int

Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch

the next most achieved afterwards. Will return -1 if there is no data on achievement

percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback).

GetNextMostAchievedAchievementInfo ( int iIteratorPrevious, string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int

Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another

GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last

achievement has been iterated.

GetNumAchievements ( ) : uint

Used for iterating achievements. In general games should not need these functions because they should have a

list of existing achievements compiled into them

GetNumberOfCurrentPlayers ( ) : SteamAPICall_t

Retrieves the number of players currently playing your game (online + offline)

This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t

GetStat ( string pchName, float &pData ) : bool
GetStat ( string pchName, int &pData ) : bool

Data accessors

GetTrophySpaceRequiredBeforeInstall ( ) : ulong

Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed

by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies().

GetUserAchievement ( CSteamID steamIDUser, string pchName, bool &pbAchieved ) : bool
GetUserAchievementAndUnlockTime ( CSteamID steamIDUser, string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool

See notes for GetAchievementAndUnlockTime above

GetUserStat ( CSteamID steamIDUser, string pchName, float &pData ) : bool
GetUserStat ( CSteamID steamIDUser, string pchName, int &pData ) : bool

requests stat information for a user, usable after a successful call to RequestUserStats()

GetUserStatsData ( IntPtr pvData, uint cubData, uint &pcubWritten ) : bool

Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t

callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required

buffer size.

IndicateAchievementProgress ( string pchName, uint nCurProgress, uint nMaxProgress ) : bool

Achievement progress - triggers an AchievementProgress callback, that is all.

Calling this w/ N out of N progress will NOT set the achievement, the game must still do that.

InstallPS3Trophies ( ) : bool

Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t

callback.

RequestCurrentStats ( ) : bool

Ask the server to send down this user's data and achievements for this game

RequestGlobalAchievementPercentages ( ) : SteamAPICall_t

Requests that Steam fetch data on the percentage of players who have received each achievement

for the game globally.

This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.

RequestGlobalStats ( int nHistoryDays ) : SteamAPICall_t

Requests global stats data, which is available for stats marked as "aggregated".

This call is asynchronous, with the results returned in GlobalStatsReceived_t.

nHistoryDays specifies how many days of day-by-day history to retrieve in addition

to the overall totals. The limit is 60.

RequestUserStats ( CSteamID steamIDUser ) : SteamAPICall_t

Friends stats & achievements

downloads stats for the user

returns a UserStatsReceived_t received when completed

if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail

these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data

ResetAllStats ( bool bAchievementsToo ) : bool

Reset stats

SetAchievement ( string pchName ) : bool
SetStat ( string pchName, float fData ) : bool
SetStat ( string pchName, int nData ) : bool

Set / update data

SetUserStatsData ( IntPtr pvData, uint cubData ) : bool

On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data.

At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method.

If you do not have any user data, call this function with pvData = NULL and cubData = 0

StoreStats ( ) : bool

Store the current data on the server, will get a callback when set

And one callback for every new achievement

If the callback has a result of k_EResultInvalidParam, one or more stats

uploaded has been rejected, either because they broke constraints

or were out of date. In this case the server sends back updated values.

The stats should be re-iterated to keep in sync.

UpdateAvgRateStat ( string pchName, float flCountThisSession, double dSessionLength ) : bool
UploadLeaderboardScore ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, int pScoreDetails, int cScoreDetailsCount ) : SteamAPICall_t

Uploads a user score to the Steam back-end.

This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t

Details are extra game-defined information regarding how the user got that score

pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list

Описание методов

AttachLeaderboardUGC() публичный статический Метод

Attaches a piece of user generated content the user's entry on a leaderboard.

hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare().

This call is asynchronous, with the result returned in LeaderboardUGCSet_t.

public static AttachLeaderboardUGC ( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) : SteamAPICall_t
hSteamLeaderboard SteamLeaderboard_t
hUGC UGCHandle_t
Результат SteamAPICall_t

ClearAchievement() публичный статический Метод

public static ClearAchievement ( string pchName ) : bool
pchName string
Результат bool

DownloadLeaderboardEntries() публичный статический Метод

Asks the Steam back-end for a set of rows in the leaderboard.

This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t

LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below)

You can ask for more entries than exist, and it will return as many as do exist.

k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries]

k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate

e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after

k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user

public static DownloadLeaderboardEntries ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) : SteamAPICall_t
hSteamLeaderboard SteamLeaderboard_t
eLeaderboardDataRequest ELeaderboardDataRequest
nRangeStart int
nRangeEnd int
Результат SteamAPICall_t

DownloadLeaderboardEntriesForUsers() публичный статический Метод

as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers

if a user doesn't have a leaderboard entry, they won't be included in the result

a max of 100 users can be downloaded at a time, with only one outstanding call at a time

public static DownloadLeaderboardEntriesForUsers ( SteamLeaderboard_t hSteamLeaderboard, CSteamID prgUsers, int cUsers ) : SteamAPICall_t
hSteamLeaderboard SteamLeaderboard_t
prgUsers CSteamID
cUsers int
Результат SteamAPICall_t

FindLeaderboard() публичный статический Метод

as above, but won't create the leaderboard if it's not found

This call is asynchronous, with the result returned in LeaderboardFindResult_t

public static FindLeaderboard ( string pchLeaderboardName ) : SteamAPICall_t
pchLeaderboardName string
Результат SteamAPICall_t

FindOrCreateLeaderboard() публичный статический Метод

Leaderboard functions

asks the Steam back-end for a leaderboard by name, and will create it if it's not yet

This call is asynchronous, with the result returned in LeaderboardFindResult_t

public static FindOrCreateLeaderboard ( string pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) : SteamAPICall_t
pchLeaderboardName string
eLeaderboardSortMethod ELeaderboardSortMethod
eLeaderboardDisplayType ELeaderboardDisplayType
Результат SteamAPICall_t

GetAchievement() публичный статический Метод

Achievement flag accessors

public static GetAchievement ( string pchName, bool &pbAchieved ) : bool
pchName string
pbAchieved bool
Результат bool

GetAchievementAchievedPercent() публичный статический Метод

Returns the percentage of users who have achieved the specified achievement.

public static GetAchievementAchievedPercent ( string pchName, float &pflPercent ) : bool
pchName string
pflPercent float
Результат bool

GetAchievementAndUnlockTime() публичный статический Метод

Get the achievement status, and the time it was unlocked if unlocked.

If the return value is true, but the unlock time is zero, that means it was unlocked before Steam

began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970.

public static GetAchievementAndUnlockTime ( string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool
pchName string
pbAchieved bool
punUnlockTime uint
Результат bool

GetAchievementDisplayAttribute() публичный статический Метод

Get general attributes for an achievement. Accepts the following keys:

- "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8)

- "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden)

public static GetAchievementDisplayAttribute ( string pchName, string pchKey ) : string
pchName string
pchKey string
Результат string

GetAchievementIcon() публичный статический Метод

Achievement / GroupAchievement metadata

Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set.

A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback

which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the

specified achievement.

public static GetAchievementIcon ( string pchName ) : int
pchName string
Результат int

GetAchievementName() публичный статический Метод

Get achievement name iAchievement in [0,GetNumAchievements)

public static GetAchievementName ( uint iAchievement ) : string
iAchievement uint
Результат string

GetDownloadedLeaderboardEntry() публичный статический Метод

Returns data about a single leaderboard entry

use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries

e.g.

void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded )

{

for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ )

{

LeaderboardEntry_t leaderboardEntry;

int32 details[3]; // we know this is how many we've stored previously

GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 );

assert( leaderboardEntry.m_cDetails == 3 );

...

}

once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid

public static GetDownloadedLeaderboardEntry ( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t &pLeaderboardEntry, int pDetails, int cDetailsMax ) : bool
hSteamLeaderboardEntries SteamLeaderboardEntries_t
index int
pLeaderboardEntry LeaderboardEntry_t
pDetails int
cDetailsMax int
Результат bool

GetGlobalStat() публичный статический Метод

public static GetGlobalStat ( string pchStatName, double &pData ) : bool
pchStatName string
pData double
Результат bool

GetGlobalStat() публичный статический Метод

Gets the lifetime totals for an aggregated stat

public static GetGlobalStat ( string pchStatName, long &pData ) : bool
pchStatName string
pData long
Результат bool

GetGlobalStatHistory() публичный статический Метод

public static GetGlobalStatHistory ( string pchStatName, double pData, uint cubData ) : int
pchStatName string
pData double
cubData uint
Результат int

GetGlobalStatHistory() публичный статический Метод

Gets history for an aggregated stat. pData will be filled with daily values, starting with today.

So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago,

etc. cubData is the size in bytes of the pubData buffer. Returns the number of

elements actually set.

public static GetGlobalStatHistory ( string pchStatName, long pData, uint cubData ) : int
pchStatName string
pData long
cubData uint
Результат int

GetLeaderboardDisplayType() публичный статический Метод

returns the display type of the leaderboard

public static GetLeaderboardDisplayType ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardDisplayType
hSteamLeaderboard SteamLeaderboard_t
Результат ELeaderboardDisplayType

GetLeaderboardEntryCount() публичный статический Метод

returns the total number of entries in a leaderboard, as of the last request

public static GetLeaderboardEntryCount ( SteamLeaderboard_t hSteamLeaderboard ) : int
hSteamLeaderboard SteamLeaderboard_t
Результат int

GetLeaderboardName() публичный статический Метод

returns the name of a leaderboard

public static GetLeaderboardName ( SteamLeaderboard_t hSteamLeaderboard ) : string
hSteamLeaderboard SteamLeaderboard_t
Результат string

GetLeaderboardSortMethod() публичный статический Метод

returns the sort method of the leaderboard

public static GetLeaderboardSortMethod ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardSortMethod
hSteamLeaderboard SteamLeaderboard_t
Результат ELeaderboardSortMethod

GetMostAchievedAchievementInfo() публичный статический Метод

Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch

the next most achieved afterwards. Will return -1 if there is no data on achievement

percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback).

public static GetMostAchievedAchievementInfo ( string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int
pchName string
unNameBufLen uint
pflPercent float
pbAchieved bool
Результат int

GetNextMostAchievedAchievementInfo() публичный статический Метод

Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another

GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last

achievement has been iterated.

public static GetNextMostAchievedAchievementInfo ( int iIteratorPrevious, string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int
iIteratorPrevious int
pchName string
unNameBufLen uint
pflPercent float
pbAchieved bool
Результат int

GetNumAchievements() публичный статический Метод

Used for iterating achievements. In general games should not need these functions because they should have a

list of existing achievements compiled into them

public static GetNumAchievements ( ) : uint
Результат uint

GetNumberOfCurrentPlayers() публичный статический Метод

Retrieves the number of players currently playing your game (online + offline)

This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t

public static GetNumberOfCurrentPlayers ( ) : SteamAPICall_t
Результат SteamAPICall_t

GetStat() публичный статический Метод

public static GetStat ( string pchName, float &pData ) : bool
pchName string
pData float
Результат bool

GetStat() публичный статический Метод

Data accessors

public static GetStat ( string pchName, int &pData ) : bool
pchName string
pData int
Результат bool

GetTrophySpaceRequiredBeforeInstall() публичный статический Метод

Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed

by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies().

public static GetTrophySpaceRequiredBeforeInstall ( ) : ulong
Результат ulong

GetUserAchievement() публичный статический Метод

public static GetUserAchievement ( CSteamID steamIDUser, string pchName, bool &pbAchieved ) : bool
steamIDUser CSteamID
pchName string
pbAchieved bool
Результат bool

GetUserAchievementAndUnlockTime() публичный статический Метод

See notes for GetAchievementAndUnlockTime above

public static GetUserAchievementAndUnlockTime ( CSteamID steamIDUser, string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool
steamIDUser CSteamID
pchName string
pbAchieved bool
punUnlockTime uint
Результат bool

GetUserStat() публичный статический Метод

public static GetUserStat ( CSteamID steamIDUser, string pchName, float &pData ) : bool
steamIDUser CSteamID
pchName string
pData float
Результат bool

GetUserStat() публичный статический Метод

requests stat information for a user, usable after a successful call to RequestUserStats()

public static GetUserStat ( CSteamID steamIDUser, string pchName, int &pData ) : bool
steamIDUser CSteamID
pchName string
pData int
Результат bool

GetUserStatsData() публичный статический Метод

Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t

callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required

buffer size.

public static GetUserStatsData ( IntPtr pvData, uint cubData, uint &pcubWritten ) : bool
pvData System.IntPtr
cubData uint
pcubWritten uint
Результат bool

IndicateAchievementProgress() публичный статический Метод

Achievement progress - triggers an AchievementProgress callback, that is all.

Calling this w/ N out of N progress will NOT set the achievement, the game must still do that.

public static IndicateAchievementProgress ( string pchName, uint nCurProgress, uint nMaxProgress ) : bool
pchName string
nCurProgress uint
nMaxProgress uint
Результат bool

InstallPS3Trophies() публичный статический Метод

Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t

callback.

public static InstallPS3Trophies ( ) : bool
Результат bool

RequestCurrentStats() публичный статический Метод

Ask the server to send down this user's data and achievements for this game

public static RequestCurrentStats ( ) : bool
Результат bool

RequestGlobalAchievementPercentages() публичный статический Метод

Requests that Steam fetch data on the percentage of players who have received each achievement

for the game globally.

This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.

public static RequestGlobalAchievementPercentages ( ) : SteamAPICall_t
Результат SteamAPICall_t

RequestGlobalStats() публичный статический Метод

Requests global stats data, which is available for stats marked as "aggregated".

This call is asynchronous, with the results returned in GlobalStatsReceived_t.

nHistoryDays specifies how many days of day-by-day history to retrieve in addition

to the overall totals. The limit is 60.

public static RequestGlobalStats ( int nHistoryDays ) : SteamAPICall_t
nHistoryDays int
Результат SteamAPICall_t

RequestUserStats() публичный статический Метод

Friends stats & achievements

downloads stats for the user

returns a UserStatsReceived_t received when completed

if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail

these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data

public static RequestUserStats ( CSteamID steamIDUser ) : SteamAPICall_t
steamIDUser CSteamID
Результат SteamAPICall_t

ResetAllStats() публичный статический Метод

Reset stats

public static ResetAllStats ( bool bAchievementsToo ) : bool
bAchievementsToo bool
Результат bool

SetAchievement() публичный статический Метод

public static SetAchievement ( string pchName ) : bool
pchName string
Результат bool

SetStat() публичный статический Метод

public static SetStat ( string pchName, float fData ) : bool
pchName string
fData float
Результат bool

SetStat() публичный статический Метод

Set / update data

public static SetStat ( string pchName, int nData ) : bool
pchName string
nData int
Результат bool

SetUserStatsData() публичный статический Метод

On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data.

At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method.

If you do not have any user data, call this function with pvData = NULL and cubData = 0

public static SetUserStatsData ( IntPtr pvData, uint cubData ) : bool
pvData System.IntPtr
cubData uint
Результат bool

StoreStats() публичный статический Метод

Store the current data on the server, will get a callback when set

And one callback for every new achievement

If the callback has a result of k_EResultInvalidParam, one or more stats

uploaded has been rejected, either because they broke constraints

or were out of date. In this case the server sends back updated values.

The stats should be re-iterated to keep in sync.

public static StoreStats ( ) : bool
Результат bool

UpdateAvgRateStat() публичный статический Метод

public static UpdateAvgRateStat ( string pchName, float flCountThisSession, double dSessionLength ) : bool
pchName string
flCountThisSession float
dSessionLength double
Результат bool

UploadLeaderboardScore() публичный статический Метод

Uploads a user score to the Steam back-end.

This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t

Details are extra game-defined information regarding how the user got that score

pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list

public static UploadLeaderboardScore ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, int pScoreDetails, int cScoreDetailsCount ) : SteamAPICall_t
hSteamLeaderboard SteamLeaderboard_t
eLeaderboardUploadScoreMethod ELeaderboardUploadScoreMethod
nScore int
pScoreDetails int
cScoreDetailsCount int
Результат SteamAPICall_t