ZhengPeiRu21 / mod-playerbots

AzerothCore Playerbots Module
MIT License
193 stars 92 forks source link

Mob EVADE #93

Closed atidot3 closed 2 years ago

atidot3 commented 2 years ago

Hii,

I've noticed the mob enter evade phase if you attack them from distance (like a warlock).

after few miss the mob enter evade phase, go back to spawn and is not attackable anymore until a server restart. i've been trying out alot of test but nothing seems to be functionnal, either launched in Windows and Linux same result.

What surpise me is with a melee it is working fine.

Grakazela commented 2 years ago

+1. running on ubuntu 18.04 most recent version of azerothcore, fork and module, mobs evade when attacked from range, occasionally stop pathfinding and evade until server restart. gm command .die then waiting to respawn does not fix. caster mobs will evade after first hit, cast 2-3 times then evade bug from ranged or melee, removed module and still compiled with fork, same issue. currently doing fresh azerothcore compile with no module to see if issue persists

edit: compiled with no module, and base azerothcore. sql edits still in place, mobs working properly again. issue seems to be with the fork, not the module itself

atidot3 commented 2 years ago

Using main branch azeroth core (not playerbot) is working as intended.

davidonete commented 2 years ago

I am getting the same issues here on ubuntu 20.04 building latest on the Playerbot fork and the latest module version. Everytime the bots are near a player the attacked npc bugs out and can't be hit by any means, always evading.

@atidot3 @Grakazela Just to clarify. Did you build on the latest azerothcore branch from https://github.com/azerothcore/azerothcore-wotlk or from https://github.com/ZhengPeiRu21/azerothcore-wotlk/tree/master and with or without the playerbot module?

atidot3 commented 2 years ago

Hi,

i somesort of fixed this issue with reverting must changes on the core related to the function. You can try it by pulling my fork available here: https://github.com/atidot3/azerothcore-wotlk

Commit: https://github.com/atidot3/azerothcore-wotlk/commit/da0e01eea41d600c83dc859d13aa3e906300faf6

I havent really made much more testing yet.

As it is related to the core with or without the module doesnt matter. Branch used: https://github.com/ZhengPeiRu21/azerothcore-wotlk/tree/master

davidonete commented 2 years ago

Thanks so much atidot3. Taking a look at the diff from your change, did you just change the files from the core or also the files inside of the module?

atidot3 commented 2 years ago

Only on the core, the module is a submodule from: [submodule "modules/mod-playerbots"] path = modules/mod-playerbots url = https://github.com/ZhengPeiRu21/mod-playerbots.git

davidonete commented 2 years ago

For a future reference if @ZhengPeiRu21 decides to tackle this issue. The issue seems to come from the Unit::SetCannotReachTarget, probably being called from somewhere in TargetedMovementGenerator and hanging up the combat. I do not know how to debug a build so I cannot help any further. Sorry...

Grakazela commented 2 years ago

@davidonete i did a fresh pull from the github, didnt grab the fork, and didnt have the module. so only the sql edits remained and the server is running.

Deathman182 commented 2 years ago

I have a clone of his core repo from 06/2022 everything was working back than - must have been some recent change that kills the combat

ZhengPeiRu21 commented 2 years ago

Sorry for the slow responding on this issue! I think I have find the problem and will have it fixed in the next few days. Thank you for the detailed reporting and helpful comments.

ZhengPeiRu21 commented 2 years ago

Would someone when convenient please test if my latest commits to the Playerbot Azerothcore fork fix this problem?

heyitsbench commented 2 years ago

Would someone when convenient please test if my latest commits to the Playerbot Azerothcore fork fix this problem?

Getting the following build error on both latest AC-playerbot branch and Playerbot module:

Severity    Code    Description Project File    Line    Suppression State
Error   C2065   'm_speakTime': undeclared identifier    game    C:\Users\benjy\Documents\GitHub\acplayerbots\azerothcore-wotlk\src\server\game\Entities\Player\Player.cpp   15977   
Error   C2065   'm_speakCount': undeclared identifier   game    C:\Users\benjy\Documents\GitHub\acplayerbots\azerothcore-wotlk\src\server\game\Entities\Player\Player.cpp   15978   
Error   LNK1181 cannot open input file '..\game\RelWithDebInfo\game.lib'    worldserver C:\Users\benjy\Documents\GitHub\acplayerbots\acbuild\src\server\apps\LINK   1   
ZhengPeiRu21 commented 2 years ago

Would someone when convenient please test if my latest commits to the Playerbot Azerothcore fork fix this problem?

Getting the following build error on both latest AC-playerbot branch and Playerbot module:

Severity  Code    Description Project File    Line    Suppression State
Error C2065   'm_speakTime': undeclared identifier    game    C:\Users\benjy\Documents\GitHub\acplayerbots\azerothcore-wotlk\src\server\game\Entities\Player\Player.cpp   15977   
Error C2065   'm_speakCount': undeclared identifier   game    C:\Users\benjy\Documents\GitHub\acplayerbots\azerothcore-wotlk\src\server\game\Entities\Player\Player.cpp   15978   
Error LNK1181 cannot open input file '..\game\RelWithDebInfo\game.lib'    worldserver C:\Users\benjy\Documents\GitHub\acplayerbots\acbuild\src\server\apps\LINK   1   

Thank you. I am strange this did not see when doing my own local build. I will create a fix.

ZhengPeiRu21 commented 2 years ago

It looks like the error was from an unrelated upstream change. I've updated both the module and the branch. Please test again when is convenient. Thank you!

heyitsbench commented 2 years ago

The issue still happens, but it is very infrequent for the player character in my testing. However, it seems to still be happening on basically every mob for the player bots. It's still uploading right now, but here's a video of a bit of my testing showing the bots getting hung up: https://www.youtube.com/watch?v=bLIY9eEE_9U

ZhengPeiRu21 commented 2 years ago

Thank you again for retesting. I will take another look at the fix.

OpexNSK commented 2 years ago

The issue still happens.

rogerc66 commented 2 years ago

The issue still happens.

confirmed, still happens

ZhengPeiRu21 commented 2 years ago

Thank you for the reports. I have try another attempt at fix the issue. Please let me know if it appears to be resolve!

OpexNSK commented 2 years ago

I checked the new build, the npc are not avoiding in combat. But!!! My bots(not random) do not respond to commands, they respond to everything in the chat (unknown command ****). Only following works.
When I turn on random bots I get crash: https://github.com/ZhengPeiRu21/mod-playerbots/issues/96

ZhengPeiRu21 commented 2 years ago

I checked the new build, the npc are not avoiding in combat. But!!! My bots(not random) do not respond to commands, they respond to everything in the chat (unknown command ****). Only following works. When I turn on random bots I get crash: #96

Thank you so much for testing! I think we have fixed the evade issue which was the large blocking problem. I will continue to look at the other issues.

cocely commented 1 year ago

nice