/// <summary> /// Downloads the icon associated with the talent passed in /// </summary> /// <param name="charClass">CharacterClass of the given icon</param> /// <param name="talentTree">name of the talent tree</param> /// <param name="talentName">name of the talent</param> /// <returns>The full path to the downloaded icon. Null is returned if no icon could be downloaded</returns> public string DownloadTalentIcon(Character.CharacterClass charClass, string talentTree, string talentName) { string imageName = talentTree + "_" + talentName + ".jpg"; string fullPathToSave = Path.Combine(TalentImageCachePath, charClass.ToString().ToLower() + "\\" + imageName); if (!String.IsNullOrEmpty(talentTree) && !String.IsNullOrEmpty(talentName)) { //0 = class, 1=tree, 2=talentname - all lowercase //@"http://www.worldofwarcraft.com/shared/global/talents/{0}/images/{1}/{2}.jpg"; string uri = string.Format(NetworkSettingsProvider.WoWTalentIconURI, charClass.ToString().ToLower(), talentTree.ToLower(), talentName.ToLower()); DownloadFile(uri, fullPathToSave, CONTENT_JPG); } if (!File.Exists(fullPathToSave)) { fullPathToSave = null; } return(fullPathToSave); }
public string DownloadClassTalentTree(Character.CharacterClass characterClass) { //http://www.worldofwarcraft.com/shared/global/talents/{0}/data.js return(DownloadText(string.Format(NetworkSettingsProvider.ClassTalentURI, characterClass.ToString().ToLower()))); }