mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-10-27 06:00:54 +00:00
Fix: optimize execution performance and memory usage via caching and table reuse
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user