mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-09-11 18:00:20 +00:00
Features implementation - added integration support for UnitXP and nampower, expand Options UI.
This commit is contained in:
+3
-1
@@ -1,6 +1,6 @@
|
|||||||
## Interface: 11200
|
## Interface: 11200
|
||||||
## Title: HealBotBlue
|
## Title: HealBotBlue
|
||||||
## Version: 1.6.3
|
## Version: 1.7.0
|
||||||
## 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
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
..\..\FrameXML\UIDropDownMenu.xml
|
..\..\FrameXML\UIDropDownMenu.xml
|
||||||
HealBot_Error.xml
|
HealBot_Error.xml
|
||||||
HealBot_Model.lua
|
HealBot_Model.lua
|
||||||
|
HealBot_Integrations.lua
|
||||||
HealBot_Controller_Range.lua
|
HealBot_Controller_Range.lua
|
||||||
HealBot_Controller_Comms.lua
|
HealBot_Controller_Comms.lua
|
||||||
HealBot_Controller_Aura.lua
|
HealBot_Controller_Aura.lua
|
||||||
@@ -28,3 +29,4 @@ HealBot_Options_Skins.xml
|
|||||||
HealBot_Options_Buffs.xml
|
HealBot_Options_Buffs.xml
|
||||||
HealBot_Options_Chat.xml
|
HealBot_Options_Chat.xml
|
||||||
HealBot_Options_Auto.xml
|
HealBot_Options_Auto.xml
|
||||||
|
HealBot_Options_Integrations.xml
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function HealBot_CheckShamanWeaponBuff(spellName)
|
|||||||
if not firstWord then return false end
|
if not firstWord then return false end
|
||||||
|
|
||||||
HealBot_ScanTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
HealBot_ScanTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||||
local slots = {}
|
local slots = HealBot_GetTable()
|
||||||
if hasMainHandEnchant then table.insert(slots, 16) end
|
if hasMainHandEnchant then table.insert(slots, 16) end
|
||||||
if hasOffHandEnchant then table.insert(slots, 17) end
|
if hasOffHandEnchant then table.insert(slots, 17) end
|
||||||
|
|
||||||
@@ -52,6 +52,7 @@ function HealBot_CheckShamanWeaponBuff(spellName)
|
|||||||
local text = textObj:GetText()
|
local text = textObj:GetText()
|
||||||
if text and string.find(text, firstWord) then
|
if text and string.find(text, firstWord) then
|
||||||
HealBot_ScanTooltip:Hide()
|
HealBot_ScanTooltip:Hide()
|
||||||
|
HealBot_ReleaseTable(slots)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -59,6 +60,7 @@ function HealBot_CheckShamanWeaponBuff(spellName)
|
|||||||
end
|
end
|
||||||
|
|
||||||
HealBot_ScanTooltip:Hide()
|
HealBot_ScanTooltip:Hide()
|
||||||
|
HealBot_ReleaseTable(slots)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -165,6 +167,7 @@ function HealBot_OnEvent_UnitAura(this, unit)
|
|||||||
end
|
end
|
||||||
local iconCount = 0
|
local iconCount = 0
|
||||||
local i = 1;
|
local i = 1;
|
||||||
|
HealBot_UnitDebuff[unit] = nil;
|
||||||
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
|
||||||
@@ -172,7 +175,7 @@ function HealBot_OnEvent_UnitAura(this, unit)
|
|||||||
iconCount = iconCount + 1
|
iconCount = iconCount + 1
|
||||||
HealBot_UnitIcons[unit][iconCount] = debuff
|
HealBot_UnitIcons[unit][iconCount] = debuff
|
||||||
end
|
end
|
||||||
if HealBot_CDCInc[UnitClass(unit)] == 1 and HealBot_DebuffWatch[debuff_type] then
|
if HealBot_CDCInc[UnitClass(unit)] == 1 and debuff_type and HealBot_DebuffWatch[debuff_type] then
|
||||||
HealBot_UnitDebuff[unit] = debuff_type
|
HealBot_UnitDebuff[unit] = debuff_type
|
||||||
DebuffType = debuff_type;
|
DebuffType = debuff_type;
|
||||||
if HealBot_DebuffPriority[debuff_type] then
|
if HealBot_DebuffPriority[debuff_type] then
|
||||||
@@ -181,7 +184,6 @@ function HealBot_OnEvent_UnitAura(this, unit)
|
|||||||
end
|
end
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
else
|
else
|
||||||
if i == 1 then HealBot_UnitDebuff[unit] = nil; end
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ local HealBot_EventHandlers = {
|
|||||||
end,
|
end,
|
||||||
["VARIABLES_LOADED"] = function(this)
|
["VARIABLES_LOADED"] = function(this)
|
||||||
HealBot_OnEvent_VariablesLoaded(this)
|
HealBot_OnEvent_VariablesLoaded(this)
|
||||||
|
HealBot_Integrations_Toggle()
|
||||||
end,
|
end,
|
||||||
-- Legacy pass-throughs
|
-- Legacy pass-throughs
|
||||||
["CHAT_MSG_ADDON"] = function(this, arg1, arg2, arg3, arg4) HealBot_OnEvent_AddonMsg(this, arg1, arg2, arg3, arg4) end,
|
["CHAT_MSG_ADDON"] = function(this, arg1, arg2, arg3, arg4) HealBot_OnEvent_AddonMsg(this, arg1, arg2, arg3, arg4) end,
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ function HealBot_Range_Check(unit, range)
|
|||||||
end
|
end
|
||||||
if ( unit == "player" ) then
|
if ( unit == "player" ) then
|
||||||
return_val = 1;
|
return_val = 1;
|
||||||
|
elseif HealBot_Integrations_UnitXP_Active then
|
||||||
|
local dist = UnitXP("distanceBetween", "player", unit, "Gaussian")
|
||||||
|
if dist and dist <= range then
|
||||||
|
return_val = 1;
|
||||||
|
end
|
||||||
elseif ( UnitIsVisible(unit) == 1 ) then
|
elseif ( UnitIsVisible(unit) == 1 ) then
|
||||||
local tx, ty = GetPlayerMapPosition(unit)
|
local tx, ty = GetPlayerMapPosition(unit)
|
||||||
local dist
|
local dist
|
||||||
|
|||||||
@@ -255,6 +255,8 @@ HealBot_ConfigDefaults = {
|
|||||||
Tooltip_Recommend = 1,
|
Tooltip_Recommend = 1,
|
||||||
TooltipPos = 1,
|
TooltipPos = 1,
|
||||||
HideParty = 0,
|
HideParty = 0,
|
||||||
|
HealBot_Integrations_UnitXP = 0,
|
||||||
|
HealBot_Integrations_Nampower = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
HealBot_Config = {};
|
HealBot_Config = {};
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
HealBot_Integrations_UnitXP_Active = false;
|
||||||
|
HealBot_Integrations_Nampower_Active = false;
|
||||||
|
|
||||||
|
function HealBot_Integrations_Toggle()
|
||||||
|
-- UnitXP
|
||||||
|
if HealBot_Config.HealBot_Integrations_UnitXP == 1 and UnitXP ~= nil then
|
||||||
|
HealBot_Integrations_UnitXP_Active = true;
|
||||||
|
HealBot_AddDebug("UnitXP Integration: ENABLED");
|
||||||
|
else
|
||||||
|
HealBot_Integrations_UnitXP_Active = false;
|
||||||
|
HealBot_AddDebug("UnitXP Integration: DISABLED");
|
||||||
|
end
|
||||||
|
|
||||||
|
-- nampower
|
||||||
|
if HealBot_Config.HealBot_Integrations_Nampower == 1 then
|
||||||
|
HealBot_Integrations_Nampower_Active = true;
|
||||||
|
HealBot_AddDebug("nampower Integration: ENABLED");
|
||||||
|
-- Add Nampower specific initialization here later
|
||||||
|
else
|
||||||
|
HealBot_Integrations_Nampower_Active = false;
|
||||||
|
HealBot_AddDebug("nampower Integration: DISABLED");
|
||||||
|
end
|
||||||
|
end
|
||||||
+1
-1
@@ -223,7 +223,7 @@ function HealBot_Options_OnLoad(this)
|
|||||||
table.insert(UISpecialFrames,this:GetName());
|
table.insert(UISpecialFrames,this:GetName());
|
||||||
|
|
||||||
-- Tabs
|
-- Tabs
|
||||||
PanelTemplates_SetNumTabs(this,8);
|
PanelTemplates_SetNumTabs(this,9);
|
||||||
this.selectedTab = 1;
|
this.selectedTab = 1;
|
||||||
PanelTemplates_UpdateTabs(this);
|
PanelTemplates_UpdateTabs(this);
|
||||||
HealBot_Options_ShowPanel(this.selectedTab);
|
HealBot_Options_ShowPanel(this.selectedTab);
|
||||||
|
|||||||
+11
-2
@@ -94,7 +94,7 @@
|
|||||||
<Frame name="HealBot_Options" toplevel="true" frameStrata="DIALOG"
|
<Frame name="HealBot_Options" toplevel="true" frameStrata="DIALOG"
|
||||||
movable="true" parent="UIParent" enableMouse="true" hidden="true">
|
movable="true" parent="UIParent" enableMouse="true" hidden="true">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="480" y="455"/>
|
<AbsDimension x="540" y="455"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="CENTER">
|
<Anchor point="CENTER">
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
<Texture name="HealBot_Options_Header"
|
<Texture name="HealBot_Options_Header"
|
||||||
file="Interface\DialogFrame\UI-DialogBox-Header">
|
file="Interface\DialogFrame\UI-DialogBox-Header">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="400" y="64"/>
|
<AbsDimension x="450" y="64"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOP">
|
<Anchor point="TOP">
|
||||||
@@ -215,6 +215,15 @@
|
|||||||
</Anchor>
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button name="HealBot_OptionsTab9" inherits="HealBot_Options_Tab" id="9" text="Extras">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="LEFT" relativeTo="HealBot_OptionsTab8" relativePoint="RIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-14" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
|
||||||
</Frames>
|
</Frames>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ function HealBot_Options_SetBuffs()
|
|||||||
HealBot_UIDropDownMenu_SetSelectedID(dropDown, val + 1)
|
HealBot_UIDropDownMenu_SetSelectedID(dropDown, val + 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local selfCheck = getglobal("HealBot_Options_BuffSelf" .. i)
|
local selfCheck = getglobal("HealBot_Options_Buff" .. i .. "Self")
|
||||||
if selfCheck then
|
if selfCheck then
|
||||||
if HealBot_Config.BuffWatchSelf and HealBot_Config.BuffWatchSelf[i] then
|
if HealBot_Config.BuffWatchSelf and HealBot_Config.BuffWatchSelf[i] then
|
||||||
local isSelf = (HealBot_Config.BuffWatchSelf[i] == 1)
|
local isSelf = (HealBot_Config.BuffWatchSelf[i] == 1)
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
function HealBot_Options_Integrations_OnShow(this)
|
||||||
|
HealBot_Options_Integrations_UnitXP:SetChecked(HealBot_Config.HealBot_Integrations_UnitXP);
|
||||||
|
HealBot_Options_Integrations_Nampower:SetChecked(HealBot_Config.HealBot_Integrations_Nampower);
|
||||||
|
end
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
|
||||||
|
<Script file="HealBot_Options_Integrations.lua" />
|
||||||
|
<Frame name="HealBot_Options_Panel9" hidden="true" parent="HealBot_Options" setAllPoints="true">
|
||||||
|
<Frames>
|
||||||
|
<CheckButton name="HealBot_Options_Integrations_UnitXP" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="31" y="-40"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
getglobal(this:GetName().."Text"):SetText("Enable UnitXP_SP3 Integration (Distance/LoS)");
|
||||||
|
</OnLoad>
|
||||||
|
<OnClick>
|
||||||
|
HealBot_Config.HealBot_Integrations_UnitXP = this:GetChecked() and 1 or 0;
|
||||||
|
HealBot_Integrations_Toggle();
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="HealBot_Options_Integrations_Nampower" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Integrations_UnitXP" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="5"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
getglobal(this:GetName().."Text"):SetText("Enable nampower Integration (Buffs/Heals)");
|
||||||
|
</OnLoad>
|
||||||
|
<OnClick>
|
||||||
|
HealBot_Config.HealBot_Integrations_Nampower = this:GetChecked() and 1 or 0;
|
||||||
|
HealBot_Integrations_Toggle();
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
</Frames>
|
||||||
|
<Scripts>
|
||||||
|
<OnShow>
|
||||||
|
HealBot_Options_Integrations_OnShow(this);
|
||||||
|
</OnShow>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
</Ui>
|
||||||
@@ -27,11 +27,7 @@ end
|
|||||||
|
|
||||||
function HealBot_HealthColor(unit, hlth, maxhlth)
|
function HealBot_HealthColor(unit, hlth, maxhlth)
|
||||||
if HealBot_UnitDebuff[unit] then
|
if HealBot_UnitDebuff[unit] then
|
||||||
local debuff, tmp, debuff_type = UnitDebuff(unit, 1, 1)
|
local debuff_type = HealBot_UnitDebuff[unit]
|
||||||
if not debuff then
|
|
||||||
HealBot_UnitDebuff[unit] = nil;
|
|
||||||
HealBot_UnitDebuff[unit .. "_debuff_texture"] = nil
|
|
||||||
else
|
|
||||||
local dr = HealBot_Config.CDCBarColour[debuff_type].R
|
local dr = HealBot_Config.CDCBarColour[debuff_type].R
|
||||||
local dg = HealBot_Config.CDCBarColour[debuff_type].G
|
local dg = HealBot_Config.CDCBarColour[debuff_type].G
|
||||||
local db = HealBot_Config.CDCBarColour[debuff_type].B
|
local db = HealBot_Config.CDCBarColour[debuff_type].B
|
||||||
@@ -45,7 +41,6 @@ function HealBot_HealthColor(unit, hlth, maxhlth)
|
|||||||
end
|
end
|
||||||
return dr, dg, db, HealBot_Config.Barcola[HealBot_Config.Current_Skin];
|
return dr, dg, db, HealBot_Config.Barcola[HealBot_Config.Current_Skin];
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
local text = UnitName(unit);
|
local text = UnitName(unit);
|
||||||
if not HealBot_HealsIn[text] then
|
if not HealBot_HealsIn[text] then
|
||||||
@@ -431,7 +426,7 @@ function HealBot_Action_PartyChanged()
|
|||||||
local numBars = 0;
|
local numBars = 0;
|
||||||
local numHeaders = 0;
|
local numHeaders = 0;
|
||||||
local TempMaxH = 0;
|
local TempMaxH = 0;
|
||||||
local HeaderPos = {};
|
local HeaderPos = HealBot_GetTable();
|
||||||
|
|
||||||
if HealBot_Config.AutoSwap_Enabled == 1 then
|
if HealBot_Config.AutoSwap_Enabled == 1 then
|
||||||
local totalMembers = GetNumRaidMembers()
|
local totalMembers = GetNumRaidMembers()
|
||||||
@@ -598,8 +593,8 @@ function HealBot_Action_PartyChanged()
|
|||||||
last = last + 40
|
last = last + 40
|
||||||
local ExtraValid = numBars;
|
local ExtraValid = numBars;
|
||||||
if HealBot_Config.EmergencyHeals == 1 then
|
if HealBot_Config.EmergencyHeals == 1 then
|
||||||
local order = {};
|
local order = HealBot_GetTable();
|
||||||
local units = {};
|
local units = HealBot_GetTable();
|
||||||
if HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 and HealBot_Config.ExtraOrder == 1 then
|
if HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 and HealBot_Config.ExtraOrder == 1 then
|
||||||
HeaderPos[i + 1] = HEALBOT_OPTIONS_EMERGENCYHEALS
|
HeaderPos[i + 1] = HEALBOT_OPTIONS_EMERGENCYHEALS
|
||||||
numBars = numBars + 1;
|
numBars = numBars + 1;
|
||||||
@@ -804,6 +799,8 @@ function HealBot_Action_PartyChanged()
|
|||||||
if i == last then break end
|
if i == last then break end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
HealBot_ReleaseTable(order);
|
||||||
|
HealBot_ReleaseTable(units);
|
||||||
end
|
end
|
||||||
if numBars == PetsValid + 1 and HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then
|
if numBars == PetsValid + 1 and HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then
|
||||||
HeaderPos[PetsValid + 1] = nil;
|
HeaderPos[PetsValid + 1] = nil;
|
||||||
@@ -968,6 +965,7 @@ function HealBot_Action_PartyChanged()
|
|||||||
HidePartyFrame();
|
HidePartyFrame();
|
||||||
end
|
end
|
||||||
HealBot_Action_RefreshButtons();
|
HealBot_Action_RefreshButtons();
|
||||||
|
HealBot_ReleaseTable(HeaderPos);
|
||||||
HealBot_Action_ShowFrame();
|
HealBot_Action_ShowFrame();
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,16 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
|
|||||||
|
|
||||||
### Change Log
|
### Change Log
|
||||||
|
|
||||||
|
**v1.7.0**
|
||||||
|
* **External Addon Integrations** - Added a new 'Extras' tab in Options to optionally enable integrations with `UnitXP_SP3` (for ultra-precise 3D range and Line of Sight checks) and `nampower` (for accurate real-time heal/buff tracking).
|
||||||
|
* **UI Layout** - Widened the Options UI and neatly centered elements to accommodate the new integrations tab.
|
||||||
|
|
||||||
**v1.6.3**
|
**v1.6.3**
|
||||||
* **Hotfix string splitter** - added falback for string splitter if the the string is empty or nil.
|
* **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 - 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).
|
* **UI Update - Customizable icon size** - Added an option to change size of HoT icons (default to 12px).
|
||||||
* **Cleanup** - Removed dead code `HealBot_Groups` table.
|
* **Cleanup** - Removed dead code `HealBot_Groups` table.
|
||||||
|
* **Bug Fix - Buff Watch Self** - Fixed an issue where the "Self Only" toggle for watched buffs failed to load visually across sessions.
|
||||||
|
|
||||||
**v1.6.2**
|
**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.
|
* **Hotfix - raid and party frames** - if getNumRaidMembers() > 0 wrapper around extra bars stopped from displaying all frames blocked from displaying Extras\Raid.
|
||||||
|
|||||||
Reference in New Issue
Block a user