# HG changeset patch
# User Nenue
# Date 1508274010 14400
# Node ID 3de635cda288c0844b7abd10e21eb93ae14edc6d
# Parent 3f4794dca91bb4671dcbb6d9f452821439bca3d0
- zone checking fix; moveed code into the zone-context pre-hook
diff -r 3f4794dca91b -r 3de635cda288 Modules/Bank.lua
--- a/Modules/Bank.lua Sun Oct 15 16:47:22 2017 -0400
+++ b/Modules/Bank.lua Tue Oct 17 17:00:10 2017 -0400
@@ -15,7 +15,6 @@
self:SetSize(100,100)
m.Info:SetPoint('CENTER', self, 'CENTER')
- self:Show()
print('Setup()')
diff -r 3f4794dca91b -r 3de635cda288 Modules/Currency.lua
--- a/Modules/Currency.lua Sun Oct 15 16:47:22 2017 -0400
+++ b/Modules/Currency.lua Tue Oct 17 17:00:10 2017 -0400
@@ -122,7 +122,10 @@
local zones = info.zones
local of = block.Update
function block:Update(zone, subZone)
- block.debug('Update [Zone]', zone, subZone)
+
+ local zone = GetRealZoneText()
+ local subZone = GetSubZoneText()
+ block.debug('Zone Check', zone, subZone)
local canShow = ((zone and self.zones[zone]) or (subZone and self.zones[subZone])) and true or false
if of then
canShow = canShow and of(self)
@@ -135,10 +138,8 @@
function module:OnEvent (event, arg)
print(self:GetName(), 'OnEvent', event, arg)
- self:Update()
end
-local toUpdate = {}
-local wipe = table.wipe
+
function module:Update(isBatchUpdate)
print(self:GetName(), 'Update()')
if InCombatLockdown() then
@@ -150,8 +151,7 @@
for itemID in pairs(items) do
items[itemID].count = 0
end
- self.realZoneText = GetRealZoneText()
- self.subZoneText = GetSubZoneText()
+
local canShow = false
for i = 0, NUM_BAG_SLOTS do
@@ -193,7 +193,7 @@
block:SetWidth(block.Icon:GetWidth() + block.Label:GetStringWidth()+4)
totalWidth = totalWidth + block:GetWidth()
end
- print(block:IsShown(), '|cFF0088FF'..block.name..'|r', block:GetSize())
+ print('|cFF0088FF'..block.name..'|r', block:IsShown(), block:GetSize())
end
self:UpdateProfile()
@@ -244,16 +244,14 @@
end
function block:OnEvent(event, ...)
- print('|cFF0088FF<'..self.name..'>|r', 'OnEvent', event, ...)
-
- self:Update(GetRealZoneText(), GetSubZoneText())
+ self.debug('OnEvent', event, ...)
+ self:Update()
end
function block:Setup()
+end
-end
-function itemBlock:Update(zone, subZone)
- self.debug('Update [Item]', zone, subZone)
+function itemBlock:Update()
if items[self.itemID].count >= 1 then
self.Icon:SetTexture(GetItemIcon(self.id))
self.Label:SetFormattedText("%d", items[self.id].count)
@@ -262,8 +260,7 @@
return false
end
-function currencyBlock:Update(zone, subZone)
- self.debug('Update [Currency]', zone, subZone)
+function currencyBlock:Update()
local name, earned, texture, earnedThisWeek, weeklyMax, totalMax = GetCurrencyInfo(self.id)
self.Icon:SetTexture(texture)
@@ -272,7 +269,5 @@
else
self.Label:SetFormattedText("%d", earned)
end
-
- --self:SetWidth(self.Icon:GetWidth() + self.Label:GetStringWidth() + 6)
return true
end
\ No newline at end of file
diff -r 3f4794dca91b -r 3de635cda288 Modules/Currency.xml
--- a/Modules/Currency.xml Sun Oct 15 16:47:22 2017 -0400
+++ b/Modules/Currency.xml Tue Oct 17 17:00:10 2017 -0400
@@ -2,7 +2,7 @@
..\FrameXML\UI.xsd">
-
+