private void LoadCategoryResponses() { List <SkillCategory> categories = SkillService.GetActiveCategories(); ClearPageResponses("CategoryPage"); // If player has skill levels to distribute, display the option to distribute them. var showDistribution = DataService.PCSkillPool.GetByPlayerIDWithLevelsUndistributed(GetPC().GlobalID).Any(); AddResponseToPage("CategoryPage", ColorTokenService.Green("Distribute Skill Ranks"), showDistribution); foreach (SkillCategory category in categories) { AddResponseToPage("CategoryPage", category.Name, true, category.ID); } }
private void LoadCategoryResponses() { List <SkillCategory> categories = SkillService.GetActiveCategories(); ClearPageResponses("CategoryPage"); // If player has skill levels to distribute, display the option to distribute them. var showDistribution = DataService.Where <PCSkillPool>(x => x.PlayerID == GetPC().GlobalID&& x.Levels > 0).Count > 0; AddResponseToPage("CategoryPage", ColorTokenService.Green("Distribute Skill Ranks"), showDistribution); foreach (SkillCategory category in categories) { AddResponseToPage("CategoryPage", category.Name, true, category.ID); } }
public override void Initialize() { List <SkillCategory> categories = SkillService.GetActiveCategories().Where(x => { var skills = DataService.Where <Skill>(s => s.SkillCategoryID == x.ID && s.ContributesToSkillCap); return(skills.Any()); }).ToList(); foreach (SkillCategory category in categories) { AddResponseToPage("CategoryPage", category.Name, true, category.ID); } Model vm = GetDialogCustomData <Model>(); vm.Item = (GetPC().GetLocalObject("XP_TOME_OBJECT")); SetDialogCustomData(vm); }