20 Commits

Author SHA1 Message Date
Bluewhale1337 496013ae9c Merge branch 'dev' of https://github.com/Bluewhale1337/HealBotBlue into dev 2026-08-09 12:11:57 +02:00
Bluewhale1337 f7443fcdf0 feat: increase icon limit to 10, add customizable icon size, and remove obsolete code 2026-08-09 12:11:29 +02:00
Bluewhale1337 a0d435eb70 Merge pull request #13 from Bluewhale1337/main
Merging minor changes from main to dev to sync up
2026-08-09 10:13:08 +02:00
Bluewhale1337 048970d1b7 chore: bump version to 1.6.3 and add string splitter fallback to changelog 2026-08-07 14:45:18 +02:00
Bluewhale1337 d5dec0f1f0 fix: handle empty or missing delimiters in HealBot_SplitString to prevent errors 2026-08-07 14:43:18 +02:00
Bluewhale1337 ad302f299e Merge pull request #12 from Bluewhale1337/dev
Dev merge
2026-08-05 22:26:36 +02:00
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 6c4297c126 Update README.md
info about dev branch adses
2026-07-30 15:40:18 +02:00
Bluewhale1337 4f7a06ad6f Merge pull request #11 from Bluewhale1337/dev
Merge hotfixes to main
2026-07-26 14:11:10 +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
15 changed files with 470 additions and 172 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
## Interface: 11200 ## Interface: 11200
## Title: HealBotBlue ## Title: HealBotBlue
## Version: 1.6.0 ## Version: 1.6.3
## 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
+3
View File
@@ -123,6 +123,9 @@ end
function HealBot_SplitString(str, delimiter) function HealBot_SplitString(str, delimiter)
local result = {} local result = {}
if not delimiter or delimiter == "" then
return {str}
end
local start_pos = 1 local start_pos = 1
while true do while true do
local end_pos = string.find(str, delimiter, start_pos, true) local end_pos = string.find(str, delimiter, start_pos, true)
+89
View File
@@ -73,6 +73,46 @@
</Anchor> </Anchor>
</Anchors> </Anchors>
</Texture> </Texture>
<Texture name="$parentIcon6" hidden="true">
<Size><AbsDimension x="12" y="12"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentIcon5" relativePoint="RIGHT">
<Offset><AbsDimension x="1" y="0"/></Offset>
</Anchor>
</Anchors>
</Texture>
<Texture name="$parentIcon7" hidden="true">
<Size><AbsDimension x="12" y="12"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentIcon6" relativePoint="RIGHT">
<Offset><AbsDimension x="1" y="0"/></Offset>
</Anchor>
</Anchors>
</Texture>
<Texture name="$parentIcon8" hidden="true">
<Size><AbsDimension x="12" y="12"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentIcon7" relativePoint="RIGHT">
<Offset><AbsDimension x="1" y="0"/></Offset>
</Anchor>
</Anchors>
</Texture>
<Texture name="$parentIcon9" hidden="true">
<Size><AbsDimension x="12" y="12"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentIcon8" relativePoint="RIGHT">
<Offset><AbsDimension x="1" y="0"/></Offset>
</Anchor>
</Anchors>
</Texture>
<Texture name="$parentIcon10" hidden="true">
<Size><AbsDimension x="12" y="12"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentIcon9" relativePoint="RIGHT">
<Offset><AbsDimension x="1" y="0"/></Offset>
</Anchor>
</Anchors>
</Texture>
</Layer> </Layer>
</Layers> </Layers>
</StatusBar> </StatusBar>
@@ -232,6 +272,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 +292,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"/>
+29 -6
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
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 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
@@ -137,7 +160,7 @@ function HealBot_OnEvent_UnitAura(this, unit)
if not HealBot_UnitIcons[unit] then if not HealBot_UnitIcons[unit] then
HealBot_UnitIcons[unit] = {} HealBot_UnitIcons[unit] = {}
end end
for j = 1, 5 do for j = 1, 10 do
HealBot_UnitIcons[unit][j] = nil HealBot_UnitIcons[unit][j] = nil
end end
local iconCount = 0 local iconCount = 0
@@ -145,7 +168,7 @@ function HealBot_OnEvent_UnitAura(this, unit)
while true do while true do
local debuff, tmp, debuff_type = UnitDebuff(unit, i, 1) local debuff, tmp, debuff_type = UnitDebuff(unit, i, 1)
if debuff then if debuff then
if iconCount < 5 then if iconCount < 10 then
iconCount = iconCount + 1 iconCount = iconCount + 1
HealBot_UnitIcons[unit][iconCount] = debuff HealBot_UnitIcons[unit][iconCount] = debuff
end end
@@ -167,7 +190,7 @@ function HealBot_OnEvent_UnitAura(this, unit)
while true do while true do
local buff = UnitBuff(unit, b) local buff = UnitBuff(unit, b)
if not buff then break end if not buff then break end
if HealBot_TrackedHoTs[buff] and iconCount < 5 then if HealBot_TrackedHoTs[buff] and iconCount < 10 then
iconCount = iconCount + 1 iconCount = iconCount + 1
HealBot_UnitIcons[unit][iconCount] = buff HealBot_UnitIcons[unit][iconCount] = buff
end end
@@ -178,7 +201,7 @@ function HealBot_OnEvent_UnitAura(this, unit)
while true do while true do
local debuff = UnitDebuff(unit, d) local debuff = UnitDebuff(unit, d)
if not debuff then break end if not debuff then break end
if HealBot_TrackedHoTs[debuff] and iconCount < 5 then if HealBot_TrackedHoTs[debuff] and iconCount < 10 then
iconCount = iconCount + 1 iconCount = iconCount + 1
HealBot_UnitIcons[unit][iconCount] = debuff HealBot_UnitIcons[unit][iconCount] = debuff
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();
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");
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; _cast = 0;
elseif line == HEALBOT_TOOLTIP_CHANNELED then 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; _cast = 0;
elseif (tmpText) then
tmpTest, tmpTest, _cast = string.find(line, HEALBOT_TOOLTIP_CAST_TIME);
end
else else
HealBot_Report_Error("================================"); t1, t2, match = string.find(txt, HEALBOT_TOOLTIP_CAST_TIME);
HealBot_Report_Error("ERROR: HealBot_ScanTooltip is lost"); if match then _cast = match; end
HealBot_Report_Error("ERROR: If BonusScanner is used, try disabling BonusScanner"); 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 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);
+2 -13
View File
@@ -246,6 +246,7 @@ HealBot_ConfigDefaults = {
bpadding = {[HEALBOT_SKINS_STD] = 10, ["HealBot Party"] = 10, ["HealBot Raid"] = 10, ["Alteric Valley"] = 10, ["Modern Flat"] = 10}, bpadding = {[HEALBOT_SKINS_STD] = 10, ["HealBot Party"] = 10, ["HealBot Raid"] = 10, ["Alteric Valley"] = 10, ["Modern Flat"] = 10},
bboffset = {[HEALBOT_SKINS_STD] = 16, ["HealBot Party"] = 16, ["HealBot Raid"] = 16, ["Alteric Valley"] = 16, ["Modern Flat"] = 3}, bboffset = {[HEALBOT_SKINS_STD] = 16, ["HealBot Party"] = 16, ["HealBot Raid"] = 16, ["Alteric Valley"] = 16, ["Modern Flat"] = 3},
bfontoutline = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 1}, bfontoutline = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 1},
biconsize = {[HEALBOT_SKINS_STD] = 12, ["HealBot Party"] = 12, ["HealBot Raid"] = 12, ["Alteric Valley"] = 12, ["Modern Flat"] = 12},
ShowTooltip = 1, ShowTooltip = 1,
ShowManaBars = 0, ShowManaBars = 0,
ManaBarsHealersOnly = 0, ManaBarsHealersOnly = 0,
@@ -274,18 +275,6 @@ HEALBOT_ADDON_ID="HealBot_Heals"
HealBot_AbortButton=1; HealBot_AbortButton=1;
HealBot_Groups = {
["ITEMS"] = {
HEALBOT_BANDAGES,
HEALBOT_HEALING_POTIONS,
HEALBOT_HEALTHSTONES,
},
["PALADIN"] = {
HEALBOT_HOLY_LIGHT,
HEALBOT_FLASH_OF_LIGHT,
},
}
HealBot_Spells = { HealBot_Spells = {
-- Cast = secs until effect starts -- Cast = secs until effect starts
-- Channel = secs until caster available -- Channel = secs until caster available
@@ -584,7 +573,7 @@ HealBot_Action_TooltipUnit=nil;
HealBot_Ressing = {}; HealBot_Ressing = {};
HealBot_IamRessing = false; HealBot_IamRessing = false;
-- Table Recycling Pool (Puppeteer-inspired) -- Table Recycling Pool
local tablePool = {} local tablePool = {}
function HealBot_GetTable() function HealBot_GetTable()
local t = table.remove(tablePool) local t = table.remove(tablePool)
+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"
+3 -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,
@@ -312,6 +301,9 @@ function HealBot_Options_SetSkins()
HealBot_Options_BarAlphaInHeal:SetValue(HealBot_Config.BarcolaInHeal[HealBot_Config.Current_Skin]); HealBot_Options_BarAlphaInHeal:SetValue(HealBot_Config.BarcolaInHeal[HealBot_Config.Current_Skin]);
HealBot_Options_BarTextureS:SetValue(HealBot_Config.btexture[HealBot_Config.Current_Skin]) HealBot_Options_BarTextureS:SetValue(HealBot_Config.btexture[HealBot_Config.Current_Skin])
HealBot_Options_BarHeightS:SetValue(HealBot_Config.bheight[HealBot_Config.Current_Skin]) HealBot_Options_BarHeightS:SetValue(HealBot_Config.bheight[HealBot_Config.Current_Skin])
HealBot_Options_AbortBarSize:SetValue(HealBot_Config.abortsize[HealBot_Config.Current_Skin])
HealBot_Options_FontHeight:SetValue(HealBot_Config.btextheight[HealBot_Config.Current_Skin])
HealBot_Options_IconSizeS:SetValue(HealBot_Config.biconsize[HealBot_Config.Current_Skin] or 12)
HealBot_Options_BarWidthS:SetValue(HealBot_Config.bwidth[HealBot_Config.Current_Skin]) HealBot_Options_BarWidthS:SetValue(HealBot_Config.bwidth[HealBot_Config.Current_Skin])
HealBot_Options_BarNumColsS:SetValue(HealBot_Config.numcols[HealBot_Config.Current_Skin]) HealBot_Options_BarNumColsS:SetValue(HealBot_Config.numcols[HealBot_Config.Current_Skin])
HealBot_Options_BarMaxRowsS:SetValue((HealBot_Config.bmaxrows and HealBot_Config.bmaxrows[HealBot_Config.Current_Skin]) or 0) HealBot_Options_BarMaxRowsS:SetValue((HealBot_Config.bmaxrows and HealBot_Config.bmaxrows[HealBot_Config.Current_Skin]) or 0)
+5
View File
@@ -44,6 +44,11 @@ function HealBot_Options_FontHeight_OnValueChanged(this)
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue()); getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin() HealBot_Action_ResetSkin()
end end
function HealBot_Options_IconSizeS_OnValueChanged(this)
HealBot_Config.biconsize[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_AbortBarSize_OnValueChanged(this) function HealBot_Options_AbortBarSize_OnValueChanged(this)
HealBot_Config.abortsize[HealBot_Config.Current_Skin] = this:GetValue(); HealBot_Config.abortsize[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue()); getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
+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>
+16
View File
@@ -360,6 +360,22 @@
<OnValueChanged>HealBot_Options_FontHeight_OnValueChanged(this)</OnValueChanged> <OnValueChanged>HealBot_Options_FontHeight_OnValueChanged(this)</OnValueChanged>
</Scripts> </Scripts>
</Slider> </Slider>
<Slider name="HealBot_Options_IconSizeS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Icon size",5,30)</OnLoad>
<OnValueChanged>HealBot_Options_IconSizeS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BorderThicknessS" inherits="HealBot_Options_SliderTemplate"> <Slider name="HealBot_Options_BorderThicknessS" inherits="HealBot_Options_SliderTemplate">
<Size> <Size>
+207 -53
View File
@@ -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
@@ -246,11 +251,14 @@ function HealBot_Action_EnableButton(button)
bar.txt:SetFont(fontName, fontHeight, "") bar.txt:SetFont(fontName, fontHeight, "")
end end
for i = 1, 5 do local iconSize = HealBot_Config.biconsize[HealBot_Config.Current_Skin] or 12
for i = 1, 10 do
local icon = getglobal(button:GetName() .. "BarIcon" .. i) local icon = getglobal(button:GetName() .. "BarIcon" .. i)
if icon then if icon then
if HealBot_UnitIcons and HealBot_UnitIcons[unit] and HealBot_UnitIcons[unit][i] then if HealBot_UnitIcons and HealBot_UnitIcons[unit] and HealBot_UnitIcons[unit][i] then
icon:SetTexture(HealBot_UnitIcons[unit][i]) icon:SetTexture(HealBot_UnitIcons[unit][i])
icon:SetWidth(iconSize)
icon:SetHeight(iconSize)
icon:Show() icon:Show()
else else
icon:Hide() icon:Hide()
@@ -402,6 +410,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,7 +423,11 @@ 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
HealBot_Action_AppendNewUnits()
return
end
local numBars = 0; local numBars = 0;
local numHeaders = 0; local numHeaders = 0;
local TempMaxH = 0; local TempMaxH = 0;
@@ -466,10 +479,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 +605,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 +638,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 +656,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 +696,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,7 +723,6 @@ 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;
@@ -760,8 +732,13 @@ function HealBot_Action_PartyChanged()
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 if ownerIndex then
name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(ownerIndex); name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(ownerIndex);
else
name = UnitName(units[j]) or "not known";
class = UnitClass(units[j]) or "not known";
subgroup = 1;
end end
if string.sub(units[j], 1, 7) == "raidpet" or string.sub(units[j], 1, 8) == "partypet" or units[j] == "pet" then if string.sub(units[j], 1, 7) == "raidpet" or string.sub(units[j], 1, 8) == "partypet" or units[j] == "pet" then
@@ -793,12 +770,47 @@ function HealBot_Action_PartyChanged()
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 +913,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 +967,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 +1016,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
+15 -1
View File
@@ -7,6 +7,9 @@ Original HealBot, while being a staple healing addon in Wrath and later expansio
> **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. > **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.
### Development version
There is dev branch available, it might be slightly more unstabl but most of time it does have more features present. It's only merged into main when major feature set is implemented and stabilised.
### 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.
@@ -46,8 +49,19 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
### Change Log ### Change Log
**v1.6.3**
* **Hotfix string splitter** - added falback for string splitter if the the string is empty or nil.
* **UI Update - Icon Limit** - Increased maximum tracked buffs/debuffs per unit from 5 to 10.
* **UI Update - Customizable icon size** - Added an option to change size of HoT icons (default to 12px).
* **Cleanup** - Removed dead code `HealBot_Groups` table.
**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** **v1.6.1**
* **Hotfix** - With class colours toggled extra frames for player pets were given some classy mint colour. * **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.