# HG changeset patch # User Nenue # Date 1483470401 18000 # Node ID bb38bc0e787ff34178d4ccb6c542b5637e16119f # Parent 43303398d1b907107de156a8c814653305200874 - fix weapon slot anchors for paperdoll diff -r 43303398d1b9 -r bb38bc0e787f Modules/BuffFrame.lua --- a/Modules/BuffFrame.lua Sun Jan 01 19:56:35 2017 -0500 +++ b/Modules/BuffFrame.lua Tue Jan 03 14:06:41 2017 -0500 @@ -243,6 +243,7 @@ (ANCHOR_INSET_DELTA[COUNT_ANCHOR][1] * COUNT_INSET), (ANCHOR_INSET_DELTA[COUNT_ANCHOR][2] * COUNT_INSET)) + self.underlay:SetParent(UIParent) self.underlay:SetFrameStrata('BACKGROUND') @@ -251,6 +252,8 @@ self.border:SetPoint('BOTTOMRIGHT', self, 'BOTTOMRIGHT', BORDER_SIZE_R, -BORDER_SIZE_D) self.border:Show() + -- play nice with Blizzard's frame locking structure + FRAMELOCK_STATES.PETBATTLES[self:GetName()] = "hidden" FRAMELOCK_STATES.PETBATTLES[self.underlay:GetName()] = "hidden" end diff -r 43303398d1b9 -r bb38bc0e787f Modules/PaperDoll.lua --- a/Modules/PaperDoll.lua Sun Jan 01 19:56:35 2017 -0500 +++ b/Modules/PaperDoll.lua Tue Jan 03 14:06:41 2017 -0500 @@ -4,7 +4,7 @@ -- %file-revision% -- Displays the item level and modifications of character sheet equipment, including artifact power local print = DEVIAN_WORKSPACE and function(...) print('PaperDoll', ...) end or nop - +local artifactSlot local slot_overlays = {} VeneerPaperDollMixin = { anchorFrame = 'CharacterFrame', @@ -75,7 +75,6 @@ self:RegisterEvent('INSPECT_READY') end function VeneerPaperDollMixin:SetupArtifactUI() - self:RegisterEvent('ARTIFACT_UPDATE') end function VeneerPaperDollMixin:Setup() @@ -86,6 +85,7 @@ self:RegisterEvent('UNIT_INVENTORY_CHANGED') self:RegisterEvent('PLAYER_EQUIPMENT_CHANGED') self:RegisterEvent('PLAYER_SPECIALIZATION_CHANGED') + self:RegisterEvent('ARTIFACT_UPDATE') self:MarkForUpdate() end @@ -112,6 +112,7 @@ slot_overlays[panel] = slot_overlays[panel] or {} local overlay = slot_overlays[panel][slot] if not overlay then + print('creating slot overlay', slot) overlay = CreateFrame('Frame', 'VeneerPaperDollSlot' .. unit .. slot, frame, 'VeneerPaperDollSlotInfoTemplate') overlay:SetID(slot) slot_overlays[panel][slot] = overlay @@ -135,6 +136,10 @@ overlay.ItemLevel:SetFontObject(VeneerNumberFontLarge) overlay.ItemLevel:ClearAllPoints() overlay.ItemLevel:SetPoint('BOTTOM', overlay.Sockets, 'TOP', 0, 4) + if unit == 'player' then + artifactSlot = overlay + end + end print(overlay.Sockets:GetPoint(1)) @@ -173,7 +178,13 @@ self:MarkForUpdate() end elseif event == 'ARTIFACT_UPDATE' then - self:MarkForUpdate() + + if artifactSlot then + print('just udpate artifact slot') + artifactSlot:Update(true) + end + + else if (event == 'PLAYER_SPECIALIZATION_CHANGED' or event == 'UNIT_INVENTORY_CHANGED') then if arg ~= 'player' then @@ -264,7 +275,6 @@ self.hasRelicSlots = true if numRelics and isEquipped then print('Relic Query:', itemID, numRelics) - self.checkRelic = nil for i = 1, numRelics do local lockedReason, relicName, relicIcon, relicLink = C_ArtifactUI.GetRelicInfo(i); local relicType = C_ArtifactUI.GetRelicSlotType(i); @@ -308,10 +318,7 @@ end end -local SocketIcon_Update = function(frame) -end - -function VeneerPaperDollSlotMixin:Update() +function VeneerPaperDollSlotMixin:Update(forced) local id = self:GetID() self.SocketInfo = self.SocketInfo or {} @@ -320,7 +327,10 @@ local tooltip = VeneerPaperDollTooltip tooltip:SetOwner(self, 'ANCHOR_NONE') - print('refresh', self.unit, id) + if forced then + print('refresh', self.unit, id) + end + tooltip:SetInventoryItem(self.unit or 'player', id) tooltip:Show() @@ -328,7 +338,7 @@ local numTextures = 0 local itemLevel local itemLevelLine - print('|cFFFFFF00Sockets scan:', numLines) + --print('|cFFFFFF00Sockets scan:', numLines) for i = 1, numLines do local line = _G['VeneerPaperDollTooltipTextLeft'..i] local text = line and line:GetText() @@ -343,7 +353,7 @@ local texture = _G['VeneerPaperDollTooltipTexture'..i] if texture and texture:IsShown() then numTextures = numTextures + 1 - print('picked up socket', numTextures, texture:GetTexture()) + --print('picked up socket', numTextures, texture:GetTexture()) self.SocketInfo[numTextures] = texture:GetTexture() end end @@ -357,7 +367,7 @@ local socketsHeight = 24 for index, icon in ipairs(self.Sockets.SocketIcon) do if self.SocketInfo[index] then - print('|cFF0088FFsocketInfo|r', index, self.SocketInfo[index]) + --print('|cFF0088FFsocketInfo|r', index, self.SocketInfo[index]) icon:ClearAllPoints() icon:SetTexture(self.SocketInfo[index]) @@ -377,6 +387,7 @@ end socketsWidth = socketsWidth + icon:GetWidth() end + print( '|cFFFF4400', icon:GetPoint(1)) local label = self.Sockets.SocketLabel[index] label:ClearAllPoints() @@ -391,9 +402,10 @@ self.Sockets.SocketBg[index]:SetAtlas(relicAtlasName) self.Sockets.SocketBg[index]:SetPoint('TOPRIGHT', icon, 'TOPRIGHT', 12, 12) self.Sockets.SocketBg[index]:SetPoint('BOTTOMLEFT', icon, 'BOTTOMLEFT', -12,-12) - print('', self.SocketType[index], relicAtlasName) + --print('', self.SocketType[index], relicAtlasName) socketsHeight = self.Sockets.SocketBg[index]:GetHeight() + print(socketsWidth, socketsHeight) end diff -r 43303398d1b9 -r bb38bc0e787f Modules/WorldState.lua --- a/Modules/WorldState.lua Sun Jan 01 19:56:35 2017 -0500 +++ b/Modules/WorldState.lua Tue Jan 03 14:06:41 2017 -0500 @@ -20,7 +20,7 @@ VeneerWorldStateCurrencyMixin = { } VeneerWorldStateProgressMixin = { - keepOpen = false, + keepOpen = true, } VeneerWorldStateMixin = { maxHeight = 0, diff -r 43303398d1b9 -r bb38bc0e787f Modules/WorldState.xml --- a/Modules/WorldState.xml Sun Jan 01 19:56:35 2017 -0500 +++ b/Modules/WorldState.xml Tue Jan 03 14:06:41 2017 -0500 @@ -4,154 +4,11 @@