Skip to content

Commit

Permalink
Add ability for user to change sell count.
Browse files Browse the repository at this point in the history
  • Loading branch information
station384 committed May 9, 2019
1 parent 8c0fdb4 commit 8fd8e35
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
52 changes: 46 additions & 6 deletions WowFishingAssist/MainForm.Designer.cs

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

10 changes: 8 additions & 2 deletions WowFishingAssist/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public partial class MainForm : Form
private const UInt32 SWP_NOMOVE = 0x0002;
private const UInt32 TOPMOST_FLAGS = SWP_NOMOVE | SWP_NOSIZE;
private static bool useLure = false;
private static int numCastsBeforeSellJunk = 150;
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
Expand Down Expand Up @@ -339,7 +340,7 @@ private async void ClickBobber(Rectangle x1)



if ((CastCount % 150) == 149 && cbSellJunk.Checked)
if ((CastCount % numCastsBeforeSellJunk+1) == numCastsBeforeSellJunk && cbSellJunk.Checked)
{
await sendSellSequence();
return;
Expand Down Expand Up @@ -510,7 +511,7 @@ private void LureTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)

private void ScreenUpdateTimer_Tick(object sender, EventArgs e)
{
lblCastCount.Text = CastCount.ToString();
lblCastCount.Text = String.Concat(CastCount.ToString(),":", (CastCount % numCastsBeforeSellJunk));
lblLureTime.Text = useLure ? "1" : "0";
}

Expand All @@ -530,5 +531,10 @@ private void cbHerringLure_CheckedChanged(object sender, EventArgs e)
{
if (cbHerringLure.Checked) { useLure = true; } else { useLure = false; }
}

private void numCastsBeforeSell_ValueChanged(object sender, EventArgs e)
{
numCastsBeforeSellJunk = (int)numCastsBeforeSell.Value;
}
}
}
2 changes: 1 addition & 1 deletion WowFishingAssist/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.5.3")]
[assembly: AssemblyVersion("0.5.4")]
[assembly: AssemblyFileVersion("0.5.0.0")]

0 comments on commit 8fd8e35

Please sign in to comment.