mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-09-11 09:50:21 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ad302f299e | |||
| 327cd7a08c | |||
| 2f01ca3f1b | |||
| 45ce2a024f | |||
| 2ab7a93a6e | |||
| 7cf0956a84 | |||
| 6c4297c126 | |||
| 4f7a06ad6f | |||
| 178d1184a3 | |||
| f1b7e3950f | |||
| faf040997e | |||
| 4c9f50770a | |||
| ed11046eda | |||
| d36ad994ea | |||
| a3f3d9e4c6 |
+1
-1
@@ -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
|
||||||
|
|||||||
@@ -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"/>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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
@@ -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];
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
+203
-52
@@ -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,7 +420,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 +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,7 +720,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 +729,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 +767,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 +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
|
||||||
|
|||||||
@@ -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,13 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
|
|||||||
|
|
||||||
### 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**
|
**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.
|
||||||
|
|||||||
Reference in New Issue
Block a user