mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-07-27 01:34:44 +00:00
feat: refactor spell tooltip scanning and update version to 1.6.2
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
## Interface: 11200
|
## Interface: 11200
|
||||||
## Title: HealBotBlue
|
## Title: HealBotBlue
|
||||||
## Version: 1.6.0
|
## Version: 1.6.1
|
||||||
## Author: Bluewhale
|
## Author: Bluewhale
|
||||||
## Notes: Adds panel with skinable bars for healing and decursive
|
## Notes: Adds panel with skinable bars for healing and decursive
|
||||||
## SavedVariablesPerCharacter: HealBot_Config
|
## SavedVariablesPerCharacter: HealBot_Config
|
||||||
|
|||||||
@@ -608,47 +608,47 @@ function HealBot_InitGetSpellData(spell, id, class)
|
|||||||
|
|
||||||
HealBot_ScanTooltip:SetOwner(HealBot_ScanTooltip, "ANCHOR_NONE")
|
HealBot_ScanTooltip:SetOwner(HealBot_ScanTooltip, "ANCHOR_NONE")
|
||||||
HealBot_ScanTooltip:SetSpell(id, BOOKTYPE_SPELL);
|
HealBot_ScanTooltip:SetSpell(id, BOOKTYPE_SPELL);
|
||||||
tmpText = getglobal("HealBot_ScanTooltipTextLeft2");
|
_mana = 0;
|
||||||
if (tmpText:GetText()) then
|
_range = 40;
|
||||||
line = tmpText:GetText();
|
_cast = 0;
|
||||||
tmpTest, tmpTest, _mana = string.find(line, HEALBOT_TOOLTIP_MANA);
|
line = nil;
|
||||||
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_ScanTooltipTextRight2");
|
for lineNum = 2, 6 do
|
||||||
if (tmpText:GetText()) then
|
local lText = getglobal("HealBot_ScanTooltipTextLeft"..lineNum);
|
||||||
line = tmpText:GetText();
|
if lText and lText:IsVisible() and lText:GetText() then
|
||||||
tmpTest, tmpTest, _range = string.find(line, HEALBOT_TOOLTIP_RANGE);
|
local txt = lText:GetText();
|
||||||
else
|
local t1, t2, match;
|
||||||
HealBot_Report_Error("================================");
|
t1, t2, match = string.find(txt, HEALBOT_TOOLTIP_MANA);
|
||||||
HealBot_Report_Error("ERROR: HealBot_ScanTooltip is lost");
|
if match then _mana = match; end
|
||||||
HealBot_Report_Error("ERROR: If BonusScanner is used, try disabling BonusScanner");
|
|
||||||
end
|
|
||||||
|
|
||||||
tmpText = getglobal("HealBot_ScanTooltipTextLeft3");
|
if txt == HEALBOT_TOOLTIP_INSTANT_CAST or txt == "Instant" then
|
||||||
_cast = nil;
|
_cast = 0;
|
||||||
if (tmpText:GetText()) then
|
elseif txt == HEALBOT_TOOLTIP_CHANNELED then
|
||||||
line = tmpText:GetText();
|
_cast = 0;
|
||||||
if (line == HEALBOT_TOOLTIP_INSTANT_CAST) then
|
else
|
||||||
_cast = 0;
|
t1, t2, match = string.find(txt, HEALBOT_TOOLTIP_CAST_TIME);
|
||||||
elseif line == HEALBOT_TOOLTIP_CHANNELED then
|
if match then _cast = match; end
|
||||||
_cast = 0;
|
end
|
||||||
elseif (tmpText) then
|
|
||||||
tmpTest, tmpTest, _cast = string.find(line, HEALBOT_TOOLTIP_CAST_TIME);
|
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
|
||||||
else
|
|
||||||
HealBot_Report_Error("================================");
|
|
||||||
HealBot_Report_Error("ERROR: HealBot_ScanTooltip is lost");
|
|
||||||
HealBot_Report_Error("ERROR: If BonusScanner is used, try disabling BonusScanner");
|
|
||||||
end
|
end
|
||||||
|
|
||||||
tmpText = getglobal("HealBot_ScanTooltipTextLeft4");
|
|
||||||
tmpTest = nil;
|
tmpTest = nil;
|
||||||
if (tmpText:GetText()) then
|
if line then
|
||||||
line = tmpText:GetText();
|
|
||||||
if class == "PRIEST" then
|
if class == "PRIEST" then
|
||||||
if string.sub(spell, 1, 14) == string.sub(HEALBOT_POWER_WORD_SHIELD, 1, 14) 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);
|
tmpTest, tmpTest, _HealsMin, _shield = string.find(line, HEALBOT_SPELL_PATTERN_SHIELD);
|
||||||
|
|||||||
@@ -635,6 +635,9 @@ function HealBot_Action_PartyChanged()
|
|||||||
else
|
else
|
||||||
for _, unit in ipairs(HealBot_Action_HealGroup) do
|
for _, unit in ipairs(HealBot_Action_HealGroup) do
|
||||||
if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then
|
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
|
if HealBot_Config.ExtraOrder == 1 then
|
||||||
order[unit] = name;
|
order[unit] = name;
|
||||||
elseif HealBot_Config.ExtraOrder == 2 then
|
elseif HealBot_Config.ExtraOrder == 2 then
|
||||||
@@ -733,6 +736,9 @@ function HealBot_Action_PartyChanged()
|
|||||||
else
|
else
|
||||||
for _, unit in ipairs(HealBot_Action_HealGroup) do
|
for _, unit in ipairs(HealBot_Action_HealGroup) do
|
||||||
if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then
|
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
|
if HealBot_Config.ExtraOrder == 1 then
|
||||||
order[unit] = name;
|
order[unit] = name;
|
||||||
elseif HealBot_Config.ExtraOrder == 2 then
|
elseif HealBot_Config.ExtraOrder == 2 then
|
||||||
|
|||||||
Reference in New Issue
Block a user