# HG changeset patch
# User Nenue
# Date 1493251598 14400
# Node ID ddfe19d70a34b4da42e1dafa28cd2c6a68fec70d
# Parent 8c94bee4fdfcb8470b418d3c92ed06bc4b1d3914
ArtifactPower:
- Further 7.2 accommodations, relating to tokens that grant millions of AP.
Currency:
- Ancient Mana zones list expanded
- Legionfall War Supplies, Nethershards, and Blood of Sargeras are tracked globally
PaperDoll:
- Should update more effectively when delayed artifact data loads in.
WorldState:
- Fixed hanging panels after OrderHallCommandBar is hidden.
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/ArtifactPower.lua
--- a/Modules/ArtifactPower.lua Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/ArtifactPower.lua Wed Apr 26 20:06:38 2017 -0400
@@ -13,7 +13,7 @@
scanQueue = {},
ItemButtons = {},
anchorPoint = 'TOP',
- anchorPriority = 2,
+ anchorPriority = 3,
anchorFrom = 'TOP',
moduleName = 'Artifactor',
HideCombat = true
@@ -22,7 +22,7 @@
firstUse = true,
autoHide = true,
}
-local ap = VeneerArtifactPowerMixin
+local Module = VeneerArtifactPowerMixin
local BAGS_TO_SCAN = {BACKPACK_CONTAINER }
local TOOLTIP_NAME = 'VeneerAPScanner'
local POINT_COSTS = {
@@ -39,13 +39,15 @@
3975000, 4175000, 4385000, 4605000
}
local FISHING_MAX_TRAITS = 24
-local WEAPON_MAX_TRAITS = 54
+local WEAPON_MAX_TRAITS = 92
+local FRAME_PADDING = 4
+local EQUIPPED_SIZE = 64
local BUTTON_SIZE = 48
local FRAME_LIST = {'ContainerFrame1', 'BankFrame'}
local BAG_FRAMES = {'ContainerFrame1'}
local BANK_FRAMES = {'BankFrame'}
-function ap:OnLoad()
+function Module:OnLoad()
self:RegisterEvent('BAG_UPDATE') -- use to obtain bag IDs to scan
self:RegisterEvent('BAG_UPDATE_DELAYED') -- use to trigger actual scan activity
self:RegisterEvent('BANKFRAME_OPENED') -- determine when bank info is available
@@ -85,7 +87,9 @@
end
local ShortNumberString = function (value)
- if value >= 100000 then
+ if value >= 1000000 then
+ return tostring(floor(value/100000)/10) .. 'M'
+ elseif value >= 100000 then
return tostring(floor(value/1000)) .. 'k'
elseif value >= 1000 then
return tostring(floor(value/100)/10) .. 'k'
@@ -163,7 +167,7 @@
end
end
-function ap:Setup()
+function Module:Setup()
print(self:GetName()..':Setup()')
local guid = UnitGUID('player')
VeneerData.ArtifactPower = VeneerData.ArtifactPower or defaultSettings
@@ -243,7 +247,7 @@
local UNDERLIGHT_ANGLER_ID = 133755
-function ap:ResetCache()
+function Module:ResetCache()
table.wipe(self.cache.items)
table.wipe(self.cache.fishing)
table.wipe(self.cache.bags)
@@ -251,7 +255,7 @@
self:ScanAllBags()
end
-function ap:QueueBag(containerID)
+function Module:QueueBag(containerID)
containerID = tonumber(containerID)
if not containerID then
return
@@ -263,13 +267,13 @@
end
end
-function ap:Reanchor()
+function Module:Reanchor()
if Veneer then
Veneer:DynamicReanchor()
end
end
-function ap:OnShow()
+function Module:OnShow()
print('|cFFFFFF00OnShow()|r')
for name, args in pairs(PENDING_HOOKS) do
@@ -284,11 +288,11 @@
self:ScanAllBags()
self:Reanchor()
end
-function ap:OnHide()
+function Module:OnHide()
print('|cFF88FF00OnHide()|r', debugstack())
self:Reanchor()
end
-function ap:OnEnter()
+function Module:OnEnter()
GameTooltip:SetOwner(self, 'ANCHOR_CURSOR')
@@ -298,7 +302,7 @@
end
-function ap:TryToShow()
+function Module:TryToShow()
print('|cFFFFFF00TryToShow()')
@@ -321,7 +325,7 @@
end
-function ap:OnEvent(event, ...)
+function Module:OnEvent(event, ...)
print('|cFF00FF88OnEvent()', event, ...)
if event == 'PLAYER_ENTERING_WORLD' then
self:TryToShow()
@@ -380,7 +384,7 @@
end
end
-function ap:OnUpdate()
+function Module:OnUpdate()
if #self.scanQueue >= 1 then
local scanInfo = tremove(self.scanQueue, 1)
end
@@ -392,12 +396,12 @@
end
-function ap:OnMouseDown()
+function Module:OnMouseDown()
self.enabled = nil
self:Hide()
end
-function ap:Update()
+function Module:Update()
if not self:IsShown() then
print('|cFFFF4400Update()|r')
return
@@ -427,8 +431,10 @@
if not self.worldPlanHooked then
WorldPlan:RegisterDataCallback(function()
+ print('data udpate callback')
self:Update()
end)
+ self.worldPlanHooked = true
end
@@ -436,7 +442,7 @@
print('world plan is loaded')
local worldQuests = WorldPlan:GetQuestPins()
for index, pin in ipairs(worldQuests) do
- if pin.dataLoaded and (pin.rewardType == WORLD_QUEST_REWARD_TYPE_FLAG_ARTIFACT_POWER) and (pin.isActive) then
+ if (pin.rewardType == WORLD_QUEST_REWARD_TYPE_FLAG_ARTIFACT_POWER) and (pin.isActive) and (pin.dataLoaded) then
showWQ = true
print(pin.itemNumber)
self.worldQuestAP = self.worldQuestAP + pin.itemNumber
@@ -455,13 +461,13 @@
local contentsHeight = 16 + self.SummaryHeader:GetHeight()
local contentsWidth = self.SummaryHeader:GetWidth() + 16
if self.profile.knowledgeMultiplier then
- numButtons = self:UpdateArtifactButtons()
+ local artifactsWidth = self:UpdateArtifactButtons()
- if numButtons ~= 0 then
+ if artifactsWidth ~= 0 then
contentsHeight = contentsHeight + 64
end
- contentsWidth = max(contentsWidth, 64*numButtons + 4 * (numButtons+1))
+ contentsWidth = max(contentsWidth, artifactsWidth)
local itemsWidth, itemsHeight = self:UpdateItemButtons()
contentsHeight = contentsHeight + itemsHeight
@@ -479,7 +485,7 @@
self:Reanchor()
end
-function ap:UpdateArtifactButtons()
+function Module:UpdateArtifactButtons()
-- Artifact icons, in no particular order
self.equippedID = C_ArtifactUI.GetEquippedArtifactInfo()
@@ -490,9 +496,23 @@
local lastFrame = self
local fishingID, fishingData
local index, button
+ local equipped =self.profile.artifacts[self.equippedID]
+ local buttonsWidth = 0
+ if equipped then
+ numButtons = numButtons + 1
+ button = self.Artifact[numButtons]
+ button.relativeFrame = self
+ lastFrame = button:SetButton(self.equippedID, equipped, numButtons, true, nil)
+ hasArtifacts = true
+
+ buttonsWidth = EQUIPPED_SIZE + (FRAME_PADDING * 2)
+ end
+
+
for itemID, artifact in pairs(self.profile.artifacts) do
- if (itemID == UNDERLIGHT_ANGLER_ID) then
- if VeneerData.ArtifactPower.EnableFishing then
+ if (itemID == UNDERLIGHT_ANGLER_ID) then
+ -- only add if we have fishing AP items and it's not being shown in the equipped slot
+ if VeneerData.ArtifactPower.EnableFishing and (itemID ~= self.equippedID) then
fishingID = itemID
fishingData = artifact
end
@@ -502,19 +522,19 @@
self.canAddFishingAP = true
end
end
-
-
else
if artifact.level < WEAPON_MAX_TRAITS then
-
if itemID == self.equippedID then
self.canAddAP = true
+ else
+
+ hasArtifacts = true
+ numButtons = numButtons + 1
+ button = self.Artifact[numButtons]
+ button.relativeFrame = lastFrame
+ lastFrame = button:SetButton(itemID, artifact, numButtons, (self.equippedID == itemID), nil)
+ buttonsWidth = buttonsWidth + lastFrame:GetWidth() + FRAME_PADDING
end
- hasArtifacts = true
- numButtons = numButtons + 1
- button = self.Artifact[numButtons]
- button.relativeFrame = lastFrame
- lastFrame = button:SetButton(itemID, artifact, numButtons, (self.equippedID == itemID), nil)
end
end
end
@@ -536,11 +556,11 @@
end
- return numButtons
+ return buttonsWidth
end
-function ap:UpdateItemButtons()
+function Module:UpdateItemButtons()
print('|cFF00FFFFUpdateItemButtons()|r')
local apType
@@ -605,7 +625,7 @@
return buttonsWidth, buttonsHeight
end
-function ap:SetItemAction(button, name)
+function Module:SetItemAction(button, name)
name = name or self.itemName
if InCombatLockdown() then
self.itemName = name
@@ -616,7 +636,7 @@
end
end
-function ap:GetItemButton(itemID, texture, itemAP, fishing)
+function Module:GetItemButton(itemID, texture, itemAP, fishing)
print('|cFF00FFFFGetItemButton()|r', itemID, texture, itemAP)
local button = self.ItemButtons[itemID]
@@ -638,19 +658,13 @@
self.numItems = self.numItems + 1
end
- local itemAPtext = itemAP
- if itemAPtext >= 100000 then
- itemAPtext = floor(itemAPtext/1000) .. 'k'
- elseif itemAPtext >= 1000 then
- itemAPtext = (floor(itemAPtext/100)/10 ) .. 'k'
- end
- button.Label:SetText(itemAPtext)
+ button.Label:SetText(ShortNumberString(itemAP))
button.numItems = button.numItems + 1
return button
end
-function ap:GetItemAP(itemID, itemLink, bagData)
+function Module:GetItemAP(itemID, itemLink, bagData)
if not self.cache.items[itemID] then
print('doing tooltip scan', itemLink, itemID)
@@ -664,10 +678,17 @@
if text then
text = text:lower():gsub(',', '')
+
if text:match('equipped artifact') then
print(itemLink, '-', tonumber(text))
- local itemAP = text:match('%d+')
+
+ local itemAP = text:match('[%d%.]+')
if itemAP then
+ -- tokens > 1M are described as '%f million'
+ if text:match("million") then
+ itemAP = tonumber(itemAP) * 1000000
+ end
+
itemAP = itemAP
self.cache.items[itemID] = tonumber(itemAP)
end
@@ -691,7 +712,7 @@
return self.cache.items[itemID], self.cache.fishing[itemID]
end
-function ap:SetArtifact(itemID, name, texture, currentXP, pointsSpent)
+function Module:SetArtifact(itemID, name, texture, currentXP, pointsSpent)
print('|cFF00FF00SetArtifact()|r')
if not self.profile then
return
@@ -719,27 +740,18 @@
artifact.texture = texture
artifact.currentXP = currentXP
artifact.level = pointsSpent
- local cost = C_ArtifactUI.GetCostForPointAtRank(pointsSpent)
+ artifact.tier = C_ArtifactUI.GetArtifactTier() or ((pointsSpent >= 36) and 2 or 1)
+
+ print('tier', artifact.tier)
+ local cost = C_ArtifactUI.GetCostForPointAtRank(pointsSpent, artifact.tier)
artifact.currentCost = cost
- local pointsAvailable = pointsSpent
- local actualCost = cost
- local actualXP = currentXP
- while actualXP >= actualCost do
- pointsAvailable = pointsAvailable + 1
- actualXP = actualXP - actualCost
- print(pointsAvailable, '-', actualCost, '=', actualXP)
- actualCost = C_ArtifactUI.GetCostForPointAtRank(pointsAvailable)
- end
- print('updating', itemID, name, currentXP, pointsSpent, pointsAvailable, actualXP)
- artifact.actualXP = actualXP
- artifact.actualLevel = pointsAvailable
- artifact.actualCost = actualCost
+
end
end
-function ap:ScanBag(id)
+function Module:ScanBag(id)
print('|cFF00FFFFScanBag()|r', id, IsBagOpen(id), GetContainerNumSlots(id))
local numSlots = GetContainerNumSlots(id)
local requiresUpdate
@@ -813,7 +825,7 @@
local BAG_SLOTS = {0, 1, 2, 3, 4 }
local BANK_SLOTS = {-1, 5, 6,7, 8, 9, 10, 11, 12}
local ItemCounts = {}
-function ap:ScanAllBags()
+function Module:ScanAllBags()
if InCombatLockdown() then
self.queuedScan = true
return
@@ -868,8 +880,9 @@
end
VeneerArtifactButtonMixin = {}
+local Artifact = VeneerArtifactButtonMixin
-function VeneerArtifactButtonMixin:SetButton(itemID, artifact, index, equipped, fishing)
+function Artifact:SetButton(itemID, artifact, index, equipped, fishing)
print(itemID, index)
print(artifact.name, artifact.texture, artifact.currentXP)
self:SetID(itemID)
@@ -884,27 +897,27 @@
self.isFishing = fishing
-- this can change between artifact parses
- local potentialPoints = self.actualLevel
local totalAP = (itemID ~= UNDERLIGHT_ANGLER_ID) and ((self:GetParent().bankAP or 0) + (self:GetParent().bagAP or 0)) or (self:GetParent().fishingAP or 0)
print(totalAP)
- local potentialXP = self.actualXP + totalAP
- self.potentialXP = potentialXP
- local potentialCost = C_ArtifactUI.GetCostForPointAtRank(potentialPoints)
- while potentialXP >= potentialCost do
- potentialXP = potentialXP - potentialCost
- potentialPoints = potentialPoints + 1
- print('inc estimate', potentialXP, potentialPoints)
- potentialCost = C_ArtifactUI.GetCostForPointAtRank(potentialPoints)
+ -- currentXP what has been spent on the artifact
+ -- actualXP amount
+ -- totalXP
+ local actualXP = artifact.currentXP + totalAP
+ local actualLevel = artifact.level
+ local actualCost = C_ArtifactUI.GetCostForPointAtRank(actualLevel, artifact.tier)
+
+ while actualXP >= actualCost do
+ actualXP = actualXP - actualCost
+ actualLevel = actualLevel + 1
+ actualCost = C_ArtifactUI.GetCostForPointAtRank(actualLevel, artifact.tier)
+ print('* ', actualLevel, actualXP, actualCost)
end
- self.potentialCost = potentialCost
- self.potentialLevel = potentialPoints
- self.potentialAdjustedXP = potentialXP
+ self.actualCost = actualCost
+ self.actualLevel = actualLevel
+ self.actualXP = actualXP
+ self.totalXP = artifact.currentXP + totalAP
- self.maxCost = self.currentCost
- for i = self.level + 1, #POINT_COSTS do
- self.maxCost = self.maxCost + POINT_COSTS[i]
- end
if index ~= 1 then
self:ClearAllPoints()
@@ -920,32 +933,46 @@
return self
end
-function VeneerArtifactButtonMixin:Update()
- local r, g, b = 1, 1, 1
- local lR, lG, lB = 1, 1, 0
+function Artifact:Update()
+ local r1, g1, b1 = 1, 1, 1
+ local r2, g2, b2 = 1, 1, 0
local levelText = self.level
- local xpValue = ShortNumberString(self.currentXP)
- local costValue = self.currentCost
+ local xpText = ShortNumberString(self.currentXP)
+ local costText = ShortNumberString(self.currentCost)
+ local remainingText = ShortNumberString(self.currentCost - self.currentXP)
+ -- current: amount shown in blizz ui
+ -- actual: amount contributing the next level, will be same until current point cap is reached
+ -- potential: total of ap on hand
+ print(self.currentXP, self.actualXP, self.potentialXP)
if self.actualLevel ~= self.level then
- levelText, r,g,b = self.actualLevel, 0,1,0
- xpValue, costValue, lR, lG, lB = ShortNumberString(self.potentialXP) .. '\n' .. ShortNumberString(self.potentialCost-self.potentialXP), self.actualCost, 0, 1, 0
- elseif self.potentialLevel ~= self.level then
- levelText, r, g, b = self.potentialLevel, 0,1,1
- xpValue, costValue, lR, lG, lB = ShortNumberString(self.potentialXP) .. '\n' .. ShortNumberString(self.potentialCost-self.potentialXP), self.potentialCost, 0,1,1
- else
- xpValue, lR, lG, lB = ShortNumberString(self.actualXP) .. '\n|cFFFFFF00' .. ShortNumberString(self.actualCost-self.actualXP)..'|r', 1, 1, 1
+
+ levelText = self.actualLevel
+ r1, g1, b1 = 0, 1, 0
+ r2, g2, b2 = 0, 1, 0
+ xpText = ShortNumberString(self.actualXP)
+ costText = ShortNumberString(self.actualCost)
+ remainingText = ShortNumberString(self.actualCost-self.actualXP)
+ --[[elseif self.potentialLevel ~= self.level then
+ r1, g1, b1 = 0, 1, 1
+ r2, g2, b2 = 0, 1, 1
+ costText = ShortNumberString(self.potentialCost)
+ remainingText = ShortNumberString(self.potentialCost-self.potentialXP)
+ --]]
end
self.Level:SetText(levelText)
- self.Level:SetTextColor(r, g, b)
- self.CurrentXP:SetText( xpValue)
- self.CurrentXP:SetTextColor(lR, lG, lB)
+ self.CurrentXP:SetText( xpText )
+ self.RemainingCost:SetText(remainingText)
+ self.Level:SetTextColor(r1, g1, b1)
+ self.CurrentXP:SetTextColor(r1, g1, b1)
if self.isEquipped then
+ self:SetSize(64,64)
self:SetNormalTexture([[Interface\Buttons\ButtonHilight-Square]])
self:GetNormalTexture():SetBlendMode('ADD')
self:GetNormalTexture():SetVertexColor(0,1,0)
else
+ self:SetSize(48,48)
self:SetNormalTexture(nil, 'ADD')
end
@@ -960,15 +987,17 @@
self.ProgressLine:Hide()
end
- if self.potentialXP > self.currentXP then
- local projectedProgress = (self.potentialAdjustedXP < self.potentialCost) and (self.potentialXP / self.potentialCost) or 1
+ if self.actualXP ~= self.currentXP then
+ local projectedProgress = (self.actualXP ~= self.actualCost) and (self.actualXP / self.actualCost) or 1
if (projectedProgress > currentProgress) then
self.AdjustedProgress:SetPoint('BOTTOM', self.CurrentProgress, 'TOP')
projectedProgress = projectedProgress - currentProgress
else
+ self.CurrentProgress:Hide()
+ self.ProgressLine:Hide()
self.AdjustedProgress:SetPoint('BOTTOM', self, 'BOTTOM')
end
- print('show potential', currentProgress, projectedProgress)
+ print('show actual', currentProgress, projectedProgress)
self.AdjustedProgress.animateFrom = self.AdjustedProgress:GetHeight() or 1
self.AdjustedProgress.animateTo = projectedProgress * self:GetHeight()
self.AdjustedLine:Show()
@@ -977,12 +1006,14 @@
self.AdjustedProgress:Hide()
self.AdjustedLine:Hide()
end
+
+
+
self.Icon:SetTexture(self.texture)
- self:SetSize(64,64)
end
-function VeneerArtifactButtonMixin:AnimateProgress(region)
+function Artifact:AnimateProgress(region)
local cTime = GetTime()
if not region.animateStart then
region.animateStart = cTime
@@ -1002,7 +1033,7 @@
end
end
-function VeneerArtifactButtonMixin:OnUpdate(sinceLast)
+function Artifact:OnUpdate(sinceLast)
if self.CurrentProgress.animateTo then
self:AnimateProgress(self.CurrentProgress)
end
@@ -1012,14 +1043,14 @@
end
end
-function VeneerArtifactButtonMixin:OnEnter()
+function Artifact:OnEnter()
GameTooltip:SetOwner(self, 'ANCHOR_CURSOR')
GameTooltip:SetText(self.name)
GameTooltip:AddLine(ShortNumberString(self.currentXP) .. ' / '..ShortNumberString(self.currentCost), 1, 1, 0)
- if self.potentialXP > self.currentXP then
- GameTooltip:AddLine(ShortNumberString(self.potentialXP) .. ' potential XP', 0, 1, 1)
- if self.potentialAdjustedXP ~= self.potentialXP then
- GameTooltip:AddLine(ShortNumberString(self.potentialAdjustedXP) .. ' / ' .. ShortNumberString(self.potentialCost).. ' after', 0, 1, 0)
+ if self.totalXP ~= self.currentXP then
+ GameTooltip:AddLine(ShortNumberString(self.totalXP) .. ' total XP', 0, 1, 1)
+ if self.actualXP ~= self.potentialXP then
+ GameTooltip:AddLine(ShortNumberString(self.actualXP) .. ' / ' .. ShortNumberString(self.actualCost).. ' after', 0, 1, 0)
end
end
if self.actualLevel ~= self.level then
@@ -1031,19 +1062,19 @@
GameTooltip:Show()
end
-function VeneerArtifactButtonMixin:OnLeave()
+function Artifact:OnLeave()
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
end
end
-function VeneerArtifactButtonMixin:OnHide()
+function Artifact:OnHide()
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
end
end
-function VeneerArtifactButtonMixin:OnClick(button, down)
+function Artifact:OnClick(button, down)
if self.isEquipped then
SocketInventoryItem(16)
else
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/ArtifactPower.xml
--- a/Modules/ArtifactPower.xml Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/ArtifactPower.xml Wed Apr 26 20:06:38 2017 -0400
@@ -52,26 +52,33 @@
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/Currency.lua
--- a/Modules/Currency.lua Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/Currency.lua Wed Apr 26 20:06:38 2017 -0400
@@ -22,14 +22,24 @@
local blocks = {
["Ancient Mana"] = {
currencyID = 1155,
+ showMax = true,
zones = {
['Suramar'] = true,
["Sashj'tar Ruins"] = true,
- ["Faronaar Ruins"] = true
- }
+ ["Faronaar Ruins"] = true,
+ ["Halls of the Eclipse"] = true,
+ ["Shal'aran"] = true,
+ ["The Fel Breach"] = true,
+ },
},
["Blood of Sargeras"] = {
itemID = 124124,
+ },
+ ["Legionfall War Supplies"] = {
+ currencyID = 1342,
+ },
+ ["Nethershard"] = {
+ currencyID = 1226,
}
}
local items, currencies = {}, {}
@@ -41,6 +51,7 @@
EventList = {'PLAYER_ENTERING_WORLD'},
moduleName = 'Currency Watch',
anchorPoint = 'TOP',
+ anchorPriority = 2,
}
VeneerCurrencyBlockMixin = {}
local module = VeneerCurrencyMixin
@@ -92,7 +103,12 @@
local name, earned, texture, earnedThisWeek, weeklyMax, totalMax = GetCurrencyInfo(currencyID)
block.Icon:SetTexture(texture)
- block.Label:SetFormattedText("%d / %d", earned, totalMax)
+ if self.showMax then
+ block.Label:SetFormattedText("%d / %d", earned, totalMax)
+ else
+ block.Label:SetFormattedText("%d", earned)
+ end
+
block:SetWidth(block.Icon:GetWidth() + block.Label:GetStringWidth() + 6)
return true
end
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/Currency.xml
--- a/Modules/Currency.xml Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/Currency.xml Wed Apr 26 20:06:38 2017 -0400
@@ -22,7 +22,7 @@
-
+
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/FriendsFrame.lua
--- a/Modules/FriendsFrame.lua Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/FriendsFrame.lua Wed Apr 26 20:06:38 2017 -0400
@@ -4,3 +4,76 @@
-- %file-revision%
--
+VeneerLFGMixin = {}
+local Module = VeneerLFGMixin
+local _, db = ...
+local print = DEVIAN_WORKSPACE and function(...) print('VnTweaks', ...) end or nop
+
+print('tweaks')
+
+local currentMerchButton
+local positionsDirty
+local FormatPopup = function(index)
+ local popupName = 'StaticPopup'..index
+
+ local frame = _G[popupName]
+ frame:SetBackdrop(nil)
+ frame.Backdrop = frame:CreateTexture('BACKGROUND')
+ frame.Backdrop:SetAllPoints(frame)
+ frame.Backdrop:SetColorTexture(0,0,0,.7)
+ frame:EnableMouse(false)
+
+ local edit = _G[popupName .. 'EditBox']
+ edit.Backdrop = edit:CreateTexture('BACKGROUND')
+ edit.Backdrop:SetAllPoints(edit)
+ edit.Backdrop:SetColorTexture(0,0,0,1)
+
+ local editLeft = _G[popupName .. 'EditBoxLeft']
+ editLeft:Hide()
+ local editRight = _G[popupName .. 'EditBoxRight']
+ editRight:Hide()
+
+ for i = 1, 3 do
+ local button = frame['button'..i]
+ button:GetNormalTexture():SetColorTexture(0.25,.25,.25,1)
+ button:GetPushedTexture():SetColorTexture(0,.4,1,1)
+ button:GetDisabledTexture():SetColorTexture(0.25,.25,.25,1)
+ button:GetHighlightTexture():SetColorTexture(.25, 0,1,1)
+ end
+
+end
+
+for i = 1, STATICPOPUP_NUMDIALOGS do
+ print('setup', i)
+ FormatPopup(i)
+end
+
+hooksecurefunc('StaticPopup_Show', function(which, text_arg1, text_arg2, data, insertedFrame)
+ print(which, text_arg1, text_arg2, data)
+
+
+ if which == 'CONFIRM_PURCHASE_TOKEN_ITEM' then
+ local i = data.index
+ while i > 10 do
+ i = i - 10
+ end
+ print(i)
+
+
+ currentMerchButton = _G['MerchantItem' .. i]
+ StaticPopup1:ClearAllPoints()
+ StaticPopup1:SetPoint('TOPLEFT', currentMerchButton, 'TOPRIGHT', 2, 0)
+ print(StaticPopup1:GetSize())
+ positionsDirty = true
+ else
+ if positionsDirty then
+ StaticPopup1:ClearAllPoints()
+ StaticPopup1:SetPoint('TOP', UIParent, 'TOP', 0, -135)
+ end
+ end
+
+ StaticPopup1EditBox:SetWidth(StaticPopup1:GetWidth())
+
+
+
+end)
\ No newline at end of file
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/FriendsFrame.xml
--- a/Modules/FriendsFrame.xml Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/FriendsFrame.xml Wed Apr 26 20:06:38 2017 -0400
@@ -2,7 +2,7 @@
..\FrameXML\UI.xsd">
-
+
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/PaperDoll.lua
--- a/Modules/PaperDoll.lua Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/PaperDoll.lua Wed Apr 26 20:06:38 2017 -0400
@@ -83,6 +83,7 @@
self:RegisterEvent('UNIT_INVENTORY_CHANGED')
self:RegisterEvent('PLAYER_EQUIPMENT_CHANGED')
self:RegisterEvent('PLAYER_SPECIALIZATION_CHANGED')
+ self:RegisterEvent('ARTIFACT_RELIC_INFO_RECEIVED')
self:RegisterEvent('ARTIFACT_UPDATE')
self:MarkForUpdate()
@@ -171,7 +172,10 @@
end
elseif event == 'ARTIFACT_UPDATE' then
if artifactSlot then
- print('just udpate artifact slot')
+ artifactSlot:Update(true)
+ end
+ elseif event == 'ARTIFACT_RELIC_INFO_RECEIVED' then
+ if artifactSlot then
artifactSlot:Update(true)
end
else
@@ -261,7 +265,7 @@
if numRelics and isEquipped then
print('Relic Query:', itemID, numRelics)
for i = 1, numRelics do
- local lockedReason, relicName, relicIcon, relicLink = C_ArtifactUI.GetRelicInfo(i);
+ local relicName, relicIcon, relicType, relicLink = C_ArtifactUI.GetRelicInfo(i);
local relicType = C_ArtifactUI.GetRelicSlotType(i);
print(relicType)
if relicType then
@@ -357,7 +361,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.SocketType[index], self.SocketInfo[index])
icon:ClearAllPoints()
icon:SetTexture(self.SocketInfo[index])
@@ -387,15 +391,25 @@
if self.checkRelic and self.SocketType[index] then
print(self.SocketType[index])
+ self.Sockets.SocketBg = self.Sockets.SocketBg or {}
+ self.Sockets.SocketBg[index] = self.Sockets.SocketBg[index] or self.Sockets:CreateTexture(nil, 'OVERLAY')
+
+
+ local relicBG = self.Sockets.SocketBg[index]
local relicAtlasName = ("Relic-%s-Slot"):format(self.SocketType[index]);
- self.Sockets.SocketBg = self.Sockets.SocketBg or {}
- self.Sockets.SocketBg[index] = self.Sockets.SocketBg[index] or self.Sockets:CreateTexture()
- 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)
+ relicBG:SetMask(nil)
+ relicBG:SetAtlas(relicAtlasName)
+ relicBG:SetPoint('TOPRIGHT', icon, 'TOPRIGHT', 10, 10)
+ relicBG:SetPoint('BOTTOMLEFT', icon, 'BOTTOMLEFT', -10,-10)
--print('', self.SocketType[index], relicAtlasName)
if self.SocketInfo[index] == 0 then
icon:SetAtlas("Relic-SlotBG")
+ else
+ icon:SetMask(nil);
+ icon:SetTexCoord(0, 1, 0, 1); -- Masks may overwrite our tex coords (even ones set by an atlas), force it back to using the full item icon texture
+ icon:SetMask("Interface\\CharacterFrame\\TempPortraitAlphaMask");
+ icon:SetTexture(self.SocketInfo[index])
+
end
socketsHeight = self.Sockets.SocketBg[index]:GetHeight()
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/PaperDoll.xml
--- a/Modules/PaperDoll.xml Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/PaperDoll.xml Wed Apr 26 20:06:38 2017 -0400
@@ -33,7 +33,7 @@
-->
-
+
diff -r 8c94bee4fdfc -r ddfe19d70a34 Modules/WorldState.lua
--- a/Modules/WorldState.lua Tue Mar 28 07:02:26 2017 -0400
+++ b/Modules/WorldState.lua Wed Apr 26 20:06:38 2017 -0400
@@ -28,8 +28,11 @@
function()
requiresUpdate = true
end)
- hooksecurefunc(ocb, 'SetShown', function(isShown)
- self:SetShown(isShown)
+ hooksecurefunc(ocb, 'SetShown', function(_, isShown)
+ if self:IsShown() ~= isShown then
+ self:SetShown(isShown)
+ Veneer:DynamicReanchor()
+ end
end)
hooksecurefunc(ocb, 'RefreshAll', function()
self:Update()
@@ -57,7 +60,7 @@
self:SetSize(700, 23)
- self:SetShown(ocb:IsShown())
+ self:SetShown(C_Garrison.IsPlayerInGarrison(LE_GARRISON_TYPE_7_0))
end
function VeneerOrderHallMixin:OnUpdate()
@@ -81,7 +84,7 @@
end
function VeneerOrderHallMixin:Update()
- self:SetShown(ocb:IsShown())
+ self:SetShown(C_Garrison.IsPlayerInGarrison(LE_GARRISON_TYPE_7_0))
local lastFrame
local categoriesWidth = 0
local troops = OrderHallCommandBar.TroopSummary
diff -r 8c94bee4fdfc -r ddfe19d70a34 Veneer.toc
--- a/Veneer.toc Tue Mar 28 07:02:26 2017 -0400
+++ b/Veneer.toc Wed Apr 26 20:06:38 2017 -0400
@@ -1,4 +1,4 @@
-## Interface: 70100
+## Interface: 70200
## Title: Veneer
## Notes: Collection of interface enhancements that make life easier
## Author: Krakyn
@@ -19,4 +19,5 @@
Modules\BuffFrame.xml
Modules\PaperDoll.xml
Modules\GuildInfo.xml
-Modules\ArtifactPower.xml
\ No newline at end of file
+Modules\ArtifactPower.xml
+Modules\FriendsFrame.xml
\ No newline at end of file