Fix: optimize execution performance and memory usage via caching and table reuse

This commit is contained in:
Bluewhale1337
2026-09-16 10:24:33 +02:00
parent 7f4d4be827
commit 55bc6f1ea0
5 changed files with 45 additions and 19 deletions
+4 -2
View File
@@ -857,8 +857,10 @@ function HealBot_Action_PartyChanged()
if i == last then break end
end
else
local petUnits = { "pet", "partypet1", "partypet2", "partypet3", "partypet4" };
for _, unit in ipairs(petUnits) do
if not HealBot_PetUnits then
HealBot_PetUnits = { "pet", "partypet1", "partypet2", "partypet3", "partypet4" };
end
for _, unit in ipairs(HealBot_PetUnits) do
if not HealBot_Action_UnitButtons[unit] and HealBot_MayHeal(unit) then
i = i + 1;
HealBot_Action_SetHealButton(i, unit);