Skip to content

Commit

Permalink
Fixed a Bug involving modranks in the Buy tab
Browse files Browse the repository at this point in the history
Fixed Items with ' in them not displaying
  • Loading branch information
Versalkul committed Aug 28, 2016
1 parent 5ea1e8d commit 46c4c45
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion WarframeMarketClient/GUI/Tabs/Tab_Settings.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void importSound_Click(object sender, RoutedEventArgs e)

private void updateButton_Click(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/Versalkul/WarframeMarketClient/blob/master/README.md");
System.Diagnostics.Process.Start("https://github.com/Versalkul/WarframeMarketClient/releases/latest");

}

Expand Down
16 changes: 12 additions & 4 deletions WarframeMarketClient/Logic/HtmlParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ public static List<WarframeItem> getOffers()
else if (line.Contains("<td>") && line.Contains("</td>")) // got name info step=>2
{
stepcount++;
name = line.Replace("<td>", "").Replace("</td>", "").Trim();
name = line.Replace("<td>", "").Replace("</td>", "").Replace("&#39;","'").Trim(); // remove line and get the correct '

}
else if (line.Contains("<span>") && line.Contains("</span>")) //step=> 3-5
else if ((line.Contains("<span>") && line.Contains("</span>"))||line.Contains("select")) //step=> 3-5
{
line = line.Replace("<span>", "").Replace("</span>", "").Trim();
stepcount++;
Expand All @@ -99,8 +99,16 @@ public static List<WarframeItem> getOffers()

break;
case 5:
if (line.Length < 1) modrank = -1;
else modrank = Convert.ToInt32(line);
break;
case 6:
int position = line.IndexOf("selected");
if (position<0) modrank = -1;
else
{
line = line.Substring(position+9,2).Replace("<","");
modrank = Convert.ToInt32(line);
}

stepcount = 0;
offers.Add(new WarframeItem(name, price, count, modrank, sell, id));
break;
Expand Down

0 comments on commit 46c4c45

Please sign in to comment.