public void UpdateAchivementDetails(Achievement achievement, AchievementInfo achievementDetails, string category, int categoryId, int parentCategoryId) { achievement.BlizzardID = achievementDetails.Id; achievement.Name = achievementDetails.Title; achievement.Side = ReturnSide(achievementDetails.FactionId); achievement.Points = achievementDetails.Points; achievement.Icon = achievementDetails.Icon; achievement.Category = category; achievement.CategoryID = categoryId; achievement.ParentCategoryID = parentCategoryId; achievement.Description = achievementDetails.Description; foreach (AchievementCriteria criteria in achievementDetails.Criteria) { Criteria details = new Criteria(); details.Description = criteria.Description; details.Id = criteria.Id; details.Max = criteria.Max; details.OrderIndex = criteria.OrderIndex; achievement.Criteria.Add(details); } }
private Achievement CreateFromAchivementInfo(AchievementInfo achievementDetails, string category, int categoryId, int parentCategoryId) { Achievement achievement = new Achievement(); UpdateAchivementDetails(achievement, achievementDetails, category, categoryId, parentCategoryId); return achievement; }