From 976047a9bc923d2d1c83ec257e1820f994053ebe Mon Sep 17 00:00:00 2001 From: Parnic Date: Sun, 27 Sep 2015 16:03:20 -0500 Subject: [PATCH] Fix the Resolve module Integrated a fix from user cgsg11 to use the mysterious 15th return value from UnitAura with Resolve instead of trying to scan the tooltip for the percentage. --- modules/Resolve.lua | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/modules/Resolve.lua b/modules/Resolve.lua index 3c1c772..170363f 100644 --- a/modules/Resolve.lua +++ b/modules/Resolve.lua @@ -1,7 +1,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) local Resolve = IceCore_CreateClass(IceUnitBar) -local RESOLVE_SPELL_ID = 158298 +local RESOLVE_SPELL_ID = 158300 local RESOLVE_MAX = 240 Resolve.prototype.current = nil @@ -68,26 +68,7 @@ do return end - local name = UnitAura(self.unit, spellName) - if name then - -- Buff found, copy it into the buffer for scanning - tooltipBuffer:ClearLines() - tooltipBuffer:SetUnitBuff(self.unit, name) - - -- Grab all regions, stuff em into our table - makeTable(regions, tooltipBuffer:GetRegions()) - - -- Convert FontStrings to strings, replace anything else with "" - for i=1, #regions do - local region = regions[i] - regions[i] = region:GetObjectType() == "FontString" and region:GetText() or "" - end - - -- Find the number, save it - self.current = tonumber(string.match(table.concat(regions),"%d+")) or 0 - else - self.current = 0 - end + self.current = select(15, UnitAura(self.unit, spellName)) or 0 self:Update() end