Skip to content

Commit

Permalink
Fix various timing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewthe13th committed Dec 3, 2021
1 parent 0f238b3 commit 94a60ff
Show file tree
Hide file tree
Showing 10 changed files with 2,402 additions and 2,070 deletions.
6 changes: 4 additions & 2 deletions GenshinGuide/ArtifactScraper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,8 @@ public static Artifact ScanArtifact(List<Bitmap> bm, int id)
Color equippedColor = bm[a_equippedCharacter].GetPixel(5, 5);

// Check for lock color
Color lockColor = Color.FromArgb(255, 255, 138, 117);
//Color lockColor = Color.FromArgb(255, 255, 138, 117);
Color lockColor = Color.FromArgb(255, 158, 161, 168);
Color lockStatus = bm[a_lock].GetPixel(0, 0);

// Remove artifacts lower than 3 star
Expand All @@ -551,7 +552,8 @@ public static Artifact ScanArtifact(List<Bitmap> bm, int id)
{
rarity = (Scraper.CompareColors(fiveStar, rarityColor)) ? 5 : 4;
bool b_equipped = Scraper.CompareColors(equipped, equippedColor);
_lock = Scraper.CompareColors(lockColor, lockStatus);
//_lock = Scraper.CompareColors(lockColor, lockStatus);
_lock = Scraper.CompareColors(lockColor, lockStatus) ? false: true;

// Improved Scanning using multi threading
Thread thr1 = new Thread(() => gearSlot = ScanArtifactGearSlot(bm[a_gearSlot], width, height));
Expand Down
23 changes: 18 additions & 5 deletions GenshinGuide/Form1.Designer.cs

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

10 changes: 7 additions & 3 deletions GenshinGuide/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ private int ScannerDelayValue(int value)
{
return 100;
}
else if (value == 3)
{
return 200;
}
else
{
return 100;
Expand Down Expand Up @@ -358,12 +362,12 @@ private void label17_Click(object sender, EventArgs e)

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/Andrewthe13th/Genshin_Scanner/");
System.Diagnostics.Process.Start("https://github.com/Andrewthe13th/Inventory_Kamera");
}

private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/Andrewthe13th/Genshin_Scanner/issues");
System.Diagnostics.Process.Start("https://github.com/Andrewthe13th/Inventory_Kamera/issues");
}

private void label17_Click_1(object sender, EventArgs e)
Expand All @@ -373,7 +377,7 @@ private void label17_Click_1(object sender, EventArgs e)

private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/Andrewthe13th/Genshin_Scanner/releases");
System.Diagnostics.Process.Start("https://github.com/Andrewthe13th/Inventory_Kamera/releases");
}

private void ProgramStatus_Click(object sender, EventArgs e)
Expand Down
Loading

0 comments on commit 94a60ff

Please sign in to comment.