Quote:
timerFrame:SetScript("OnUpdate", function()
if next(guids_to_update) then
for frame in PitBull4:IterateFrames() do
if guids_to_update[frame.guid] then
PitBull4_HealthBar:Update(frame)
end
end
wipe(guids_to_update)
end
--[[ Currently the WoW Client isn't actually doing fast updates for health.
-- It's unclear if this is a bug or a change in feature. Disabling the
-- code to support this for now since it's a waste of CPU time for no benefit.
for frame in PitBull4:IterateFramesForGUIDs(PLAYER_GUID, UnitGUID("pet")) do
if not frame.is_wacky then
PitBull4_HealthBar:Update(frame)
end
end
--]]
end)
Quote:
function refreshHealthBar_OnEvent()
for frame in PitBull4:IterateFrames() do
if not frame.is_wacky then
PitBull4_HealthBar:Update(frame)
end
end
wipe(guids_to_update)
end
local Healthbar_refresh_frame = CreateFrame("Frame","refreshHealthBar",UIParent)
Healthbar_refresh_frame:SetScript("OnEvent", refreshHealthBar_OnEvent)
Healthbar_refresh_frame:RegisterEvent("COMBAT_LOG_ EVENT_UNFILTERED")