Xian55 / WowClassicGrindBot

Highly configurable and responsive World of Warcraft Classic pixel Grind Bot - No DLL injection or memory tampering, just screen capture and input simulation.
179 stars 123 forks source link

Character is not turning to face enemies #517

Closed adamssullivan closed 1 year ago

adamssullivan commented 1 year ago

Description

When enemies get behind the character it will not turn to try and face the mob.

Addon Version

1.7.42

World of Warcraft Client

The Burning Crusade Classic

Reproduction Steps

  1. a mob will get behind my character.
  2. Character will not rotate

Last Good Version

Never used this bot on Classic Era

Screenshots

No response

Logs

out20230711.log

Xian55 commented 1 year ago

Hey

[06:49:56:100 E] Access is denied.
System.ComponentModel.Win32Exception (5): Access is denied.
   at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)

It seems the BlazorServer.exe unable to access the ProcessManager. The issue can be solved by running the BlazorServer.exe with admin privileges. If you not wish to run as admin, you might have to take a deeper look how your system / windows account privileges has been setup.

Missing access to the WoW.exe Process it self can lead to some of the key press events may not sent to the process


Please take a double check about your correctly setup up the keybindings


Meanwhile i can take a look at the Classic Era PTR server.


Update 1:

Classic Era PTR seems fine, Priest_1.json profile needs some adjustments to make it work as intended, but nothing major issues.

After inspecting the uploaded log file, i'm unable to see ERR_BADATTACKFACING or ERR_BADATTACKPOS UI errors. Only seeing SPELL_FAILED_NOT_READY

adamssullivan commented 1 year ago

Thanks for the response. I have checked my key binds and they match. I have also run with admin rights. It seems like it isn't pressing "I" to re-orientate the character. If I manually press "I" it will then face the target.

This is my current Class profile `{ "ClassName": "Priest", "Loot": true, "PathFilename": "1_Gnome.json", "PathThereAndBack": true, "PathReduceSteps": true, "Pull": { "Sequence": [ { "Name": "Mind Blast", "Key": "5", "HasCastBar": true }, { "Name": "Shadow Word Pain", "Key": "6" }, { "Name": "Shoot", "Key": "0", "Item": true, "Requirements": [ "HasRangedWeapon", "not Shooting", "SpellInRange:1" ] } ] }, "Combat": { "Sequence": [ { "Name": "Lesser Heal", "Key": "3", "HasCastBar": true, "Requirement": "Health%<40", "Cooldown": 10000, }, { "Name": "Shadow Word Pain", "Key": "6", "Requirements": [ "not Shadow Word: Pain", "TargetHealth%>10", "Health%>40" ], "Cooldown": 10000, "ResetOnNewTarget": true, "Log": false }, { "Name": "Mind Blast", "Key": "5", "Cooldown": 10000, "Requirements": [ "Health%>40" ], "HasCastBar": true, "Log": false }, { "Name": "Shield", "Key": "4", "Requirements": [ "Health%<75", "not Shield", "TargetHealth%>15" ], "Cooldown": 10000, "Log": false }, { "Name": "Shoot", "Key": "0", "Item": true, "Requirements": [ "HasRangedWeapon", "not Shooting", "SpellInRange:1" ], "Log": false },

]

}, "Adhoc": { "Sequence": [ { "Name": "Fortitude", "Key": "1", "Cooldown": 10000, "Requirement": "not Fortitude", "Log": false }, ] }, "Parallel": { "Sequence": [ { "Name": "Food", "Key": "=", "Requirement": "Health%<30" }, { "Name": "Drink", "Key": "-", "Requirement": "Mana%<30" } ] } }`

Xian55 commented 1 year ago

if you could send a new logs with the changes you made, maybe a more detailed one with more log entry it might give me more insight what could cause the issue.

In the ClassConfig, please be sure to delete or comment out of the "Log": false as this line might hide potential info about the investigation.

adamssullivan commented 1 year ago

out20230711.log With this profile, I am mostly using shoot. I reduced on Mind Blast and when it goes to mind blast it will face the target but if it is just shooting the wand it will just stand there unable to shoot.

Xian55 commented 1 year ago

i've managed to reproduce the issue on my end, basically after pressing the Shoot spell actionbar key, the result of the event is not being awaited. Since the actionbar button is marked as CurrentAction the CastingHandler assumes the cast was success. That's why the ReactCastError unable correct the state.

For a very long time i'm struggling to find a good success condition for the following actions

Some of these abilities have changed from patch to patch so it brings more complexity to have a grasp on these.

Working on it.

adamssullivan commented 1 year ago

Thanks for looking into it.

Xian55 commented 1 year ago

Hi, i did some testing, made some adjustments and speed ups.

After a failed Shoot spell, the character should react to the UI_Error message. If its possible its going to use the Interact button for reducing the player rotation time to the bear minimum for me it takes around 130ms. Otherwise if that's not possible its going to fall back to the manual player turning by the arrow keys which is around 1second.

On the other hand, added some extra guard code to don't end up an infinite action loop of reacting the last UI Error. Basically spinning endlessly.

Let me know how this works out for you. As i only managed to test in the Wrath PTR server. On Classic Era i don't have a character which has a Wand. I've tried to level up on the PTR from 0 but it takes so much time to grind the materials to craft the Enchanter level 6 wand...

Finally you might have to edit the Shoot action is the ClassConfig file. To look something like this https://github.com/Xian55/WowClassicGrindBot/pull/519 as i mentioned in the PR.

adamssullivan commented 1 year ago

That solved my issue. Thanks!

Xian55 commented 1 year ago

Hey i did some testing and find a more reliable way to make Shoot / Wand casting to work and be more reactive to the ui error when its shown one.

More info in https://github.com/Xian55/WowClassicGrindBot/pull/528