Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
166 stars 7 forks source link

PLAYER_TARGET_CHANGED + UnitExists firing too often with wrong behaviour #520

Open InfusOnWoW opened 9 months ago

InfusOnWoW commented 9 months ago

With this minimal code:

local f = CreateFrame("FRAME")
f:RegisterEvent("PLAYER_TARGET_CHANGED")
f:SetScript("OnEvent", function(...)
    print(UnitExists("target"), ...)
end)

On target deselection 3 events are received, on the events 1) UnitExists("target") returns false 2) UnitExists("target") returns true 3) UnitExists("target") returns false

https://github.com/Stanzilla/WoWUIBugs/assets/12950521/42ac966b-2237-4772-b891-6ab9cbca9d90

Ghostopheles commented 9 months ago

This is possibly related to another issue surrounding targeting? Occasionally when flying or running around outside of combat, you'll auto-target creatures or players that come within range of you for a frame (presumably 40yds, happens on all classes). Maybe has something to do with range-based auras or something (on Nymue, walking into the boss arena triggers it).

Some people have said they don't see this behavior, I see it all the time. Assuming there's some weirdness under the hood with some system causing you to target something then immediately untarget after it does whatever it's trying to do.

Peterodox commented 8 months ago

Fully disabling Soft Targeting or moving away from Soft Targeting range "fixed" this issue.

/console SoftTargetEnemy 0 /console SoftTargetInteract 0

InfusOnWoW commented 2 months ago

Still an issue.