comparison Modules/PaperDoll.lua @ 116:ddfe19d70a34

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.
author Nenue
date Wed, 26 Apr 2017 20:06:38 -0400
parents 3992b41c637e
children 15a7f27b11e6
comparison
equal deleted inserted replaced
115:8c94bee4fdfc 116:ddfe19d70a34
81 self.KnownRelics = VeneerData.PaperDoll.KnownRelics 81 self.KnownRelics = VeneerData.PaperDoll.KnownRelics
82 82
83 self:RegisterEvent('UNIT_INVENTORY_CHANGED') 83 self:RegisterEvent('UNIT_INVENTORY_CHANGED')
84 self:RegisterEvent('PLAYER_EQUIPMENT_CHANGED') 84 self:RegisterEvent('PLAYER_EQUIPMENT_CHANGED')
85 self:RegisterEvent('PLAYER_SPECIALIZATION_CHANGED') 85 self:RegisterEvent('PLAYER_SPECIALIZATION_CHANGED')
86 self:RegisterEvent('ARTIFACT_RELIC_INFO_RECEIVED')
86 self:RegisterEvent('ARTIFACT_UPDATE') 87 self:RegisterEvent('ARTIFACT_UPDATE')
87 88
88 self:MarkForUpdate() 89 self:MarkForUpdate()
89 end 90 end
90 91
169 self:SetupArtifactUI() 170 self:SetupArtifactUI()
170 self:MarkForUpdate() 171 self:MarkForUpdate()
171 end 172 end
172 elseif event == 'ARTIFACT_UPDATE' then 173 elseif event == 'ARTIFACT_UPDATE' then
173 if artifactSlot then 174 if artifactSlot then
174 print('just udpate artifact slot') 175 artifactSlot:Update(true)
176 end
177 elseif event == 'ARTIFACT_RELIC_INFO_RECEIVED' then
178 if artifactSlot then
175 artifactSlot:Update(true) 179 artifactSlot:Update(true)
176 end 180 end
177 else 181 else
178 if (event == 'PLAYER_SPECIALIZATION_CHANGED' or event == 'UNIT_INVENTORY_CHANGED') then 182 if (event == 'PLAYER_SPECIALIZATION_CHANGED' or event == 'UNIT_INVENTORY_CHANGED') then
179 if arg ~= 'player' then 183 if arg ~= 'player' then
259 tooltip:SetOwner(self, 'ANCHOR_NONE') 263 tooltip:SetOwner(self, 'ANCHOR_NONE')
260 self.hasRelicSlots = true 264 self.hasRelicSlots = true
261 if numRelics and isEquipped then 265 if numRelics and isEquipped then
262 print('Relic Query:', itemID, numRelics) 266 print('Relic Query:', itemID, numRelics)
263 for i = 1, numRelics do 267 for i = 1, numRelics do
264 local lockedReason, relicName, relicIcon, relicLink = C_ArtifactUI.GetRelicInfo(i); 268 local relicName, relicIcon, relicType, relicLink = C_ArtifactUI.GetRelicInfo(i);
265 local relicType = C_ArtifactUI.GetRelicSlotType(i); 269 local relicType = C_ArtifactUI.GetRelicSlotType(i);
266 print(relicType) 270 print(relicType)
267 if relicType then 271 if relicType then
268 if relicLink then 272 if relicLink then
269 tooltip:SetHyperlink(relicLink) 273 tooltip:SetHyperlink(relicLink)
355 local relativeIcon 359 local relativeIcon
356 local socketsWidth = 0 360 local socketsWidth = 0
357 local socketsHeight = 24 361 local socketsHeight = 24
358 for index, icon in ipairs(self.Sockets.SocketIcon) do 362 for index, icon in ipairs(self.Sockets.SocketIcon) do
359 if self.SocketInfo[index] then 363 if self.SocketInfo[index] then
360 --print('|cFF0088FFsocketInfo|r', index, self.SocketInfo[index]) 364 print('|cFF0088FFsocketInfo|r', index, self.SocketType[index], self.SocketInfo[index])
361 icon:ClearAllPoints() 365 icon:ClearAllPoints()
362 366
363 icon:SetTexture(self.SocketInfo[index]) 367 icon:SetTexture(self.SocketInfo[index])
364 icon:SetSize(16, 16) 368 icon:SetSize(16, 16)
365 icon:Show() 369 icon:Show()
385 label:SetFontObject(VeneerNumberFont) 389 label:SetFontObject(VeneerNumberFont)
386 label:SetText(self.SocketText[index]) 390 label:SetText(self.SocketText[index])
387 391
388 if self.checkRelic and self.SocketType[index] then 392 if self.checkRelic and self.SocketType[index] then
389 print(self.SocketType[index]) 393 print(self.SocketType[index])
394 self.Sockets.SocketBg = self.Sockets.SocketBg or {}
395 self.Sockets.SocketBg[index] = self.Sockets.SocketBg[index] or self.Sockets:CreateTexture(nil, 'OVERLAY')
396
397
398 local relicBG = self.Sockets.SocketBg[index]
390 local relicAtlasName = ("Relic-%s-Slot"):format(self.SocketType[index]); 399 local relicAtlasName = ("Relic-%s-Slot"):format(self.SocketType[index]);
391 self.Sockets.SocketBg = self.Sockets.SocketBg or {} 400 relicBG:SetMask(nil)
392 self.Sockets.SocketBg[index] = self.Sockets.SocketBg[index] or self.Sockets:CreateTexture() 401 relicBG:SetAtlas(relicAtlasName)
393 self.Sockets.SocketBg[index]:SetAtlas(relicAtlasName) 402 relicBG:SetPoint('TOPRIGHT', icon, 'TOPRIGHT', 10, 10)
394 self.Sockets.SocketBg[index]:SetPoint('TOPRIGHT', icon, 'TOPRIGHT', 12, 12) 403 relicBG:SetPoint('BOTTOMLEFT', icon, 'BOTTOMLEFT', -10,-10)
395 self.Sockets.SocketBg[index]:SetPoint('BOTTOMLEFT', icon, 'BOTTOMLEFT', -12,-12)
396 --print('', self.SocketType[index], relicAtlasName) 404 --print('', self.SocketType[index], relicAtlasName)
397 if self.SocketInfo[index] == 0 then 405 if self.SocketInfo[index] == 0 then
398 icon:SetAtlas("Relic-SlotBG") 406 icon:SetAtlas("Relic-SlotBG")
407 else
408 icon:SetMask(nil);
409 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
410 icon:SetMask("Interface\\CharacterFrame\\TempPortraitAlphaMask");
411 icon:SetTexture(self.SocketInfo[index])
412
399 end 413 end
400 414
401 socketsHeight = self.Sockets.SocketBg[index]:GetHeight() 415 socketsHeight = self.Sockets.SocketBg[index]:GetHeight()
402 print(socketsWidth, socketsHeight) 416 print(socketsWidth, socketsHeight)
403 end 417 end