/// <summary> /// Fetches the icon of a given active skill. /// </summary> /// <param name="activeSkill"></param> /// <returns></returns> private static D3Picture FetchIconOf(ActiveSkill activeSkill) { if (activeSkill == null || activeSkill.Skill == null || activeSkill.Skill.Icon == null) { return null; } return D3Api.GetSkillIcon(activeSkill.Skill.Icon, "64"); }
private static List<IListItem> GetPartialListViewForActiveSkill(String headerText, ActiveSkill active, D3Picture icon) { var list = new List<IListItem> { new SectionHeaderListItem(headerText) }; if (active.Skill != null) { list.Add(new SkillListItem(active.Skill, icon)); } if (active.Rune != null) { list.Add(new RuneListItem(active.Rune)); } return list; }
/// <summary> /// Fetches the icons of all hero active skills. /// </summary> /// <param name="skills"></param> public void FetchActiveSkillIcons(ActiveSkill[] skills) { if (skills == null) { return; } ActiveSkill1 = FetchIconOf(skills[0]); ActiveSkill2 = FetchIconOf(skills[1]); ActiveSkill3 = FetchIconOf(skills[2]); ActiveSkill4 = FetchIconOf(skills[3]); ActiveSkill5 = FetchIconOf(skills[4]); ActiveSkill6 = FetchIconOf(skills[5]); }
private static void UpdateNodeText(TreeNode node, ActiveSkill d3Object) { node.Text += $" >> {d3Object.Skill?.Name} / {d3Object.Rune?.Name}"; }