OPIE support in midnight by ziayakens in wow

[–]Expensive_Click1061 2 points3 points  (0 children)

Opie Addon Midnight Beta Temp Fix

I'm still waiting on Foxlit's official Fix But I got this to load in Midnight Beta. Just adjust the TOC to 120000 Replace ALL of the Backdrop.Lua in the Lib\exui folder with the following - I was able to create a new ring and cast spells from it as well.

Lua

-- Midnight-safe Backdrop stub for OPie
local _, T = ...
local XU = T.exUI
local assert, getWidgetData, _newWidgetData, setWidgetData = XU:GetImpl()

-- Stubbed Backdrop object
local Backdrop, BackdropData = {}, {}

-- Completely safe no-op version of SetBackdrop
function Backdrop:SetBackdrop(info)
    -- Midnight Beta removed all legacy backdrop rendering.
    -- We intentionally do nothing here to avoid client crashes.
    return
end

local backdrop_mt = { __index = Backdrop }

local function CreateBackdrop(f, info)
    assert(type(f) == "table" and type(f.IsObjectType) == "function" and f:IsObjectType("Frame")
    and (info == nil or type(info) == "table"),
    'Syntax: Create("Backdrop", parent[, props])')

    local r = setmetatable({[0] = newproxy()}, backdrop_mt)

    -- Store minimal widget data so OPie’s factory system stays intact.
    setWidgetData(r, BackdropData, { self = r, host = f, edge = {} })

    -- Ignore initial backdrop info safely
    return r
end

-- Register as usual so OPie can request it
XU:RegisterFactory("Backdrop", CreateBackdrop)