nn::nex::RankingCachedResult::LocalUpdate Member Function

Syntax

LocalUpdateState LocalUpdate(
     const RankingOrderParam & orderParam,
     const RankingScoreData & scoreData,
     PrincipalID pid,
     UniqueId nexUniqueId = INVALID_UNIQUEID,
     DateTime utcCurrentTime = DateTime::Never,
     const void * pCommonData = NULL,
     qByte commonDataSize = 0
);

Parameters

Name Description
in orderParam Parameter specified in the GetCachedTopXRanking[s] function for calculating the order.
in scoreData Update score.
in pid Principal ID of the local user. This value can be retrieved from RankingClient::GetCredentials->GetPrincipalID.
in nexUniqueId Own NEX unique ID. INVALID_UNIQUEID by default.
in utcCurrentTime Update time to use when updating. DateTime::Never is used by default. Specify the value from the NgsFacade::GetGameServerTime function if an update time is required.
in pCommonData Pointer to the start of the common data to use when updating. By default, this pointer is NULL and common data is not added.
in commonDataSize Size of the common data to use when updating. The default is 0.

Return Values



Value Description
RankingCachedResult::UPDATE_SUCCESS Updated.
RankingCachedResult::UPDATE_FAILED Not updated.( Either the update score was lower than the existing score when RankingConstants::UPDATE_MODE_NORMAL was set, or the number of scores reached the limit, even when waiting until the end.)
RankingCachedResult::UPDATE_ERROR Invalid group value.

Description

Updates the locally stored top ranking with cache to the specified score.

Data acquired by the RankingClient::GetCachedTopXRanking and RankingClient::GetCachedTopXRankings functions is not updated with new scores until the scheduled update, even if new scores are uploaded before the cache update. This is a helper function for simulating an updated score by updating the local data with a new score. This function does not access the server, so the score must be retrieved and maintained beforehand.

Note the following limitations.

The data is updated locally, so if the score is updated by another user before the cache update, the rankings might have different results.
The functionality is not guaranteed to be consistent if orderParam is different from the one passed to the GetCachedTopXRanking[s] function.
The group filter in orderParam must be RankingConstants::FILTER_GROUP_INDEX_NONE, or the group in orderParam must be the same as the score being added.
The score is added even if it is not found with the orderParam group filter.
The score is always added as new data, regardless of the utcCurrentTime value.
The offset and length variables of orderParam are ignored.

See Also

RankingClient::GetCachedTopXRanking, RankingClient::GetCachedTopXRankings

Revision History

2014/04/01
Initial version.

CONFIDENTIAL