private void __EventHandler_UpdateTrophyInfo__(Messages.PluginMessage msg) { Trophies.TrophyData[] cachedTrophyData = Trophies.GetCachedTrophyData(); List <Trophies.TrophyData> list = new List <Trophies.TrophyData>(cachedTrophyData); this._data = list.ConvertAll <TrophyManager.TrophyData>((Trophies.TrophyData item) => new TrophyManager.TrophyData(item)); Action <bool> callback_update = this._callback_update; this._callback_update = null; if (callback_update != null) { callback_update.Invoke(true); } }
private void OnTrophyGotTrophyInfo(Messages.PluginMessage msg) { OnScreenLog.Add("Got Trophy List!"); Trophies.TrophyDetails[] cachedTrophyDetails = Trophies.GetCachedTrophyDetails(); Trophies.TrophyData[] cachedTrophyData = Trophies.GetCachedTrophyData(); OnScreenLog.Add("Trophies: " + cachedTrophyDetails.Length); for (int i = 0; i < cachedTrophyDetails.Length; i++) { if (cachedTrophyData[i].hasIcon && trophyIcon == null) { trophyIcon = cachedTrophyData[i].icon; OnScreenLog.Add("Found icon: " + trophyIcon.width + ", " + trophyIcon.height); } OnScreenLog.Add(" " + i + ": " + cachedTrophyDetails[i].name + ", " + cachedTrophyDetails[i].trophyId + ", " + cachedTrophyDetails[i].trophyGrade + ", " + cachedTrophyDetails[i].groupId + ", " + cachedTrophyDetails[i].hidden + ", " + cachedTrophyData[i].unlocked + ", " + cachedTrophyData[i].timestamp + ", " + cachedTrophyData[i].userId.ToString("X")); } }
private void OnTrophyGotTrophyInfo(Messages.PluginMessage msg) { OnScreenLog.Add("Got Trophy List!"); Trophies.TrophyDetails[] cachedTrophyDetails = Trophies.GetCachedTrophyDetails(); Trophies.TrophyData[] cachedTrophyData = Trophies.GetCachedTrophyData(); OnScreenLog.Add("Trophies: " + cachedTrophyDetails.Length); for (int i = 0; i < cachedTrophyDetails.Length; i++) { if (cachedTrophyData[i].get_hasIcon() && this.trophyIcon == null) { this.trophyIcon = cachedTrophyData[i].get_icon(); OnScreenLog.Add(string.Concat(new object[] { "Found icon: ", this.trophyIcon.get_width(), ", ", this.trophyIcon.get_height() })); } OnScreenLog.Add(string.Concat(new object[] { " ", i, ": ", cachedTrophyDetails[i].get_name(), ", ", cachedTrophyDetails[i].trophyId, ", ", cachedTrophyDetails[i].trophyGrade, ", ", cachedTrophyDetails[i].groupId, ", ", cachedTrophyDetails[i].hidden, ", ", cachedTrophyData[i].unlocked, ", ", cachedTrophyData[i].timestamp, ", ", cachedTrophyData[i].userId.ToString("X") })); } }