feat: refactor spell tooltip scanning and update version to 1.6.2

This commit is contained in:
Bluewhale1337
2026-07-24 20:22:49 +02:00
parent 4c9f50770a
commit faf040997e
3 changed files with 45 additions and 39 deletions
+1 -1
View File
@@ -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
+38 -38
View File
@@ -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);
+6
View File
@@ -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