Skip to content

Conversation

@Celandriel
Copy link
Contributor

@Celandriel Celandriel commented Jul 10, 2025

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.

@notOrrytrout
Copy link
Contributor

Im happy you took over. 🙂

@notOrrytrout
Copy link
Contributor

The Dustin changes seem promising too.

@Celandriel
Copy link
Contributor Author

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.

@notOrrytrout
Copy link
Contributor

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.

@Celandriel
Copy link
Contributor Author

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.

@noisiver
Copy link
Collaborator

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.
@notOrrytrout
Copy link
Contributor

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.)
@Celandriel
Copy link
Contributor Author

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
The master casts fishing.
If the bot knows how to fish it will activate the fishing with master strategy.
This checks if the bot is within 5 yards of water, if they are then they face the water. If not then they move within 10 yards of the water (set by the config)
Then it checks if the bot has a pole, and tried to equip one. (It will give an rndbot a fishing pole)
Then it casts the fishing spell, triggering the usebobber strategy.
This will check the bobber state and use it when ready.

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.)

@Celandriel Celandriel marked this pull request as ready for review July 28, 2025 23:19
…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.
@Celandriel Celandriel marked this pull request as ready for review October 10, 2025 18:29
@ScoobyPwnsOnU
Copy link

ScoobyPwnsOnU commented Oct 11, 2025

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;
}
}
}
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

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

@Celandriel
Copy link
Contributor Author

Update ready to test.
Some notable changes since last review. I added an AI value storing the fishing position to enable some persistence across tic, and modified the move isUseful to prevent constant repositioning.
I moved the distance check to master within the position searches to better exclude invalid points.
I also added a general fishing search distance as an upper search limit for general usage that currently shouldnt be enabled but futureproofs the function for worldfishing.
Clean up unused variables.

@ScoobyPwnsOnU
Copy link

ScoobyPwnsOnU commented Oct 18, 2025

All current testing has been done on horde.

Tested some on the newest update and seeing it's honestly in the best condition it's been yet. No crashes I've seen.

Valley of Honor testing seems they work on the coast, in the pond, and on the dock. They do do this thing while standing in ankle deep water where they pop up on top to stand on top of the water, but they do not do that when swimming so it probably isn't an issue.
image

Also tested RND bots there and they, once you trained fishing for them, did successfully fish with the master.

Did some testing on schools of fish and the bots do seem to prioritize aiming at them when they're close enough to detect them, though they did have a lil issue seeing some of them from the docks in Booty Bay, but that's probably more of an issue with BB line of sight.

Last thing I was testing was I was just trying to find some complicated zones to see if I could trip up the logic and I may have found it in Netherstorm.
image
I had a full raid squad and if i do a nc +master fishing, within like 2 minutes 75% of them will have already dropped the strategy for some reason. Not sure why.

Aside from that the only other potential issue is chat flooding because of equipping and unequipping the fishing pole over and over while they fish. It can get so intense with a raid group that it'll flood your entire chat off the screen within 5 seconds.

20251018-0003-04.4339643.mp4

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.
@Celandriel
Copy link
Contributor Author

Latest version is up. I addressed previous comments, additionally I modified the style to reflect the modules recently adopted style.
"End Fishing" was renamed to "End Master Fishing" to better reflect the purpose of the function.
Logic was adjusted to check if bot has moved from the current fishing position, and then the search window was expanded to account for small bodies of water.
Looting meat now does not trigger an equip upgrades action.

@ScoobyPwnsOnU
Copy link

Tested Horde and Ally

Full 40 man raid group, as long as you aren't low level fishing(so fishing up a lot of junk) the spam is SIGNIFICANTLY reduced. They still blow up chat with spam anytime somebody loots junk or a potion which does sound like it prlly should be fixed because why would bots trigger an equipment check from looting a potion, but also that it may be outside of the scope of this project so I'm not going to mark that against it, this project is about fishing and you made it so fish don't cause equipment checks so gg✅

I rechecked the smaller pools that were causing me problems before and they seem to be working just fine now, no issues. ✅

For Horde I did testing in Valley of Honor, Netherstorm, Crystalsong, Borean Tundra, and Booty Bay. As of the latest update all seem about as flawless as you could expect from bots.✅

For Ally I did testing in Stormwind, Wetlands, Terokkar Forest, and Zangarmarsh.
Wetlands, Terokkar, and Zangarmarsh were all flawless. ✅
Stormwind seems to have some issues when you fish in certain areas. The dock where the fishing trainer is I had a bot hang up looking for a spot to fish unsuccessfully for a solid 15 minutes, and hung up again when i moved to a different spot. But upon leaving the area and coming back it worked fine?
image
Then the bridge nearby has a thing where bots will not use parts of the bridge.
image
To explain that in further detail, I will use highlighted pictures to illustrate.
image
image
So for the side looking at the wall they will fish from anywhere on that side of the bridge in any direction no problem. On the other side of the bridge looking towards the fishing trainer they will run away from you down the bridge in either direction like they're trying to get off the bridge to find somewhere to fish, then eventually they all end up in that little green corner fishing towards that wall as if it's the only viable spot on that side of the bridge.
They also will not fish off the big bridge out in front of stormwind. It's like they have no idea there's water down there at all.
image

That being said the stormwind stuff is pretty easily avoidable so I wouldn't consider it a mission critical issue that would grind everything to a halt if it can't be easily solved as all the problematic areas are extremely easily avoidable.

@ScoobyPwnsOnU
Copy link

ScoobyPwnsOnU commented Oct 24, 2025

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.

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

Successfully merging this pull request may close these issues.

9 participants