Example #1
0
        /// <summary>
        /// Sets the URL.
        /// </summary>
        public void ParseWiki()
        {
            this.WikiUrl = WikiHelper.CreateItemUri(this.Name);

            this.SetImageUrl();
            this.SetLocation();
        }
Example #2
0
        /// <summary>
        /// Sets the location.
        /// </summary>
        private void SetLocation()
        {
            var          webPage  = new HtmlWeb();
            HtmlDocument document = default;

            try
            {
                document = webPage.Load(WikiHelper.CreateItemUri(this.Name));
            }
            catch
            {
                return;
            }

            this.SetWikiLocation(document);
        }
Example #3
0
        /// <summary>
        /// Froms the XML.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <returns>The gem.</returns>
        public static Gem FromXml(XElement element)
        {
            var name      = element.Attribute("nameSpec").Value;
            var isSupport = element.Attribute("skillId").Value.Contains(SupportValue);

            if (isSupport)
            {
                name += $" {SupportValue}";
            }

            return(new Gem()
            {
                Name = name,
                WikiUrl = WikiHelper.CreateItemUri(name),
                Id = element.Attribute("skillId").Value,
            });
        }