13 Commits

Author SHA1 Message Date
Bluewhale1337 327cd7a08c fix: refine weapon enchant tooltip detection to use the first word of the spell name 2026-08-05 22:25:02 +02:00
Bluewhale1337 2f01ca3f1b feat: improve shaman weapon buff detection by validating specific enchant names via tooltip scanning 2026-08-05 22:18:40 +02:00
Bluewhale1337 45ce2a024f feat: split Raid and Pet toggles and simplify raid bars filter options 2026-08-05 22:02:53 +02:00
Bluewhale1337 2ab7a93a6e Refactor + rewrite: implement independent pet heal toggles and integrate into layout rendering and emergency monitoring logic 2026-08-05 21:53:41 +02:00
Bluewhale1337 7cf0956a84 refactor: remove talent documentation and implement unit filtering logic to exclude group members from raid monitoring when enabled 2026-07-30 18:34:43 +02:00
Bluewhale1337 178d1184a3 docs: add Talents.md 2026-07-26 13:59:23 +02:00
Bluewhale1337 f1b7e3950f chore: bump version to 1.6.2 in TOC file 2026-07-26 13:48:35 +02:00
Bluewhale1337 faf040997e feat: refactor spell tooltip scanning and update version to 1.6.2 2026-07-24 20:22:49 +02:00
Bluewhale1337 4c9f50770a fix: remove redundant end statement in layout refresh function 2026-07-22 11:19:21 +02:00
Bluewhale1337 ed11046eda Cleaning up some leftovers 2026-07-22 09:55:17 +02:00
Bluewhale1337 d36ad994ea feat: add support for dynamic unit appending during combat and improve layout handling 2026-07-22 09:20:22 +02:00
Bluewhale1337 a3f3d9e4c6 feat: expand unit capacity to 100 buttons and add RAID_ROSTER_UPDATE event handling 2026-07-21 22:46:14 +02:00
Bluewhale1337 2b1ccb03c5 hotfix: add pet frame color support and update documentation with latest feature set 2026-07-21 19:01:34 +02:00
11 changed files with 400 additions and 164 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
## Interface: 11200 ## Interface: 11200
## Title: HealBotBlue ## Title: HealBotBlue
## Version: 1.6.0 ## Version: 1.6.2
## 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
+49
View File
@@ -232,6 +232,15 @@
<Button name="HealBot_Action_HealUnit39" inherits="HealingButtonTemplate" text="Unit not set"/> <Button name="HealBot_Action_HealUnit39" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit40" inherits="HealingButtonTemplate" text="Unit not set"/> <Button name="HealBot_Action_HealUnit40" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit41" inherits="HealingButtonTemplate" text="Unit not set"/> <Button name="HealBot_Action_HealUnit41" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit42" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit43" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit44" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit45" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit46" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit47" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit48" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit49" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit50" inherits="HealingButtonTemplate" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit51" inherits="HealingButtonTemplate2" text="Unit not set"/> <Button name="HealBot_Action_HealUnit51" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit52" inherits="HealingButtonTemplate2" text="Unit not set"/> <Button name="HealBot_Action_HealUnit52" inherits="HealingButtonTemplate2" text="Unit not set"/>
@@ -243,6 +252,46 @@
<Button name="HealBot_Action_HealUnit58" inherits="HealingButtonTemplate2" text="Unit not set"/> <Button name="HealBot_Action_HealUnit58" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit59" inherits="HealingButtonTemplate2" text="Unit not set"/> <Button name="HealBot_Action_HealUnit59" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit60" inherits="HealingButtonTemplate2" text="Unit not set"/> <Button name="HealBot_Action_HealUnit60" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit61" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit62" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit63" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit64" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit65" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit66" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit67" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit68" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit69" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit70" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit71" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit72" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit73" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit74" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit75" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit76" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit77" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit78" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit79" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit80" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit81" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit82" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit83" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit84" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit85" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit86" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit87" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit88" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit89" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit90" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit91" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit92" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit93" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit94" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit95" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit96" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit97" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit98" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit99" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_HealUnit100" inherits="HealingButtonTemplate2" text="Unit not set"/>
<Button name="HealBot_Action_Header1" inherits="HealingButtonTemplate4" text="Unit not set"/> <Button name="HealBot_Action_Header1" inherits="HealingButtonTemplate4" text="Unit not set"/>
<Button name="HealBot_Action_Header2" inherits="HealingButtonTemplate4" text="Unit not set"/> <Button name="HealBot_Action_Header2" inherits="HealingButtonTemplate4" text="Unit not set"/>
+26 -3
View File
@@ -33,9 +33,32 @@ end
function HealBot_CheckShamanWeaponBuff(spellName) function HealBot_CheckShamanWeaponBuff(spellName)
local hasMainHandEnchant, _, _, hasOffHandEnchant = GetWeaponEnchantInfo() local hasMainHandEnchant, _, _, hasOffHandEnchant = GetWeaponEnchantInfo()
if hasMainHandEnchant or hasOffHandEnchant then if not (hasMainHandEnchant or hasOffHandEnchant) then return false end
return true
local firstWord = string.match(spellName, "^(%w+)")
if not firstWord then return false end
HealBot_ScanTooltip:SetOwner(UIParent, "ANCHOR_NONE")
local slots = {}
if hasMainHandEnchant then table.insert(slots, 16) end
if hasOffHandEnchant then table.insert(slots, 17) end
for _, slot in ipairs(slots) do
HealBot_ScanTooltip:ClearLines()
HealBot_ScanTooltip:SetInventoryItem("player", slot)
for i = 1, HealBot_ScanTooltip:NumLines() do
local textObj = getglobal("HealBot_ScanTooltipTextLeft" .. i)
if textObj then
local text = textObj:GetText()
if text and string.find(text, firstWord) then
HealBot_ScanTooltip:Hide()
return true
end
end
end
end end
HealBot_ScanTooltip:Hide()
return false return false
end end
@@ -104,7 +127,7 @@ function HealBot_CheckBuffs(unit)
end end
if not hasIt then if not hasIt then
if myClass == "SHAMAN" and UnitIsUnit(unit, "player") and string.find(spellName, " Weapon") then if myClass == HEALBOT_SHAMAN and UnitIsUnit(unit, "player") and string.find(spellName, " Weapon") then
hasIt = HealBot_CheckShamanWeaponBuff(spellName) hasIt = HealBot_CheckShamanWeaponBuff(spellName)
end end
end end
+12 -1
View File
@@ -181,6 +181,16 @@ local HealBot_EventHandlers = {
HealBot_Model:NotifyObservers("ROSTER_CHANGED") HealBot_Model:NotifyObservers("ROSTER_CHANGED")
HealBot_OnEvent_PartyMembersChanged(this) HealBot_OnEvent_PartyMembersChanged(this)
end, end,
["RAID_ROSTER_UPDATE"] = function(this)
for _, unit in ipairs(HealBot_Model.partyMembers) do
HealBot_Model:RefreshUnit(unit)
end
for _, unit in ipairs(HealBot_Model.raidMembers) do
HealBot_Model:RefreshUnit(unit)
end
HealBot_Model:NotifyObservers("ROSTER_CHANGED")
HealBot_OnEvent_PartyMembersChanged(this)
end,
["PLAYER_ENTERING_WORLD"] = function(this) ["PLAYER_ENTERING_WORLD"] = function(this)
HealBot_Model:RefreshUnit("player") HealBot_Model:RefreshUnit("player")
HealBot_Model:RefreshUnit("pet") HealBot_Model:RefreshUnit("pet")
@@ -282,6 +292,7 @@ function HealBot_OnEvent_VariablesLoaded(this)
this:RegisterEvent("PLAYER_REGEN_ENABLED"); this:RegisterEvent("PLAYER_REGEN_ENABLED");
this:RegisterEvent("PLAYER_TARGET_CHANGED"); this:RegisterEvent("PLAYER_TARGET_CHANGED");
this:RegisterEvent("PARTY_MEMBERS_CHANGED"); this:RegisterEvent("PARTY_MEMBERS_CHANGED");
this:RegisterEvent("RAID_ROSTER_UPDATE");
this:RegisterEvent("PARTY_MEMBER_DISABLE"); this:RegisterEvent("PARTY_MEMBER_DISABLE");
this:RegisterEvent("PARTY_MEMBER_ENABLE"); this:RegisterEvent("PARTY_MEMBER_ENABLE");
this:RegisterEvent("UNIT_PET"); this:RegisterEvent("UNIT_PET");
@@ -365,7 +376,7 @@ end
function HealBot_OnEvent_PlayerRegenEnabled(this) function HealBot_OnEvent_PlayerRegenEnabled(this)
HealBot_IsFighting = false; HealBot_IsFighting = false;
-- Removed HealBot_Delay_RecalcParty = 1; HealBot_Delay_RecalcParty = 1;
end end
function HealBot_OnEvent_PlayerTargetChanged(this) function HealBot_OnEvent_PlayerTargetChanged(this)
+35 -35
View File
@@ -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);
+3 -2
View File
@@ -320,13 +320,14 @@ HEALBOT_OPTIONS_SOUND2 = "Sound 2"
HEALBOT_OPTIONS_SOUND3 = "Sound 3" HEALBOT_OPTIONS_SOUND3 = "Sound 3"
HEALBOT_OPTIONS_HEAL_BUTTONS = "Healing bars"; HEALBOT_OPTIONS_HEAL_BUTTONS = "Healing bars";
HEALBOT_OPTIONS_EMERGFILTER = "Show extra bars for"; HEALBOT_OPTIONS_EMERGFILTER = "Show raid bars for";
HEALBOT_OPTIONS_GROUPHEALS = "Group"; HEALBOT_OPTIONS_GROUPHEALS = "Group";
HEALBOT_OPTIONS_GROUPHEALS_LABEL = "Group Only"; HEALBOT_OPTIONS_GROUPHEALS_LABEL = "Group Only";
HEALBOT_OPTIONS_TANKHEALS = "Main tanks"; HEALBOT_OPTIONS_TANKHEALS = "Main tanks";
HEALBOT_OPTIONS_TARGETHEALS = "Targets"; HEALBOT_OPTIONS_TARGETHEALS = "Targets";
HEALBOT_OPTIONS_EMERGENCYHEALS= "Raid / Extra"; HEALBOT_OPTIONS_EMERGENCYHEALS= "Raid";
HEALBOT_OPTIONS_PETHEALS = "Pets";
HEALBOT_OPTIONS_HEALLEVEL = "Healing Level"; HEALBOT_OPTIONS_HEALLEVEL = "Healing Level";
HEALBOT_OPTIONS_ALERTLEVEL = "Alert Level"; HEALBOT_OPTIONS_ALERTLEVEL = "Alert Level";
HEALBOT_OPTIONS_OVERHEAL = "Show Abort button when overhealing" HEALBOT_OPTIONS_OVERHEAL = "Show Abort button when overhealing"
-11
View File
@@ -7,18 +7,7 @@ HealBot_Options_CurrentPanel = 0;
HealBot_ColourObjWaiting = nil HealBot_ColourObjWaiting = nil
HealBot_Options_EmergencyFilter_List = { HealBot_Options_EmergencyFilter_List = {
HEALBOT_OPTIONS_MONITORNO,
HEALBOT_OPTIONS_MONITORALL, HEALBOT_OPTIONS_MONITORALL,
HEALBOT_DRUID,
HEALBOT_HUNTER,
HEALBOT_MAGE,
HEALBOT_PALADIN,
HEALBOT_PRIEST,
HEALBOT_ROGUE,
HEALBOT_SHAMAN,
HEALBOT_WARLOCK,
HEALBOT_WARRIOR,
HEALBOT_OPTIONS_PETS,
HEALBOT_OPTIONS_MONITORMELEE, HEALBOT_OPTIONS_MONITORMELEE,
HEALBOT_OPTIONS_MONITORRANGE, HEALBOT_OPTIONS_MONITORRANGE,
HEALBOT_OPTIONS_MONITORHEALERS, HEALBOT_OPTIONS_MONITORHEALERS,
+13 -25
View File
@@ -33,6 +33,14 @@ function HealBot_Options_EmergencyHeals_OnClick(this)
HealBot_Config.EmergencyHeals = this:GetChecked() or 0; HealBot_Config.EmergencyHeals = this:GetChecked() or 0;
HealBot_RecalcParty(); HealBot_RecalcParty();
end end
function HealBot_Options_PetHeals_OnLoad(this,text)
this.text = text
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_PetHeals_OnClick(this)
HealBot_Config.PetHeals = this:GetChecked() or 0;
HealBot_RecalcParty();
end
function HealBot_Options_OverHeal_OnValueChanged(this) function HealBot_Options_OverHeal_OnValueChanged(this)
HealBot_Config.OverHeal = HealBot_Options_Pct_OnValueChanged(this); HealBot_Config.OverHeal = HealBot_Options_Pct_OnValueChanged(this);
end end
@@ -279,7 +287,7 @@ function HealBot_Options_EmergencyFilter_Reset()
HealBot_EmergInc[HEALBOT_SHAMAN] = 0; HealBot_EmergInc[HEALBOT_SHAMAN] = 0;
HealBot_EmergInc[HEALBOT_WARLOCK] = 0; HealBot_EmergInc[HEALBOT_WARLOCK] = 0;
HealBot_EmergInc[HEALBOT_WARRIOR] = 0; HealBot_EmergInc[HEALBOT_WARRIOR] = 0;
if HealBot_Config.EmergIncMonitor==2 then if HealBot_Config.EmergIncMonitor==1 then
HealBot_EmergInc[HEALBOT_DRUID] = 1; HealBot_EmergInc[HEALBOT_DRUID] = 1;
HealBot_EmergInc[HEALBOT_HUNTER] = 1; HealBot_EmergInc[HEALBOT_HUNTER] = 1;
HealBot_EmergInc[HEALBOT_MAGE] = 1; HealBot_EmergInc[HEALBOT_MAGE] = 1;
@@ -289,27 +297,7 @@ function HealBot_Options_EmergencyFilter_Reset()
HealBot_EmergInc[HEALBOT_SHAMAN] = 1; HealBot_EmergInc[HEALBOT_SHAMAN] = 1;
HealBot_EmergInc[HEALBOT_WARLOCK] = 1; HealBot_EmergInc[HEALBOT_WARLOCK] = 1;
HealBot_EmergInc[HEALBOT_WARRIOR] = 1; HealBot_EmergInc[HEALBOT_WARRIOR] = 1;
elseif HealBot_Config.EmergIncMonitor==3 then elseif HealBot_Config.EmergIncMonitor==2 then
HealBot_EmergInc[HEALBOT_DRUID] = 1;
elseif HealBot_Config.EmergIncMonitor==4 then
HealBot_EmergInc[HEALBOT_HUNTER] = 1;
elseif HealBot_Config.EmergIncMonitor==5 then
HealBot_EmergInc[HEALBOT_MAGE] = 1;
elseif HealBot_Config.EmergIncMonitor==6 then
HealBot_EmergInc[HEALBOT_PALADIN] = 1;
elseif HealBot_Config.EmergIncMonitor==7 then
HealBot_EmergInc[HEALBOT_PRIEST] = 1;
elseif HealBot_Config.EmergIncMonitor==8 then
HealBot_EmergInc[HEALBOT_ROGUE] = 1;
elseif HealBot_Config.EmergIncMonitor==9 then
HealBot_EmergInc[HEALBOT_SHAMAN] = 1;
elseif HealBot_Config.EmergIncMonitor==10 then
HealBot_EmergInc[HEALBOT_WARLOCK] = 1;
elseif HealBot_Config.EmergIncMonitor==11 then
HealBot_EmergInc[HEALBOT_WARRIOR] = 1;
elseif HealBot_Config.EmergIncMonitor==12 then
-- Pets: no player classes enabled (handled separately in layout)
elseif HealBot_Config.EmergIncMonitor==13 then
HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncMelee[HEALBOT_DRUID]; HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncMelee[HEALBOT_DRUID];
HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncMelee[HEALBOT_HUNTER]; HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncMelee[HEALBOT_HUNTER];
HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncMelee[HEALBOT_MAGE]; HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncMelee[HEALBOT_MAGE];
@@ -319,7 +307,7 @@ function HealBot_Options_EmergencyFilter_Reset()
HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncMelee[HEALBOT_SHAMAN]; HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncMelee[HEALBOT_SHAMAN];
HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncMelee[HEALBOT_WARLOCK]; HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncMelee[HEALBOT_WARLOCK];
HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncMelee[HEALBOT_WARRIOR]; HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncMelee[HEALBOT_WARRIOR];
elseif HealBot_Config.EmergIncMonitor==14 then elseif HealBot_Config.EmergIncMonitor==3 then
HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncRange[HEALBOT_DRUID]; HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncRange[HEALBOT_DRUID];
HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncRange[HEALBOT_HUNTER]; HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncRange[HEALBOT_HUNTER];
HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncRange[HEALBOT_MAGE]; HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncRange[HEALBOT_MAGE];
@@ -329,7 +317,7 @@ function HealBot_Options_EmergencyFilter_Reset()
HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncRange[HEALBOT_SHAMAN]; HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncRange[HEALBOT_SHAMAN];
HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncRange[HEALBOT_WARLOCK]; HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncRange[HEALBOT_WARLOCK];
HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncRange[HEALBOT_WARRIOR]; HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncRange[HEALBOT_WARRIOR];
elseif HealBot_Config.EmergIncMonitor==15 then elseif HealBot_Config.EmergIncMonitor==4 then
HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncHealers[HEALBOT_DRUID]; HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncHealers[HEALBOT_DRUID];
HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncHealers[HEALBOT_HUNTER]; HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncHealers[HEALBOT_HUNTER];
HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncHealers[HEALBOT_MAGE]; HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncHealers[HEALBOT_MAGE];
@@ -339,7 +327,7 @@ function HealBot_Options_EmergencyFilter_Reset()
HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncHealers[HEALBOT_SHAMAN]; HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncHealers[HEALBOT_SHAMAN];
HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncHealers[HEALBOT_WARLOCK]; HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncHealers[HEALBOT_WARLOCK];
HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncHealers[HEALBOT_WARRIOR]; HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncHealers[HEALBOT_WARRIOR];
elseif HealBot_Config.EmergIncMonitor==16 then elseif HealBot_Config.EmergIncMonitor==5 then
HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncCustom[HEALBOT_DRUID]; HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncCustom[HEALBOT_DRUID];
HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncCustom[HEALBOT_HUNTER]; HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncCustom[HEALBOT_HUNTER];
HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncCustom[HEALBOT_MAGE]; HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncCustom[HEALBOT_MAGE];
+13
View File
@@ -95,6 +95,19 @@
<OnClick>HealBot_Options_EmergencyHeals_OnClick(this)</OnClick> <OnClick>HealBot_Options_EmergencyHeals_OnClick(this)</OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<CheckButton name="HealBot_Options_PetHeals" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GroupHeals" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="244" y="5" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_PetHeals_OnLoad(this,HEALBOT_OPTIONS_PETHEALS)</OnLoad>
<OnClick>HealBot_Options_PetHeals_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
</Frames> </Frames>
</Frame> </Frame>
+227 -76
View File
@@ -70,13 +70,13 @@ function HealBot_HealthColor(unit, hlth, maxhlth)
end end
local colorMode = HealBot_Config.bcolormode[HealBot_Config.Current_Skin] or 1 local colorMode = HealBot_Config.bcolormode[HealBot_Config.Current_Skin] or 1
if colorMode == 2 and HealBot_Model and HealBot_Model.units[unit] and HealBot_Model.units[unit].englishClass then if colorMode == 2 and HealBot_Model and HealBot_Model.units[unit] and HealBot_Model.units[unit].englishClass and RAID_CLASS_COLORS and RAID_CLASS_COLORS[HealBot_Model.units[unit].englishClass] then
local engClass = HealBot_Model.units[unit].englishClass local engClass = HealBot_Model.units[unit].englishClass
if RAID_CLASS_COLORS and RAID_CLASS_COLORS[engClass] then r = RAID_CLASS_COLORS[engClass].r
r = RAID_CLASS_COLORS[engClass].r g = RAID_CLASS_COLORS[engClass].g
g = RAID_CLASS_COLORS[engClass].g b = RAID_CLASS_COLORS[engClass].b
b = RAID_CLASS_COLORS[engClass].b elseif colorMode == 2 and string.find(unit, "pet") then
end r, g, b = 0.4, 0.9, 0.6 -- Mint color
else else
if pct >= 0.98 then r = 0.0; end if pct >= 0.98 then r = 0.0; end
if pct < 0.98 and pct >= 0.65 then r = 2.94 - (pct * 3); end if pct < 0.98 and pct >= 0.65 then r = 2.94 - (pct * 3); end
@@ -110,6 +110,11 @@ function HealBot_Action_EnableButton(button)
local name = state.name local name = state.name
if not name then name = UnitName(unit) end -- fallback if not name then name = UnitName(unit) end -- fallback
if not name or name == "Unknown" then
button:Hide()
return
end
local bar = HealBot_Action_HealthBar(button); local bar = HealBot_Action_HealthBar(button);
local bar2 = HealBot_Action_HealthBar2(button); local bar2 = HealBot_Action_HealthBar2(button);
if not button.bar3 then button.bar3 = getglobal(button:GetName() .. "Bar3") end if not button.bar3 then button.bar3 = getglobal(button:GetName() .. "Bar3") end
@@ -402,6 +407,7 @@ function HealBot_Action_SetHealButton(index, unit)
return nil return nil
end end
local button = getglobal("HealBot_Action_HealUnit" .. index); local button = getglobal("HealBot_Action_HealUnit" .. index);
if not button then return nil end
button.unit = unit; button.unit = unit;
if unit then if unit then
table.insert(HealBot_Action_HealButtons, button); table.insert(HealBot_Action_HealButtons, button);
@@ -414,8 +420,12 @@ function HealBot_Action_SetHealButton(index, unit)
end end
function HealBot_Action_PartyChanged() function HealBot_Action_PartyChanged()
if not HealBot_IsFighting then if HealBot_IsFighting then
local numBars = 0; HealBot_Action_AppendNewUnits()
return
end
local numBars = 0;
local numHeaders = 0; local numHeaders = 0;
local TempMaxH = 0; local TempMaxH = 0;
local HeaderPos = {}; local HeaderPos = {};
@@ -466,10 +476,7 @@ function HealBot_Action_PartyChanged()
local checked_end = 0; local checked_end = 0;
headerno = 0; headerno = 0;
for j = 1, 41 do for j = 1, 100 do
HealBot_Action_SetHealButton(j, nil);
end
for j = 51, 60 do
HealBot_Action_SetHealButton(j, nil); HealBot_Action_SetHealButton(j, nil);
end end
HealBot_Action_SetHealButton(); HealBot_Action_SetHealButton();
@@ -595,7 +602,7 @@ function HealBot_Action_PartyChanged()
numBars = numBars + 1; numBars = numBars + 1;
numHeaders = numHeaders + 1; numHeaders = numHeaders + 1;
end end
if HealBot_Config.EmergIncMonitor == 2 then if HealBot_Config.EmergIncMonitor == 1 then
if GetNumRaidMembers() > 0 then if GetNumRaidMembers() > 0 then
for j = 1, 40 do for j = 1, 40 do
local PossibleEmerg = 1; local PossibleEmerg = 1;
@@ -628,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
@@ -643,50 +653,7 @@ function HealBot_Action_PartyChanged()
end end
end end
end end
elseif HealBot_Config.EmergIncMonitor == 12 then
if GetNumRaidMembers() > 0 then
for j = 1, 40 do
local unit = "raidpet" .. j;
if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then
local ownerIndex = j;
local name = UnitName(unit) or "Pet";
local _, _, subgroup = GetRaidRosterInfo(ownerIndex);
subgroup = subgroup or 1;
if HealBot_Config.ExtraOrder == 1 then
order[unit] = name;
elseif HealBot_Config.ExtraOrder == 2 then
order[unit] = HEALBOT_OPTIONS_PETS;
elseif HealBot_Config.ExtraOrder == 3 then
order[unit] = subgroup;
else
order[unit] = 0 - UnitHealthMax(unit);
if UnitHealthMax(unit) > TempMaxH then TempMaxH = UnitHealthMax(unit); end
end
table.insert(units, unit);
numBars = numBars + 1;
end
end
else
local petUnits = { "pet", "partypet1", "partypet2", "partypet3", "partypet4" };
for _, unit in ipairs(petUnits) do
if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then
local name = UnitName(unit) or "Pet";
if HealBot_Config.ExtraOrder == 1 then
order[unit] = name;
elseif HealBot_Config.ExtraOrder == 2 then
order[unit] = HEALBOT_OPTIONS_PETS;
elseif HealBot_Config.ExtraOrder == 3 then
order[unit] = 1;
else
order[unit] = 0 - UnitHealthMax(unit);
if UnitHealthMax(unit) > TempMaxH then TempMaxH = UnitHealthMax(unit); end
end
table.insert(units, unit);
numBars = numBars + 1;
end
end
end
else else
if GetNumRaidMembers() > 0 then if GetNumRaidMembers() > 0 then
for j = 1, 40 do for j = 1, 40 do
@@ -726,6 +693,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
@@ -750,25 +720,29 @@ function HealBot_Action_PartyChanged()
local TempSort = "init" local TempSort = "init"
TempMaxH = math.ceil(TempMaxH / 1000) * 1000; TempMaxH = math.ceil(TempMaxH / 1000) * 1000;
if GetNumRaidMembers() > 0 or HealBot_Config.EmergIncMonitor == 12 then for j = 1, 40 do
for j = 1, 40 do if not units[j] then break end
if not units[j] then break end local name, rank, subgroup, level, class, fileName, zone, online, isDead;
local name, rank, subgroup, level, class, fileName, zone, online, isDead; local ownerIndex = nil;
local ownerIndex = nil; if string.sub(units[j], 1, 7) == "raidpet" then
if string.sub(units[j], 1, 7) == "raidpet" then ownerIndex = tonumber(string.sub(units[j], 8));
ownerIndex = tonumber(string.sub(units[j], 8)); elseif string.sub(units[j], 1, 4) == "raid" then
elseif string.sub(units[j], 1, 4) == "raid" then ownerIndex = tonumber(string.sub(units[j], 5));
ownerIndex = tonumber(string.sub(units[j], 5)); end
end
if ownerIndex then
name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(ownerIndex);
end
if string.sub(units[j], 1, 7) == "raidpet" or string.sub(units[j], 1, 8) == "partypet" or units[j] == "pet" then if ownerIndex then
name = UnitName(units[j]) or "Pet"; name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(ownerIndex);
class = HEALBOT_OPTIONS_PETS; else
subgroup = subgroup or 1; name = UnitName(units[j]) or "not known";
end class = UnitClass(units[j]) or "not known";
subgroup = 1;
end
if string.sub(units[j], 1, 7) == "raidpet" or string.sub(units[j], 1, 8) == "partypet" or units[j] == "pet" then
name = UnitName(units[j]) or "Pet";
class = HEALBOT_OPTIONS_PETS;
subgroup = subgroup or 1;
end
if HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 and HealBot_Config.ExtraOrder == 2 and TempSort ~= class then if HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 and HealBot_Config.ExtraOrder == 2 and TempSort ~= class then
TempSort = class TempSort = class
@@ -792,13 +766,48 @@ function HealBot_Action_PartyChanged()
HealBot_Action_SetHealButton(i, units[j]); HealBot_Action_SetHealButton(i, units[j]);
if i == last then break end if i == last then break end
end end
end
end end
if numBars == ExtraValid + 1 and HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then if numBars == ExtraValid + 1 and HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then
HeaderPos[i + 1] = nil; HeaderPos[i + 1] = nil;
numBars = numBars - 1; numBars = numBars - 1;
end end
last = last + 40
local PetsValid = numBars;
if HealBot_Config.PetHeals == 1 then
if HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then
HeaderPos[i + 1] = HEALBOT_OPTIONS_PETHEALS
numBars = numBars + 1;
numHeaders = numHeaders + 1;
end
if GetNumRaidMembers() > 0 then
for j = 1, 40 do
local unit = "raidpet" .. j;
if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then
i = i + 1;
HealBot_Action_SetHealButton(i, unit);
numBars = numBars + 1;
end
if i == last then break end
end
else
local petUnits = { "pet", "partypet1", "partypet2", "partypet3", "partypet4" };
for _, unit in ipairs(petUnits) do
if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then
i = i + 1;
HealBot_Action_SetHealButton(i, unit);
numBars = numBars + 1;
end
if i == last then break end
end
end
end
if numBars == PetsValid + 1 and HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then
HeaderPos[PetsValid + 1] = nil;
numBars = numBars - 1;
numHeaders = numHeaders - 1;
end
local bpadding = (HealBot_Config.bpadding and HealBot_Config.bpadding[HealBot_Config.Current_Skin]) or 10 local bpadding = (HealBot_Config.bpadding and HealBot_Config.bpadding[HealBot_Config.Current_Skin]) or 10
local OffsetY = bpadding; local OffsetY = bpadding;
local OffsetX = bpadding; local OffsetX = bpadding;
@@ -901,6 +910,16 @@ function HealBot_Action_PartyChanged()
end end
end end
HealBot_Grid_LastI = i;
HealBot_Grid_LastH = h;
HealBot_Grid_LastZ = z;
HealBot_Grid_OffsetX = OffsetX;
HealBot_Grid_OffsetY = OffsetY;
HealBot_Grid_MaxOffsetX = MaxOffsetX;
HealBot_Grid_MaxOffsetY = MaxOffsetY;
HealBot_Grid_Limit = limit;
HealBot_Grid_NumBars = numBars;
if HealBot_Config.HideOptions == 1 then if HealBot_Config.HideOptions == 1 then
HealBot_Action_OptionsButton:Hide(); HealBot_Action_OptionsButton:Hide();
else else
@@ -945,7 +964,6 @@ function HealBot_Action_PartyChanged()
if HealBot_Config.HideParty == 1 and HidePartyFrame then if HealBot_Config.HideParty == 1 and HidePartyFrame then
HidePartyFrame(); HidePartyFrame();
end end
end
HealBot_Action_RefreshButtons(); HealBot_Action_RefreshButtons();
HealBot_Action_ShowFrame(); HealBot_Action_ShowFrame();
end end
@@ -995,3 +1013,136 @@ function HealBot_Action_Refresh(unit)
end end
end end
end end
function HealBot_Action_AppendUnit(unit)
if not HealBot_Grid_LastI then return end
if HealBot_Grid_LastI >= 100 then return end
HealBot_Grid_LastI = HealBot_Grid_LastI + 1
HealBot_Grid_NumBars = HealBot_Grid_NumBars + 1
local button = HealBot_Action_SetHealButton(HealBot_Grid_LastI, unit)
if not button then return end
local orientation = (HealBot_Config.GridOrientation and HealBot_Config.GridOrientation[HealBot_Config.Current_Skin]) or 1
local bwidth = (HealBot_Config.bwidth and HealBot_Config.bwidth[HealBot_Config.Current_Skin]) or 85
local bheight = (HealBot_Config.bheight and HealBot_Config.bheight[HealBot_Config.Current_Skin]) or 18
local bcspace = (HealBot_Config.bcspace and HealBot_Config.bcspace[HealBot_Config.Current_Skin]) or 3
local brspace = (HealBot_Config.brspace and HealBot_Config.brspace[HealBot_Config.Current_Skin]) or 3
local bpadding = (HealBot_Config.bpadding and HealBot_Config.bpadding[HealBot_Config.Current_Skin]) or 10
if orientation == 1 then
HealBot_Grid_OffsetY = HealBot_Action_PositionButton(button, HealBot_Grid_OffsetX, HealBot_Grid_OffsetY, bwidth, bheight, false, nil)
if HealBot_Grid_LastH == HealBot_Grid_Limit then
HealBot_Grid_LastH = 0
if HealBot_Grid_MaxOffsetY < HealBot_Grid_OffsetY then HealBot_Grid_MaxOffsetY = HealBot_Grid_OffsetY end
HealBot_Grid_OffsetY = bpadding
HealBot_Grid_OffsetX = HealBot_Grid_OffsetX + bwidth + bcspace
end
else
HealBot_Grid_OffsetX = HealBot_Action_PositionButtonHorizontal(button, HealBot_Grid_OffsetX, HealBot_Grid_OffsetY, bwidth, bheight, false, nil)
if HealBot_Grid_LastH == HealBot_Grid_Limit then
HealBot_Grid_LastH = 0
if HealBot_Grid_MaxOffsetX < HealBot_Grid_OffsetX then HealBot_Grid_MaxOffsetX = HealBot_Grid_OffsetX end
HealBot_Grid_OffsetX = bpadding
HealBot_Grid_OffsetY = HealBot_Grid_OffsetY + bheight + brspace
end
end
HealBot_Grid_LastH = HealBot_Grid_LastH + 1
HealBot_Grid_LastZ = HealBot_Grid_LastZ + 1
local bar = HealBot_Action_HealthBar(button)
local bar2 = HealBot_Action_HealthBar2(button)
bar.txt = getglobal(bar:GetName() .. "_text")
bar:SetHeight(bheight)
local btexture = (HealBot_Config.btexture and HealBot_Config.btexture[HealBot_Config.Current_Skin]) or 5
HealBot_Action_SetTexture(bar, btexture)
local btextheight = (HealBot_Config.btextheight and HealBot_Config.btextheight[HealBot_Config.Current_Skin]) or 10
bar.txt:SetTextHeight(btextheight)
bar2:SetHeight(bheight)
HealBot_Action_SetTexture(bar2, btexture)
local totalOffsetX = HealBot_Grid_OffsetX
local totalOffsetY = HealBot_Grid_OffsetY
if orientation == 1 then
if HealBot_Grid_MaxOffsetY < totalOffsetY then HealBot_Grid_MaxOffsetY = totalOffsetY end
totalOffsetY = HealBot_Grid_MaxOffsetY
else
if HealBot_Grid_MaxOffsetX < totalOffsetX then HealBot_Grid_MaxOffsetX = totalOffsetX end
totalOffsetX = HealBot_Grid_MaxOffsetX
totalOffsetY = totalOffsetY + bheight + brspace
end
HealBot_Action_SetHeightWidth(totalOffsetX, totalOffsetY + bpadding, bwidth)
end
function HealBot_Action_AppendNewUnits()
if not HealBot_Grid_LastI then return end
local unitsToCheck = {}
-- Gather units based on config, similar to PartyChanged
if HealBot_Config.GroupHeals == 1 then
for _, unit in ipairs(HealBot_Action_HealGroup) do
table.insert(unitsToCheck, unit)
end
end
if HealBot_Config.TankHeals == 1 and GetNumRaidMembers() > 0 and CT_RA_MainTanks then
for j = 1, 10 do
if CT_RA_MainTanks[j] then
for k = 1, GetNumRaidMembers() do
local unit = "raid" .. k
local skip = false
if UnitInParty(unit) and HealBot_Config.GroupHeals == 1 and not UnitIsUnit(unit, "player") then
skip = true
end
if not skip and UnitName(unit) == CT_RA_MainTanks[j] then
table.insert(unitsToCheck, unit)
end
end
end
end
end
if HealBot_Config.TargetHeals == 1 then
for _, unit in ipairs(HealBot_Action_HealTarget) do
table.insert(unitsToCheck, unit)
end
table.insert(unitsToCheck, "target")
end
if HealBot_Config.EmergencyHeals == 1 then
if GetNumRaidMembers() > 0 then
for j = 1, 40 do
local unit = "raid" .. j
if not (UnitInParty(unit) and HealBot_Config.GroupHeals == 1) then
table.insert(unitsToCheck, unit)
end
end
else
for j = 1, 4 do
table.insert(unitsToCheck, "party" .. j)
end
table.insert(unitsToCheck, "player")
end
end
if HealBot_Config.PetHeals == 1 then
if GetNumRaidMembers() > 0 then
for j = 1, 40 do
table.insert(unitsToCheck, "raidpet" .. j)
end
else
for j = 1, 4 do
table.insert(unitsToCheck, "partypet" .. j)
end
table.insert(unitsToCheck, "pet")
end
end
for _, unit in ipairs(unitsToCheck) do
if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then
HealBot_Action_AppendUnit(unit)
end
end
end
+16 -5
View File
@@ -1,10 +1,11 @@
**HealBotBlue** **HealBotBlue**
By Bluewhale. By Bluewhale.
> **NOTE:** For HealBot to work correctly, the **Selfcast** feature in WoW options needs to be disabled.
Original HealBot, while being a staple healing addon in Wrath and later expansions, was in its infancy during Vanilla WoW. It was a memory and CPU hog that ate up resources, featured a clunky UI, and offered limited functions. To fix all of the above while still using it as a base framework, I refactored the entire codebase. The monolithic code structure was split to follow a more modern approach (MVC design pattern), making it more stable and easily editable. Additionally, the inefficient AURA scanning was replaced with lightweight (Observer Pattern) reactive programming. It now updates only what is necessary when a trigger fires, rather than performing clumsy, continuous scans of a 40-man raid. By doing so, I managed to throttle down CPU and memory usage significantly, placing it on par with modern addons. Additional functionalities are being added over time to provide a holistic, healer-centered raid frame. Original HealBot, while being a staple healing addon in Wrath and later expansions, was in its infancy during Vanilla WoW. It was a memory and CPU hog that ate up resources, featured a clunky UI, and offered limited functions. To fix all of the above while still using it as a base framework, I refactored the entire codebase. The monolithic code structure was split to follow a more modern approach (MVC design pattern), making it more stable and easily editable. Additionally, the inefficient AURA scanning was replaced with lightweight (Observer Pattern) reactive programming. It now updates only what is necessary when a trigger fires, rather than performing clumsy, continuous scans of a 40-man raid. By doing so, I managed to throttle down CPU and memory usage significantly, placing it on par with modern addons. Additional functionalities are being added over time to provide a holistic, healer-centered raid frame.
> **Performance First:** The raidframe is not library reliant - unlike popular raidframe replacement addons it doesn't rely at all on external frameworks. While this makes my work a bit harder this allows complete control over garbage collection and CPU use which makes it multiple times more stable and lightweight.
> **NOTE:** For HealBot to work correctly, the **Selfcast** feature in WoW options needs to be disabled.
### Reporting Errors ### Reporting Errors
Major errors will pop up a frame with error information. Take a screenshot and post comments. Major errors will pop up a frame with error information. Take a screenshot and post comments.
@@ -19,12 +20,15 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
* `/hb reset` - Resets the contents of the main HealBot panel * `/hb reset` - Resets the contents of the main HealBot panel
### Key Features & Current Functionality ### Key Features & Current Functionality
* **MVC & Observer Architecture:** High-performance, reactive engine that updates frames dynamically on state changes, drastically reducing CPU and memory overhead compared to traditional polling. * **MVC & Observer Architecture:** High-performance, reactive engine that updates frames dynamically on state changes, drastically reducing CPU and memory overhead. Features memory recycling pool and event loop decoupling for zero-stutter combat.
* **Native Hovercasting (Mouseover):** Cast configured spells on hovered unit frames using keybinds directly from your action bars, without losing your current target. (Toggleable in Options -> General). * **Native Hovercasting (Mouseover):** Cast configured spells on hovered unit frames using keybinds directly from your action bars, without losing your current target. (Toggleable in Options -> General).
* **Macro, Item, & Script Bindings:** Bind named macros, inventory items, and scripts directly to mouse clicks. Supports implicit `@mouseover` targeting natively.
* **Zero-Latency Self-Heals:** Incoming heals for the local player process instantly with zero latency, independent of network lag.
* **Talent-Based Calculations & Equipment Bonus:** Dynamic spell healing calculations for Druid, Priest, and Paladin based on talents, and automatically scans equipped gear to scale healing predictions - currently only TurtleWoW patch 1.18 supported.
* **Modifier-Aware Tooltips:** Tooltips dynamically update to show exact bound actions (Shift/Ctrl/Alt) and required mana costs (turns red if insufficient mana).
* **Blizzard Party Frame Toggle:** Toggle to automatically hide Blizzard's default party frames when in a group in favor of HealBot's layouts. * **Blizzard Party Frame Toggle:** Toggle to automatically hide Blizzard's default party frames when in a group in favor of HealBot's layouts.
* **HoT & Buff Tracking:** Intelligently track active HoTs and buffs directly on the grid frames with custom icons (e.g., Renew, Rejuvenation, Regrowth, Fear Ward). * **HoT & Buff Tracking:** Intelligently track active HoTs and buffs directly on the grid frames with custom icons (e.g., Renew, Rejuvenation, Regrowth, Fear Ward).
* **Mana Bars for Healers:** Enable and position mini-mana status bars next to unit frames, toggleable to display for healer classes only or all classes. * **Mana Bars for Healers:** Enable and position mini-mana status bars next to unit frames, toggleable to display for healer classes only or all classes.
* **Equipment Bonus Integration:** Automatically scans equipped gear (for classes capable of healing) to dynamically scale healing predictions.
* **Curse & Debuff Warning (CDC):** Dynamic visual and audio alerts for cleanable debuffs. Customizable colors based on debuff type (Curse, Poison, Disease, Magic). * **Curse & Debuff Warning (CDC):** Dynamic visual and audio alerts for cleanable debuffs. Customizable colors based on debuff type (Curse, Poison, Disease, Magic).
* **Pet & Familiar Frames:** Dedicated, toggleable frames for tracking and healing player pets. * **Pet & Familiar Frames:** Dedicated, toggleable frames for tracking and healing player pets.
* **Customizable Health Text:** Dynamic unit health display (Name Only, Percentage, Real Health, or Health Deficit). * **Customizable Health Text:** Dynamic unit health display (Name Only, Percentage, Real Health, or Health Deficit).
@@ -37,11 +41,18 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
### Known issues ### Known issues
* **New spell rank bug** you may experience lua error spaming your chat frame after learning new healing spells. /reload will clear the issue. To be fixed next release * **New spell rank bug** you may experience lua error spaming your chat frame after learning new healing spells. /reload will clear the issue.
### Change Log ### Change Log
**v1.6.2**
* **Hotfix - raid and party frames** - if getNumRaidMembers() > 0 wrapper around extra bars stopped from displaying all frames blocked from displaying Extras\Raid.
* **UI Update - Raid & Pets Split** - Split the "Raid / Extra" toggle into separate "Raid" and "Pets" toggles. Simplified the raid bars filter dropdown to core options (All, Melee, Ranged, Heals, Custom).
**v1.6.1**
* **Hotfix - pet frames** - With class colours toggled extra frames for player pets were given some classy mint colour.
* **Hotfi - raidframes in combat** - Modfied how frames behave when player leaves during combat.
**v1.6** **v1.6**
* **Event Loop Decoupling:** Ripped out redundant synchronous UI redraws that were bypassed by the new MVC architecture. High-frequency events (mana regen, health ticks) now fully rely on the `HealBot_OnUpdate` dirty queue, severely reducing CPU bottlenecks. * **Event Loop Decoupling:** Ripped out redundant synchronous UI redraws that were bypassed by the new MVC architecture. High-frequency events (mana regen, health ticks) now fully rely on the `HealBot_OnUpdate` dirty queue, severely reducing CPU bottlenecks.