// Token: 0x06000067 RID: 103 RVA: 0x0000C050 File Offset: 0x0000A250 public void LoadLeaderboardEntries() { SignedInGamer signedInGamer = Gamer.SignedInGamers[PlayerIndex.One]; int num = ObjectSystem.globalVariables[114]; try { LeaderboardIdentity leaderboardId; if (num == 0) { leaderboardId = LeaderboardIdentity.Create(LeaderboardKey.BestScoreLifeTime, num); } else { leaderboardId = LeaderboardIdentity.Create(LeaderboardKey.BestTimeLifeTime, num + 1); } GlobalAppDefinitions.gameMode = 7; LeaderboardReader.BeginRead(leaderboardId, signedInGamer, 100, new AsyncCallback(this.LeaderboardReadCallback), signedInGamer); } catch (GameUpdateRequiredException e) { this.ReadNullLeaderboardEntries(); this.HandleGameUpdateRequired(e); } catch (Exception) { this.ReadNullLeaderboardEntries(); Guide.BeginShowMessageBox("Xbox LIVE", EngineCallbacks.liveErrorMessage[(int)GlobalAppDefinitions.gameLanguage], new string[] { "OK" }, 0, MessageBoxIcon.Alert, new AsyncCallback(EngineCallbacks.LiveErrorMessage), null); } }
public void readLeaderboard(int leaderboardID, LeaderboardKey key) { this.LeaderboardsRead = (XNAConnect.LeaderboardResult)null; if (TheSims3.IsTrialMode) { return; } SignedInGamer gamer = XNAConnect.getGamer(); if (gamer == null) { return; } LeaderboardIdentity leaderboardIdentity = LeaderboardIdentity.Create(key, leaderboardID); this.LeaderboardsRead = new XNAConnect.LeaderboardResult(leaderboardIdentity); try { //LeaderboardReader.BeginRead(leaderboardIdentity, (Gamer)gamer, 20, new AsyncCallback(this.LeaderboardCallback), (object)gamer); } //catch (GameUpdateRequiredException ex) //{ // XNAConnect.PromptForUpdate(); //} catch (Exception ex) { XNAConnect.NotifyConnectionLost(); } }
private static LeaderboardIdentity CreateId(string key) { LeaderboardIdentity result = default(LeaderboardIdentity); result.Key = key; result.GameMode = 0; return(result); }
public void LoadLeaderboard(Leaderboard board, FriendCollection friends, Gamer gamer) { LeaderboardIdentity identity = LeaderboardInfo.GetIdentity(board); Request = LeaderboardReader.BeginRead(identity, friends, gamer, friends.Count + 1, null, gamer); Reader = null; ReadState = AsyncRequest.FullRead; NumEntries = 0; ResetCaches(); Columns = LeaderboardInfo.GetColumns(board); LeaderboardName = LeaderboardInfo.GetName(board); }
public void LoadLeaderboard(Leaderboard board) { LeaderboardIdentity identity = LeaderboardInfo.GetIdentity(board); Request = LeaderboardReader.BeginRead(identity, 0, 50, null, null); Reader = null; ReadState = AsyncRequest.FullRead; NumEntries = 0; ResetCaches(); Columns = LeaderboardInfo.GetColumns(board); LeaderboardName = LeaderboardInfo.GetName(board); }
// Token: 0x0600006B RID: 107 RVA: 0x0000C448 File Offset: 0x0000A648 public void SetLeaderboard(int leaderboardID, int result) { LeaderboardOutcome value = LeaderboardOutcome.Win; SignedInGamer signedInGamer = Gamer.SignedInGamers[PlayerIndex.One]; try { if (leaderboardID == 0) { LeaderboardIdentity leaderboardId = LeaderboardIdentity.Create(LeaderboardKey.BestScoreLifeTime, leaderboardID); LeaderboardEntry leaderboard = signedInGamer.LeaderboardWriter.GetLeaderboard(leaderboardId); leaderboard.Rating = (long)result; leaderboard.Columns.SetValue("Outcome", value); leaderboard.Columns.SetValue("TimeStamp", DateTime.Now); } else { LeaderboardIdentity leaderboardId2 = LeaderboardIdentity.Create(LeaderboardKey.BestTimeLifeTime, leaderboardID); LeaderboardEntry leaderboard2 = signedInGamer.LeaderboardWriter.GetLeaderboard(leaderboardId2); leaderboard2.Rating = (long)result; leaderboard2.Columns.SetValue("Outcome", value); leaderboard2.Columns.SetValue("TimeStamp", DateTime.Now); } } catch (GameUpdateRequiredException e) { this.HandleGameUpdateRequired(e); } catch (Exception) { this.ReadNullLeaderboardEntries(); Guide.BeginShowMessageBox("Xbox LIVE", EngineCallbacks.liveErrorMessage[(int)GlobalAppDefinitions.gameLanguage], new string[] { "OK" }, 0, MessageBoxIcon.Alert, new AsyncCallback(EngineCallbacks.LiveErrorMessage), null); } }
public LeaderboardEntry GetLeaderboard(LeaderboardIdentity leaderboardId) { throw new System.NotSupportedException(); }
private LeaderboardInfo(LeaderboardIdentity identity, ColumnMapping[] columns, TitleTextID nameID) { Identity = identity; Columns = columns; NameID = (int)nameID; }