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
+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