Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Takes a link from WowArmory talent spec, and builds a list to follow ingame!
- /// </summary>
- /// <param name="specLink">Link to a talent spec from WowArmory</param>
- public static void BuildSpecXml(string specLink, string charClass)
- {
- int counter = 1;
- var xElement = new XElement("TalentList");
- var matches = regex.Matches(specLink);
- int numberOfTabs = 3;
- foreach (CurrentTalent o in TalentList)
- {
- for (int i = 1; i <= numberOfTabs; i++)
- {
- int talentsInTab = 28;
- for (int j = 1; j <= talentsInTab; j++)
- {
- if (i == o.tabIndex && j == o.talentIndex)
- {
- var test = new XElement("Talent",
- new XElement("Name", o.Name),
- new XElement("TabIndex", o.tabIndex),
- new XElement("TalentIndex", o.talentIndex),
- new XElement("CurrentRank", matches[counter].Value),
- new XElement("MaxRank", o.maxRank),
- new XElement("Tier", o.tier));
- xElement.Add(test);
- counter++;
- }
- }
- }
- }
- xElement.Save(String.Format(@"C:\{0}.xml", charClass));
- }
Add Comment
Please, Sign In to add comment