|
| 1 | +local E, L, V, P, G = unpack(select(2, ...)) |
| 2 | +local S = E:GetModule('Skins') |
| 3 | + |
| 4 | +local unpack = unpack |
| 5 | + |
| 6 | +local GetReforgeItemInfo = GetReforgeItemInfo |
| 7 | + |
| 8 | +function S:Blizzard_ReforgingUI() |
| 9 | + if not (E.private.skins.blizzard.enable or not E.private.skins.blizzard.reforge) then return end |
| 10 | + |
| 11 | + _G.ReforgingFrame:StripTextures() |
| 12 | + _G.ReforgingFrame:SetTemplate('Transparent') |
| 13 | + |
| 14 | + _G.ReforgingFrameFinishedGlow:Kill() |
| 15 | + |
| 16 | + _G.ReforgingFrameButtonFrame:StripTextures() |
| 17 | + |
| 18 | + _G.ReforgingFrameRestoreMessage:SetTextColor(1, 1, 1) |
| 19 | + |
| 20 | + S:HandleButton(_G.ReforgingFrameRestoreButton, true) |
| 21 | + |
| 22 | + S:HandleButton(_G.ReforgingFrameReforgeButton, true) |
| 23 | + _G.ReforgingFrameReforgeButton:Point('BOTTOMRIGHT', -3, 3) |
| 24 | + |
| 25 | + _G.ReforgingFrameItemButton:StripTextures() |
| 26 | + _G.ReforgingFrameItemButton:SetTemplate('Default', true) |
| 27 | + _G.ReforgingFrameItemButton:StyleButton() |
| 28 | + |
| 29 | + _G.ReforgingFrameItemButtonIconTexture:SetInside() |
| 30 | + _G.ReforgingFrameItemButtonIconTexture:SetTexCoord(unpack(E.TexCoords)) |
| 31 | + |
| 32 | + _G.ReforgingFrameItemButton.missingText:SetTextColor(1, 0.80, 0.10) |
| 33 | + _G.ReforgingFrame.missingDescription:SetTextColor(1, 1, 1) |
| 34 | + |
| 35 | + hooksecurefunc('ReforgingFrame_Update', function(self) |
| 36 | + local _, itemID, _, quality = C_Reforge.GetReforgeItemInfo() |
| 37 | + |
| 38 | + if itemID then |
| 39 | + local itemTexture = C_Item.GetItemIconByID(itemID) |
| 40 | + _G.ReforgingFrameItemButtonIconTexture:SetTexture(itemTexture) |
| 41 | + end |
| 42 | + |
| 43 | + -- Blizzard bug / commented out on their end / Blizzard_ReforgingUI.lua:101 |
| 44 | + --[[ |
| 45 | + if quality then |
| 46 | + _G.ReforgingFrameItemButton:SetBackdropBorderColor(GetItemQualityColor(quality)) |
| 47 | + else |
| 48 | + _G.ReforgingFrameItemButton:SetBackdropBorderColor(unpack(E.media.bordercolor)) |
| 49 | + end |
| 50 | + ]] |
| 51 | + end) |
| 52 | + |
| 53 | + S:HandleCloseButton(_G.ReforgingFrameCloseButton) |
| 54 | +end |
| 55 | + |
| 56 | +S:AddCallbackForAddon('Blizzard_ReforgingUI') |
0 commit comments