# HG changeset patch # User Nenue # Date 1508711323 14400 # Node ID 9f2cf5609420ccbf53a16c886b2f2f599bb8997e # Parent 799ec6dce9c37534fac00077948d0fa0afbeffea - fix Argus world quests not being counted - add "Argus WQ" header in the summary box diff -r 799ec6dce9c3 -r 9f2cf5609420 Modules/ArtifactPower.lua --- a/Modules/ArtifactPower.lua Thu Oct 19 10:39:04 2017 -0400 +++ b/Modules/ArtifactPower.lua Sun Oct 22 18:28:43 2017 -0400 @@ -41,7 +41,9 @@ local BUTTON_SIZE = 48 local FRAME_LIST = {'ContainerFrame1', 'BankFrame'} local BAG_FRAMES = {'ContainerFrame1'} -local BANK_FRAMES = {'BankFrame'} +local BANK_FRAMES = {'BankFrame' } +local ZONE_ID_ARGUS = 1184 +local ZONE_ID_BROKEN_ISLE = 1007 function Module:OnLoad() self:RegisterEvent('BAG_UPDATE') -- use to obtain bag IDs to scan @@ -468,6 +470,11 @@ bankText = (bankText and (bankText .. '\n') or '') .. '|cFFFFBB00World Quests:|r |cFFFFFFFF' .. ShortNumberString(self.worldQuestAP) .. '' end + if self.argusAP then + bankText = (bankText and (bankText .. '\n') or '') .. '|cFF88FF00Argus WQ:|r |cFFFFFFFF' .. ShortNumberString(self.argusAP) .. '' + end + + self.SummaryHeader:SetText(bankText) if not self.lastButton then @@ -485,18 +492,13 @@ self:Reanchor() end -local BROKEN_ISLE_ID = 1007 +function Module:GetContinentAP(mapAreaID) -function Module:UpdateWorldQuestsAP() - self.waitingForQuestRewardData = false - self.worldQuestAP = 0 - wipe(self.worldQuestItems) - - for zoneIndex = 1, C_MapCanvas.GetNumZones(BROKEN_ISLE_ID) do - local zoneMapID, zoneName, zoneDepth, left, right, top, bottom = C_MapCanvas.GetZoneInfo(BROKEN_ISLE_ID, zoneIndex); + for zoneIndex = 1, C_MapCanvas.GetNumZones(mapAreaID) do + local zoneMapID, zoneName, zoneDepth, left, right, top, bottom = C_MapCanvas.GetZoneInfo(mapAreaID, zoneIndex); --print(zoneMapID, zoneName) if zoneDepth <= 1 then -- Exclude subzones - local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID(zoneMapID, BROKEN_ISLE_ID); + local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID(zoneMapID, mapAreaID, (mapAreaID == 1184) and 1 or nil); if taskInfo then for i, info in ipairs(taskInfo) do @@ -519,6 +521,9 @@ --print('ap =', ap) if ap then self.worldQuestAP = self.worldQuestAP + ap + if mapAreaID == ZONE_ID_ARGUS then + self.argusAP = self.argusAP + ap + end end @@ -541,6 +546,18 @@ end end end + +end + +function Module:UpdateWorldQuestsAP() + self.waitingForQuestRewardData = false + self.worldQuestAP = 0 + self.argusAP = 0 + wipe(self.worldQuestItems) + + self:GetContinentAP(ZONE_ID_BROKEN_ISLE) + self:GetContinentAP(ZONE_ID_ARGUS) + end function Module:UpdateArtifactButtons() @@ -760,6 +777,8 @@ -- tokens > 1M are described as '%f million' if text:match("million") then itemAP = tonumber(itemAP) * 1000000 + elseif text:match("billion") then + itemAP = tonumber(itemAP) * 1000000000 end itemAP = itemAP @@ -1043,7 +1062,7 @@ local offHeight = self.AdjustedProgress:GetHeight() or 1 - self.CurrentProgress:SetPoint('BOTTOM', self, 'BOTTOM', 0, XP_INSET) + self.CurrentProgress:SetPoint('BOTTOM', self.XPBackground, 'BOTTOM', 0, 0) local currentProgress = (self.currentXP < self.currentCost) and (self.currentXP / self.currentCost) or 1 local projectedProgress = (self.totalXP < self.totalCost) and (self.totalXP / self.totalCost) or 1 if self.actualLevel ~= self.level then diff -r 799ec6dce9c3 -r 9f2cf5609420 Modules/ArtifactPower.xml --- a/Modules/ArtifactPower.xml Thu Oct 19 10:39:04 2017 -0400 +++ b/Modules/ArtifactPower.xml Sun Oct 22 18:28:43 2017 -0400 @@ -83,17 +83,17 @@ - - - + + + - + - - - + + + diff -r 799ec6dce9c3 -r 9f2cf5609420 Veneer.toc --- a/Veneer.toc Thu Oct 19 10:39:04 2017 -0400 +++ b/Veneer.toc Sun Oct 22 18:28:43 2017 -0400 @@ -7,7 +7,7 @@ ## X-Category: Interface Enhancements ## DefaultState: Enabled ## LoadOnDemand: 0 -## OptionalDeps: Devian +## OptionalDeps: Devian, BagBrother Init.lua Veneer.xml