fix: replace Lua 5.1 length operators with table.getn for Vanilla 1.12 compatibility and bump version to 1.7.7

This commit is contained in:
Bluewhale1337
2026-11-08 23:34:39 +01:00
parent 18eff88f7b
commit d89cf5b1c3
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
## Interface: 11200
## Title: HealBotBlue
## Version: 1.7.6
## Version: 1.7.7
## Author: Bluewhale
## Notes: Raidframe replacement for healing, decursing, resource tracking and buffing with optional support for SuperWow, ClassicAPI, UnitXP_SP3 and Nampower.
## SavedVariablesPerCharacter: HealBot_Config
+3 -3
View File
@@ -667,8 +667,8 @@ function HealBot_Action_PartyChanged()
local unit = "Test" .. j
HealBot_Action_SetHealButton(i, unit)
if not HealBot_Model.units[unit] then
local rClass = testClasses[math.random(1, #testClasses)]
local rName = testNames[math.random(1, #testNames)] .. j
local rClass = testClasses[math.random(1, table.getn(testClasses))]
local rName = testNames[math.random(1, table.getn(testNames))] .. j
local mHealth = math.random(4000, 8000)
local cHealth = math.random(1, mHealth)
local pt = 0
@@ -684,7 +684,7 @@ function HealBot_Action_PartyChanged()
"Interface\\Icons\\Spell_Holy_Excorcism" -- Fear Ward
}
-- Shuffle icons
for k = #testIcons, 2, -1 do
for k = table.getn(testIcons), 2, -1 do
local j = math.random(k)
testIcons[k], testIcons[j] = testIcons[j], testIcons[k]
end
+3
View File
@@ -50,6 +50,9 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
### Change Log
**v1.7.7**
* **Bug Fix - Lua 5.0 Compatibility (Test Bars):** Replaced Lua 5.1 `#` length operators with `table.getn` in test bar generator, resolving `unexpected symbol near '#'` in `HealBot_View_Layout.lua` and resulting `attempt to call global 'HealBot_Action_ResetSkin' (a nil value)` startup crash on Vanilla 1.12.
**v1.7.6**
* **Feature - All-Class Support & Raid Frame Replacement:** Removed legacy restriction that disabled HealBot event listeners and UI frames for classes without native healing spells. HealBot now initializes and functions as a full party/raid frame replacement for all classes (Warrior, Mage, Rogue, Hunter, Warlock).
* **Targeting & Binding Defaults:** Added default `Left` click `"Target"` binding for non-healer classes, recognized `"target"` in spell resolution, and prevented non-healer buttons from disabling on full-health allies.