Skip to content

Commit

Permalink
StatTrack Search Bugfix
Browse files Browse the repository at this point in the history
StatTrack items couldn't be found because while getting item data from database file, "StatTrack" part wasn't deleted so no item would be found
  • Loading branch information
Prevter committed Dec 16, 2020
1 parent 8ba7f3f commit 6be8fbd
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
Binary file modified .vs/FloatToolGUI/v16/.suo
Binary file not shown.
4 changes: 2 additions & 2 deletions FloatToolGUI/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion FloatToolGUI/FloatToolGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<StartupObject>FloatToolGUI.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>sketch-1586878181293.ico</ApplicationIcon>
<ApplicationIcon>floattool.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -156,6 +156,7 @@
<None Include="github.png" />
<None Include="mutedWhite.png" />
<None Include="mutedBlack.png" />
<Content Include="floattool.ico" />
<Content Include="sketch-1586878181293.ico" />
</ItemGroup>
<ItemGroup>
Expand Down
11 changes: 7 additions & 4 deletions FloatToolGUI/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static public string getNextRarity(string rarity)
}
static public string getSkinData(string name)
{
name = name.Replace("StatTrak™ ",""); //remove stattrack
using (StreamReader r = new StreamReader("itemData.json"))
{
string json = r.ReadToEnd();
Expand Down Expand Up @@ -155,19 +156,19 @@ public void parseCraft(double[] inputs, List<dynamic> outputs, string want, bool
inputStr[i] = "" + inputs[i];
}

string flot = craftF(inputStr, minWear, maxWear);
Console.WriteLine(flotOrigin + " | " + flot);
//string flot = craftF(inputStr, minWear, maxWear);
//Console.WriteLine(flotOrigin + " | " + flot);
//Debug.WriteLine("[DEBUG] flot = " + flot);
// if (wasSort && ((!asc && (double.Parse(flot) > double.Parse(want))) || (asc && (double.Parse(flot) < double.Parse(want))))) {
// okSort = true;
//}
if (flot.StartsWith(want.Replace(".", ",")) || ("" + flotOrigin).StartsWith(want.Replace(".", ",")))
if (/*flot.StartsWith(want.Replace(".", ",")) ||*/ ("" + flotOrigin).StartsWith(want.Replace(".", ",")))
{
this.Invoke((MethodInvoker)(() =>
{
textBox2.AppendText("Коомбинация найдена!" + Environment.NewLine);
textBox2.AppendText("Возможный флоат: " + flotOrigin + Environment.NewLine);
textBox2.AppendText("Проверочный флоат: " + flot + Environment.NewLine);
//textBox2.AppendText("Проверочный флоат: " + flot + Environment.NewLine);
textBox2.AppendText("Список флоатов: [");
if (!muteSound)
{
Expand Down Expand Up @@ -433,13 +434,15 @@ private void StartCalculation()
progressBar1.Value = 0;
textBox1.SelectionStart = textBox1.Text.Length;
textBox2.ScrollToCaret();

}
));

List<double> floats = new List<double>();
using (WebClient wc = new WebClient())
{
string json = wc.DownloadString(url);
Console.WriteLine(json);
dynamic r = JsonConvert.DeserializeObject(json);
this.Invoke((MethodInvoker)(() =>
{
Expand Down
4 changes: 2 additions & 2 deletions FloatToolGUI/Main.resx
Original file line number Diff line number Diff line change
Expand Up @@ -686,13 +686,13 @@
<value>137, 20</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>36, 15</value>
<value>38, 15</value>
</data>
<data name="label9.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>v.0.4.1</value>
<value>v.0.4.2</value>
</data>
<data name="&gt;&gt;label9.Name" xml:space="preserve">
<value>label9</value>
Expand Down
Binary file added FloatToolGUI/floattool.ico
Binary file not shown.
Binary file removed FloatToolGUI/sketch-1586878181293.ico
Binary file not shown.

0 comments on commit 6be8fbd

Please sign in to comment.