-
Notifications
You must be signed in to change notification settings - Fork 284
Feat. Add Fishing action and fish with master. #1433
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
base: master
Are you sure you want to change the base?
Conversation
|
Im happy you took over. 🙂 |
|
The Dustin changes seem promising too. |
|
So quite a few changes. Now the bots will fish with the master (Fishing on their own tbd) and the logic for detecting a bobber seems to be ok. Its not looting on pushing the worldpacket so that needs to be worked on, but im at a loss on how to do that right now. |
|
It would be cool to merge this. I know the bots can’t loot the bobber but at least they fish. Then make a separate issue that they don’t loot. What do you all think. |
|
Not just yet. I need to fix the windows compile issue, and I don't like that the action is triggered at every spell cast. |
|
I think it makes sense to wait until the looting part is handled. I'm thinking of all the users who will complain about the bots not looting what they fish for as they don't know any better, not that I can fully disagree with them. |
…cast doesnt always look correct (i.e. bot faces the wrong way etc. no visible pole, etc). Ive diabled the move to fishing area currently because it needs some work.
|
Wow. You are good. 😎 |
…egy with a 'seldom' frequency and add config parameter for the search distance. Change move to location to make it configurable so that I can search for the nearest land point when searching for the nearest fishable water. Should avoid bots fishing in the water.
…irection in game and that it uses the pole. (Need to adjust this whole action and split it up.)
|
So I reworked quite a bit how this works. At this time I limited this to be triggered only when a master is fishing. Its not tested with rndbots (and either way they dont have professions currently.) The way this works is If no bobber the bot owns is present, or if it loots the bobber, it turns off the usebobber strategy. The masterfishing strategy is turned off only when the master is further than 10 yards away from the bot. (If anyone has suggestions for additional end points feel free to suggest.) |
…tion events. Added constants. Rename some functions for clarity. Cleaned up the hasWaterOrLand function, added height buffer to the Get Height search. Split radial land and water searches. Added IsValid helper function for WorldPositions. Clean uplogging messages Overhauled FishingAction to not try to move anymore. Move Done Fishing to an isUseful action.
|
Cursory testing seems to show that while in water like Valley of Honor, they work great. Seem like 100% success. Standing next to water is a bit worse where they seem to be getting caught in loops of going to the water, maybe fishing maybe not, then running back to you and attempting to find a new spot over and over, wasting more time looking for spots than actually fishing. Standing on a dock seems quite iffy, though so far I only tried one. The dock where the fishing trainer is in Valley of Honor seems like a 0% success rate. Standing on it and readjusting the bots positioning a few different times over like 10 minutes I never once saw a single successful fish, though they did seem to try to find spots, they never actually threw out their line. I'll try to check some more tomorrow. |
| return true; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No return value when previous if is not true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentional. If the bot cannot find a valid spot to fish for a fishing hole we default to trying to just fish anywhere. So we dont want to return false yet.
| /* | ||
| * Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it | ||
| * and/or modify it under version 2 of the License, or (at your option), any later version. | ||
| * Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License version should be same across all files
|
Update ready to test. |
Expand master fishing check to include check for current position and extend search window to account for small bodies of water. Increase number of points for radial search for better positioning.
|
Latest version is up. I addressed previous comments, additionally I modified the style to reflect the modules recently adopted style. |
|
Also had another idea to test this morning, as I tested in the past whether they'll engage in combat while fishing and they will, but upon looking closer I confirmed they will not swap off their fishing poles if starting combat while fishing. Seems like it could be problematic in the right circumstances. Edit: actually upon more rigorous testing it seems like sometimes bots will only turn towards the enemy and not begin combat until their fishing ends. |







Update :Thank you to @notOrrytrout from prompting me to work on this. Its been a huge learning experience.
With @notOrrytrout I started working on enabling bot fishing with master, but also on their own.
The first commit didnt crash, showing that it was possible to have a bot cast when master does. Currently it compiles but crashes when you try to fish with a bot in the group, whether the bot has fishing or not. It makes me think that the check in FishingValues is broken somehow, but I cant figure out how.