Yeah, I thought of adding one extra parameter to Spawn function, but I quit doing it as I don't want to modify lua file whenver there's an update :/
Lua Code:
function oUF:Spawn(unit, overrideName, showBlizzard)
argcheck(unit, 2, 'string')
if(not style) then return error('Unable to create frame. No styles have been registered.') end
unit = unit:lower()
local name = overrideName or generateName(unit)
local object = CreateFrame('Button', name, oUF_PetBattleFrameHider, 'SecureUnitButtonTemplate')
Private.UpdateUnits(object, unit)
-- maybe something like this
if not showBlizzard then
self:DisableBlizzard(unit)
end
walkObject(object, unit)
object:SetAttribute('unit', unit)
RegisterUnitWatch(object)
return object
end