Stanzilla / WoWUIBugs

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

ScriptRegion:IsProtected returns incorrect values #470

Closed Meorawr closed 6 months ago

Meorawr commented 10 months ago

As of patch 10.1.7 and 3.4.3 ScriptRegion:IsProtected is returning incorrect values (possibly swapped?) when querying the state of an unprotected parent frame that has a protected child.

Test case

Execute the following command:

/run CreateFrame("Frame", "P") CreateFrame("Frame", "C", P, "SecureFrameTemplate") print(P:IsProtected())

The return values printed will be the following:

  1. isProtected - true if this frame protected either due to being explicitly made so at the point of creation, or if it has a protected child or dependant anchor.
  2. isExplicitlyProtected - true only if this frame was protected at the point of creation.

The expected return values printed are true, false - the parent frame P has a protected child frame, but the parent frame itself does not derive from a protected template.

The incorrect return values being printed in patch 10.1.7 and 3.4.3 are false, true - this implies that parent frame P is not protected despite having a protected child frame, but was also paradoxically explicitly protected at the point of creation despite inheriting no protected templates.

seblindfors commented 10 months ago

This bug prevents access to previously accessible (implicitly secure) frames in combat returned by HANDLE:GetChildren(): https://github.com/Gethe/wow-ui-source/blob/live/Interface/FrameXML/RestrictedFrames.lua#L80 https://github.com/Gethe/wow-ui-source/blob/live/Interface/FrameXML/RestrictedFrames.lua#L229

Meorawr commented 6 months ago

Fixed in 10.2.5.