Quantcast
WoWInterface - View Single Post - Default Blizz frames
View Single Post
09-14-19, 02:54 AM   #1
glupikreten
An Aku'mai Servant
Join Date: Apr 2009
Posts: 37
Default Blizz frames

Hi,

1.
Im trying to do some basic modifications to some default blizz frames... and while some of the frames i have no problem with for some others im getting error that frames are not found.

For example if i would want to change scale of CharacterFrame it would work to do just :SetScale(X).. but that will not work for TalentFrame, MacroFrame, CraftFrame etc... because those frames are apparenty not existant.

Now i am noob at this... i just want to modify frames a bit to fit them into my UI.

2.
Is there easy way to remove default border (red, green, blue... ) from targets buffs/debuffs?

3.
Id like to be able to see in my buffs/debuffs the source of that buff... is that possible in classic? i have this script that worked perfectly before... for the love of god i dont remember in what version of wow tho

Code:
local _, config = ...

if not config.auraSource then return end

local function addAuraSource(self, func, unit, index, filter)
    local srcUnit = select(8, func(unit, index, filter))
    if srcUnit then
        self:AddLine(' ')

        local src = GetUnitName(srcUnit, true)
        if srcUnit == 'pet' or srcUnit == 'vehicle' then
            local color = RAID_CLASS_COLORS[select(2, UnitClass('player'))]
            src = format('%s (|cff%02x%02x%02x%s|r)', src, color.r*255, color.g*255, color.b*255, GetUnitName('player', true))
        else
            local partypet = srcUnit:match('^partypet(%d+)$')
            local raidpet = srcUnit:match('^raidpet(%d+)$')
            if partypet then
                src = format('%s (%s)', src, GetUnitName('party'..partypet, true))
            elseif raidpet then
                src = format('%s (%s)', src, GetUnitName('raid'..raidpet, true))
            end
        end

        if (UnitIsPlayer(srcUnit)) then
            local color = RAID_CLASS_COLORS[select(2, UnitClass(srcUnit))]
            if (color) then
                src = format('|cff%02x%02x%02x%s|r', color.r*255, color.g*255, color.b*255, src)
            end
        end

        self:AddLine(src)
        self:Show()
    end
end


local funcs = {
    SetUnitAura = UnitAura,
    SetUnitBuff = UnitBuff,
    SetUnitDebuff = UnitDebuff,
}

for k, v in pairs(funcs) do
    hooksecurefunc(GameTooltip, k, function(self, unit, index, filter)
        addAuraSource(self, v, unit, index, filter)
    end)
end
  Reply With Quote