Skip to content
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

feat(NpcBots/bot_ai): Prevent tank/off-tank bots from automatically taunting from other tanks/off-tanks #8

Closed
wants to merge 1 commit into from

Conversation

atrapalis
Copy link

@atrapalis atrapalis commented Jul 27, 2024

Changes Proposed:

Tank/Off-tank bots currently use taunt on cooldown on any target from which they do not have aggro. This causes two issues in raids and dungeons:

  • it makes crowd-control between multiple tanks very awkward as they keep taunting off each other
  • it makes tanking as a player very awkward if there is a tank bot in the raid

The changes proposed here prevent tank/off-tank bots from taunting from other tanks/off-tanks as it is counter-intuitive to try and take threat from a creature which is already being tanked by someone else. This improves crowd/bot control in raids and dungeons.

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

I have been testing these changes for a while in a custom server without any issues.

@trickerer
Copy link
Owner

Bot off-tanks only taunt from other tanks in 2 cases:

  • if the target is pointed off-tanking target and other tank is not an off-tank
  • to save the other tank who is about to die
    Bot main tanks do about the same - only pointed main tanking target from off-tanks or almost dead tanks
    All this can be seen in bot_GridNotifiers.h where the selector is implemented. That's where any additional conditions belong
    There could be a problem with overlapping icons but I'm not sure right now.

The main problem with taunt is you can't set player as a tank unless in raid or LFG group so bot tanks will constantly try to grab everything from you trying to do the tanking.

These changes as they are aren't needed. Check FarTauntUnitCheck class operator for existing conditions.

@atrapalis
Copy link
Author

Thanks for reviewing this! Let me do some more tests to see if anything has changed since I first tested this because it was a long time ago. I know about the requirement to set players as a raid/lfg tank and I took that into account when I tested this originally.

@atrapalis
Copy link
Author

@trickerer I just did some more testing and you are right. I believe this commit 8eef51c makes my changes redundant. The logic is equivalent and it looks like the results are the same.

I must have first worked on my "hack" before this logic was implemented in FarTauntUnitCheck. Will close this pull request now.

@atrapalis atrapalis closed this Jul 28, 2024
@atrapalis atrapalis deleted the patch-5 branch July 28, 2024 12:22
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.

2 participants