diff --git a/Pricer/Item.cs b/Pricer/Item.cs index beff277..6fc9472 100644 --- a/Pricer/Item.cs +++ b/Pricer/Item.cs @@ -2,7 +2,7 @@ using System.Text.RegularExpressions; namespace Pricer { - class Item { + public class Item { public string rarity, name, type, key = ""; public string[] splitRaw; public int stackSize; @@ -120,6 +120,8 @@ private void Parse_GemData() { // Last line will contain "Note:" if item has a note bool isCorrupted = splitRaw[splitRaw.Length - 1].Contains("Corrupted"); + + // Special gems have special needs if (name.Contains("Empower") || name.Contains("Enlighten") || name.Contains("Enhance")) { if (isCorrupted) quality = 0; @@ -131,11 +133,12 @@ private void Parse_GemData() { } else { if (level < 10) level = 1; else if (level < 20) level = 10; - if (quality < 10) quality = 0; else if (quality < 20) quality = 10; else if (quality == 21) quality = 20; else if (quality > 21) quality = 23; + + if (level < 20) isCorrupted = false; } // Build key in the format of "|4||" diff --git a/Pricer/MainWindow.xaml b/Pricer/MainWindow.xaml index ae075d8..eeaffb6 100644 --- a/Pricer/MainWindow.xaml +++ b/Pricer/MainWindow.xaml @@ -5,26 +5,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Pricer" mc:Ignorable="d" - Title="MainWindow" Height="320" Width="750" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Margin="0" Padding="0" Closing="Window_Closing"> + Title="MainWindow" Height="290" Width="580" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Margin="0" Padding="0" Closing="Window_Closing"> - - -