public List <AchievementInfo> GetAchievements() { Log("Fetching achievements"); List <AchievementInfo> achievementList = new List <AchievementInfo>(); IDictionary <ulong, string> heroItemMapping = GetHeroItemMapping(); Log("Mapping achievement data \n"); foreach (ulong key in TrackedFiles[0x68]) { STUAchievement achievement = GetInstance <STUAchievement>(key); if (achievement == null) { continue; } string name = GetString(achievement.Name); string desc = GetString(achievement.Description); string group = achievement.Category.ToString(); ItemInfo item = GatherUnlock(achievement.Reward); Reward reward = new Reward(achievement.Reward, item.Name, item.Type, item.Rarity); heroItemMapping.TryGetValue(item.GUID, out string hero); achievementList.Add(new AchievementInfo(key, name, group, desc, hero, reward)); } return(achievementList); }
public Achievement(ulong key) { STUAchievement stu = GetInstance <STUAchievement>(key); if (stu == null) { return; } Init(stu, key); }
public Achievement(STUAchievement achievement) { Name = GetString(achievement.m_name); Description = GetString(achievement.m_description); Trophy = achievement.m_trophy; Category = achievement.m_category; GamerScore = achievement.m_gamerScore; if (achievement.m_unlock != 0) { Reward = new Unlock(achievement.m_unlock); } }
public void Init(STUAchievement achievement, ulong key = default) { GUID = (teResourceGUID)key; Name = GetString(achievement.m_name); AchievementName = achievement.m_4E291DCC.Value; Description = GetString(achievement.m_description); //Trophy = achievement.m_trophy; //Category = achievement.m_category; GamerScore = achievement.m_gamerScore; if (achievement.m_unlock != 0) { Reward = new Unlock(achievement.m_unlock); } }
public List <Achievement> GetAchievements() { List <Achievement> achievements = new List <Achievement>(); foreach (ulong key in TrackedFiles[0x68]) { STUAchievement achievement = GetInstance <STUAchievement>(key); if (achievement == null) { continue; } Achievement model = new Achievement(achievement); achievements.Add(model); } return(achievements); }
public Achievement(STUAchievement stu) { Init(stu); }