Nameplate targeting should use UnitAffectingCombat
evaera opened this issue ยท 8 comments
Before You Begin
- I confirm that I have downloaded the latest version of the addon.
- I am not playing on a private server.
- I checked for an existing, open ticket for this request and was not able to find one.
- I edited the title of this feature request (above) so that it describes the issue I am reporting.
WoW Version
Retail (Dragonflight)
Feature Request
The "Targeting" nameplate check which uses the presence of nameplates on the screen to determine the mob count is currently only recommended for melee specializations and used in conjunction with a short range. However, I've found the nameplate detection to be a better experience on ranged specializations over the default by increasing the range check and changing the addon to simply check if the unit is engaged in combat before counting it. This can be done with the UnitAffectingCombat function.
Without this additional check, all mobs in range are counted which is obviously terrible in a dungeon like Karazhan with lots of mobs.
If you'd rather stay with the current behavior (even though everything seems to work better with this change), I'd request that a setting for this be added because I believe it does vastly improve the accuracy of the addon's recommendations.
Additional Information
I changed the following line in Targets.lua:
for unit, guid in pairs(npGUIDs) do
if
UnitExists(unit)
and UnitAffectingCombat(unit) -- here
and not UnitIsDead(unit)
and UnitCanAttack("player", unit)
and UnitInPhase(unit)
and UnitHealth(unit) > 1
and (UnitIsPVP("player") or not UnitIsPlayer(unit))
then
If you agree with this change, I can submit a PR to add this functionality.
Contact Information
No response
It may help a little bit (i.e., not counting another pack on screen that's not pulled in M+), but it doesn't solve for the fundamental problem related to ranged use of nameplates. Once targets are engaged, if they spread out, it is misleading to count them as targets for an AOE effect.
That's an existing problem, though, and it's not worsened by accounting for targets being in combat.
It may help a little bit (i.e., not counting another pack on screen that's not pulled in M+), but it doesn't solve for the fundamental problem related to ranged use of nameplates. Once targets are engaged, if they spread out, it is misleading to count them as targets for an AOE effect.
That's an existing problem, though, and it's not worsened by accounting for targets being in combat.
This is true, but overall I think using nameplate detection in Mythic+ is an overall improved experience for me. It's usually bad for mobs to be intentionally spread out in Mythic+ so it doesn't happen often. If it's required, you can usually angle your camera to make the nameplates you don't want to hit go away.
Either way, I agree that whether or not you choose to use nameplate detection as Ranged isn't really important to this issue, just if you do, I think that this helps quite a bit.
Do you want me to open a PR to add the change I sampled above?
Would there be a potential solution to account for mob 'grouping' by using a geometric algorithm against the Advanced Combat Log's positionX and positionY to constrain valid targets (in comparison to your actual target).
It would take some doing obviously to implement (and processing power), but would required the Advanced Combat Log to be running though to get access to those parameters through the CLEU. My suggestion begs the question "Is the juice worth the squeeze".
no, thats not how the advamnced combatlogging works. they are file only
You are absolutely correct, belay my last then. I'm not fully awake yet.
Hi
I would like to try playing with this edit.
What did the code end up being with your edit?
Edit, giving this a go:
if checkPets or checkPlates then
for unit, guid in pairs( npGUIDs ) do
if UnitExists( unit ) and UnitAffectingCombat( unit ) and not UnitIsDead( unit ) and UnitCanAttack( "player", unit ) and UnitInPhase( unit ) and UnitHealth( unit ) > 1 and ( UnitIsPVP( "player" ) or not UnitIsPlayer( unit ) ) then
local excluded = not UnitIsUnit( unit, "target" )
Note for anybody else wanting to try this, this will break detection on target dummies since they are a mess in WoW.