Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using with Fishing Buddy addon #26

Open
BanditTech opened this issue Dec 31, 2020 · 0 comments
Open

Using with Fishing Buddy addon #26

BanditTech opened this issue Dec 31, 2020 · 0 comments

Comments

@BanditTech
Copy link

I have to say first of all, wow! Great work creating the algorithms to detect the bobber and its movement.

I poked around and made some modifications to the source so that it would cast with two middle mouse button clicks instead of a key. If using the Fishing Buddy addon it will do all sorts of stuff for you automatically like apply the appropriate lure for the zone you are in!

Works wonderfully for the new shadowlands baits, just make sure to remove the Lost Sole Bait from the DB list and your set :)

Other setup requirements is to configure fishing buddy to opperate on middle mouse click, and to unbind middle mouse click from forward movement within the game Keybindings.

Here are the edits made:

Replace the key press with Middle Mouse Button

// WowProcess.PressKey(castKey);
WowProcess.MiddleClickMouse();
Thread.Sleep(120 + random.Next(0, 87));
WowProcess.MiddleClickMouse();

Add this to wowprocess namespace:

public static void MiddleClickMouse()
{
    var activeProcess = GetActiveProcess();
    var wowProcess = WowProcess.Get();
    if (wowProcess != null)
    {
        var oldPosition = System.Windows.Forms.Cursor.Position;
        PostMessage(wowProcess.MainWindowHandle, Keys.WM_MBUTTONDOWN, Keys.VK_RMB, 0);
        Thread.Sleep(30 + random.Next(0, 47));
        PostMessage(wowProcess.MainWindowHandle, Keys.WM_MBUTTONUP, Keys.VK_RMB, 0);
    }
}

and add the key codes to the keys definition

public const UInt32 WM_MBUTTONDOWN = 0x207;
public const UInt32 WM_MBUTTONUP = 0x208;

I am wondering if this is something you would be willing to receive a pull request for, if I was able to figure out a way to add a toggle to the menu for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant