WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   How to disable arena frames in 10.0? (https://www.wowinterface.com/forums/showthread.php?t=59306)

fatal120 11-01-22 08:22 AM

How to disable arena frames in 10.0?
 
Hey,

So I made an addon that would hide arena frames in arenas, but show them in battlegrounds.

This has since stopped working as of 10.0, and I can't figure out why or how to fix it.

Would appreciate any insight, here's the code:
Code:

local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
frame:SetScript("OnEvent", function()
    local instanceType = select(2, IsInInstance())
    if instanceType == "arena" then
        SetCVar('showArenaEnemyFrames', 0, 'SHOW_ARENA_ENEMY_FRAMES_TEXT')
    elseif instanceType == "pvp" then
        SetCVar('showArenaEnemyFrames', 1, 'SHOW_ARENA_ENEMY_FRAMES_TEXT')
    end
end)

Even just setting the CVar manually without the addon doesn't work

Thanks


All times are GMT -6. The time now is 06:30 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI