diff --git a/HealBotBlue.toc b/HealBotBlue.toc index 39c4310..cffb7f1 100644 --- a/HealBotBlue.toc +++ b/HealBotBlue.toc @@ -1,6 +1,6 @@ ## Interface: 11200 ## Title: HealBotBlue -## Version: 1.6.0 +## Version: 1.6.1 ## Author: Bluewhale ## Notes: Adds panel with skinable bars for healing and decursive ## SavedVariablesPerCharacter: HealBot_Config diff --git a/HealBot_Controller_Spells.lua b/HealBot_Controller_Spells.lua index 5c6bde5..2205af4 100644 --- a/HealBot_Controller_Spells.lua +++ b/HealBot_Controller_Spells.lua @@ -608,47 +608,47 @@ function HealBot_InitGetSpellData(spell, id, class) HealBot_ScanTooltip:SetOwner(HealBot_ScanTooltip, "ANCHOR_NONE") HealBot_ScanTooltip:SetSpell(id, BOOKTYPE_SPELL); - tmpText = getglobal("HealBot_ScanTooltipTextLeft2"); - if (tmpText:GetText()) then - line = tmpText:GetText(); - tmpTest, tmpTest, _mana = string.find(line, HEALBOT_TOOLTIP_MANA); - else - HealBot_Report_Error("================================"); - HealBot_Report_Error("ERROR: HealBot_ScanTooltip is lost"); - HealBot_Report_Error("ERROR: If BonusScanner is used, try disabling BonusScanner"); + _mana = 0; + _range = 40; + _cast = 0; + line = nil; + + for lineNum = 2, 6 do + local lText = getglobal("HealBot_ScanTooltipTextLeft"..lineNum); + if lText and lText:IsVisible() and lText:GetText() then + local txt = lText:GetText(); + local t1, t2, match; + t1, t2, match = string.find(txt, HEALBOT_TOOLTIP_MANA); + if match then _mana = match; end + + if txt == HEALBOT_TOOLTIP_INSTANT_CAST or txt == "Instant" then + _cast = 0; + elseif txt == HEALBOT_TOOLTIP_CHANNELED then + _cast = 0; + else + t1, t2, match = string.find(txt, HEALBOT_TOOLTIP_CAST_TIME); + if match then _cast = match; end + end + + t1, t2, match = string.find(txt, HEALBOT_TOOLTIP_RANGE); + if match then _range = match; end + + if not string.find(txt, HEALBOT_TOOLTIP_MANA) and txt ~= HEALBOT_TOOLTIP_INSTANT_CAST and txt ~= "Instant" and txt ~= HEALBOT_TOOLTIP_CHANNELED and not string.find(txt, HEALBOT_TOOLTIP_CAST_TIME) and not string.find(txt, HEALBOT_TOOLTIP_RANGE) then + if not line then line = txt; end + end + end + + local rText = getglobal("HealBot_ScanTooltipTextRight"..lineNum); + if rText and rText:IsVisible() and rText:GetText() then + local txt = rText:GetText(); + local t1, t2, match; + t1, t2, match = string.find(txt, HEALBOT_TOOLTIP_RANGE); + if match then _range = match; end + end end - tmpText = getglobal("HealBot_ScanTooltipTextRight2"); - if (tmpText:GetText()) then - line = tmpText:GetText(); - tmpTest, tmpTest, _range = string.find(line, HEALBOT_TOOLTIP_RANGE); - else - HealBot_Report_Error("================================"); - HealBot_Report_Error("ERROR: HealBot_ScanTooltip is lost"); - HealBot_Report_Error("ERROR: If BonusScanner is used, try disabling BonusScanner"); - end - - tmpText = getglobal("HealBot_ScanTooltipTextLeft3"); - _cast = nil; - if (tmpText:GetText()) then - line = tmpText:GetText(); - if (line == HEALBOT_TOOLTIP_INSTANT_CAST) then - _cast = 0; - elseif line == HEALBOT_TOOLTIP_CHANNELED then - _cast = 0; - elseif (tmpText) then - tmpTest, tmpTest, _cast = string.find(line, HEALBOT_TOOLTIP_CAST_TIME); - end - else - HealBot_Report_Error("================================"); - HealBot_Report_Error("ERROR: HealBot_ScanTooltip is lost"); - HealBot_Report_Error("ERROR: If BonusScanner is used, try disabling BonusScanner"); - end - - tmpText = getglobal("HealBot_ScanTooltipTextLeft4"); tmpTest = nil; - if (tmpText:GetText()) then - line = tmpText:GetText(); + if line then if class == "PRIEST" then if string.sub(spell, 1, 14) == string.sub(HEALBOT_POWER_WORD_SHIELD, 1, 14) then tmpTest, tmpTest, _HealsMin, _shield = string.find(line, HEALBOT_SPELL_PATTERN_SHIELD); diff --git a/HealBot_View_Layout.lua b/HealBot_View_Layout.lua index 7ed87af..5e85306 100644 --- a/HealBot_View_Layout.lua +++ b/HealBot_View_Layout.lua @@ -635,6 +635,9 @@ function HealBot_Action_PartyChanged() else for _, unit in ipairs(HealBot_Action_HealGroup) do if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then + local name = UnitName(unit) or "not known" + local class = UnitClass(unit) or "not known" + local subgroup = 1 if HealBot_Config.ExtraOrder == 1 then order[unit] = name; elseif HealBot_Config.ExtraOrder == 2 then @@ -733,6 +736,9 @@ function HealBot_Action_PartyChanged() else for _, unit in ipairs(HealBot_Action_HealGroup) do if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then + local name = UnitName(unit) or "not known" + local class = UnitClass(unit) or "not known" + local subgroup = 1 if HealBot_Config.ExtraOrder == 1 then order[unit] = name; elseif HealBot_Config.ExtraOrder == 2 then