forked from julianperrott/WowClassicGrindBot
-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Update LootGoal to prevent bot getting stuck #639
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
86d2365
LootGoal add timeout so that we dont get stuck looting while mobs hit…
lionaneesh 9839d7b
LootGoal: add precondition not in combat, not pulled
lionaneesh 006c889
LootGoal clear target if inventory full, again prevents bot getting s…
lionaneesh c21bd58
Wait: Add while with timeout
lionaneesh b255d90
Core: RequirementFactory: Added 'SoftTargetDead' and 'SoftTarget'
Xian55 3ed8f41
Core: CombatGoal: After a new target was found wait for an update to …
Xian55 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you provide logs about this situation ?
I'm really curious about you end up stuck in here. If the code stuck in here, then there's no point of entering the Goal itself. This can be moved into
CanRun()
or add aPrecondition
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.
Sometimes the Inventory is full and the bot gets stuck looting. This fixes that with a timeout.
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.
Yes, that
LootReset
value is hooked up to theLootWindow
visibility, if the player cannot loot any items or just partially be able to loot a few items, then theLootWindow
will remain visible indefinitely.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.
Its not only about the window, the bot is stuck looting and getting hit by mob but not attacking.
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.
I've tested the change locally while my inventory was full. My character was not remained stuck after loot.
related log:
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.
Hold on i might have a repro case for 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.
Ye its been a long running issue which always screw me over since it was introduced with the latest expansion.
Since Dragonflight a new Soft Targeting system has been added, which was not fully integrated with the gameplay.
Its highly situational and depends on your character positioning and camera angle to get stuck.
So the scenario is this
CombatGoal
is active there will be no other action to use to it most likely going to choose eitherAutoAttack
orApproach
.Interact with target
which going to initiate loot if the soft target becomes the previously killed target.Locally i managed to work around the issue by adding two extra Requirements to
RequirementFactory
so my class profile looks like this
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.
I've just pushed a new version, i think it should tackle the concerns about the original PR, however potentially fixes many more issues, even with skinning related issues. When the player become idle due conflicting Soft Targeting feature... especially when multiple mob encounter is involved!
If you have time to checkout this version and run some test, i would highly appreciate your feedback on the matter!
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.
Here's a video with the fixed logic.
Notice, after the first mob dies, it wont immediately start auto attacking the second, but awaits the
Raptor Strike
cooldown which initiates theAuto Attacking
due the dead target still the player soft target! Pressing theInteract with Target
key(I) would make the player stuck.1080_watermark_big.mp4
Sadly during this situation the Interact key looting become unavailable due it will keep attempting the same target instead of trying to progress with the rest of the dead targets.
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.
Here's another one with 3 targets.
1080_watermark_big.mp4