7x [ADDON_ACTION_BLOCKED] AddOn 'ShadowedUnitFrames' tried to call the protected function 'CheckInteractDistance()'. #2180


  • Invalid
Open
  • Pegga created this issue Apr 1, 2025

    7x [ADDON_ACTION_BLOCKED] AddOn 'ShadowedUnitFrames' tried to call the protected function 'CheckInteractDistance()'.
    [string "@!BugGrabber/BugGrabber.lua"]:485: in function <!BugGrabber/BugGrabber.lua:485>
    [string "=[C]"]: in function `CheckInteractDistance'
    [string "@ShadowedUnitFrames/modules/range.lua"]:53: in function <ShadowedUnitFrames/modules/range.lua:33>
    [string "@ShadowedUnitFrames/modules/range.lua"]:100: in function `?'
    [string "@ShadowedUnitFrames/modules/units.lua"]:21: in function `FullUpdate'
    [string "@ShadowedUnitFrames/modules/units.lua"]:295: in function `CheckUnitStatus'
    [string "@ShadowedUnitFrames/modules/units.lua"]:211: in function <ShadowedUnitFrames/modules/units.lua:208>
    [string "=[C]"]: in function `Show'
    [string "@Blizzard_FrameXML/SecureStateDriver.lua"]:83: in function <...rfaceBlizzard_FrameXML/SecureStateDriver.lua:73>
    [string "@Blizzard_FrameXML/SecureStateDriver.lua"]:137: in function <...rfaceBlizzard_FrameXML/SecureStateDriver.lua:119>

    Locals:
    _ = Frame {
    }
    event = "ADDON_ACTION_BLOCKED"
    events = <table> {
    }

  • Pegga added a tag Invalid Apr 1, 2025
  • Pegga posted a comment Apr 19, 2025

    1x [ADDON_ACTION_BLOCKED] AddOn 'ShadowedUnitFrames' tried to call the protected function 'CheckInteractDistance()'.
    [!BugGrabber/BugGrabber.lua]:485: in function <!BugGrabber/BugGrabber.lua:485>
    [C]: in function 'CheckInteractDistance'
    [ShadowedUnitFrames/modules/range.lua]:53: in function <ShadowedUnitFrames/modules/range.lua:33>

    Locals:
    _ = Frame {
    }
    event = "ADDON_ACTION_BLOCKED"
    events = <table> {
    }

  • Pegga posted a comment Apr 19, 2025

    I think this may fix it.


        if( not UnitIsConnected(frame.unit) or not UnitInPhase(frame.unit) ) then
            frame:SetRangeAlpha(ShadowUF.db.profile.units[frame.unitType].range.oorAlpha)
        elseif( spell ) then
            frame:SetRangeAlpha(LSR.IsSpellInRange(spell, frame.unit) == 1 and ShadowUF.db.profile.units[frame.unitType].range.inAlpha or ShadowUF.db.profile.units[frame.unitType].range.oorAlpha)
        -- That didn't work, but they are grouped lets try the actual API for this, it's a bit flaky though and not that useful generally
        elseif( UnitInRaid(frame.unit) or UnitInParty(frame.unit) ) then
            frame:SetRangeAlpha(UnitInRange(frame.unit, "player") and ShadowUF.db.profile.units[frame.unitType].range.inAlpha or ShadowUF.db.profile.units[frame.unitType].range.oorAlpha)
        -- Remove CheckInteractDistance fallback to avoid protected function errors
        else
            frame:SetRangeAlpha(ShadowUF.db.profile.units[frame.unitType].range.oorAlpha)
        end
    end

To post a comment, please login or register a new account.