Приветствуем вас на форуме проекта WoW Circle. Если вы читаете это, значит не зарегистрировались у нас. Для того, чтобы получить доступ к расширенным возможностям нашего форума нажмите сюда и пройди регистрацию, которая не займет у вас много времени. После регистрации будут доступны новые, более расширенные, возможности.
Buff Frames

Упомянутые в теме пользователи:

Показано с 1 по 2 из 2

Тема: Buff Frames

  1. #1
    Новичок
    Регистрация
    12.09.2014
    Сообщений
    13
    Поблагодарил(а)
    1
    Получено благодарностей: 0 (сообщений: 0).
    Репутация: 0

    Lightbulb Buff Frames

    Ребят, есть аддон для баф фреймов, но он мне не очень нравится. Я бы хотел опустить таймер под иконку, и сделать границы толще.
    Как я могу это сделать ? Кто шарит в коде ?)
    Снимок.PNG
    Исходный код прилагаю:

    code

    PHP код:
    buttonsize 28         -- Buff Size
    spacing 
    4             -- Buff Spacing
    buffsperrow 
    12        -- Buffs Per Row
    growthvertical 
    1      -- Growth Directiondownup
    growthhorizontal 
    1    -- Growth Directionleftright
    font 
    "Fonts\\ARIALN.ttf"

    -- Default Spawn Positions
    local positions 
    = {
        [
    1]  =  { "TOPRIGHT",   UIParent,   0,    = -10  },  -- Buff Anchor
        
    [2]  =  { "TOPRIGHT",   UIParent,   0,    = -60  },  -- Debuff Anchor
        
    [3]  =  { "TOPRIGHT",   UIParent,   0,    = -110  },  -- Enchant Anchor
    }
    --
    End Config

    local 
    function anchor(framergbposanchorxy)
        
    frame:SetBackdrop({bgFile 'Interface\\Buttons\\WHITE8x8'})
        
    frame:SetBackdropColor(rgb0.4)
        
    frame:SetHeight(buttonsize+20)
        
    frame:SetWidth(buttonsize+20)
        
    frame:SetPoint(posanchorposxy)
        
    frame:EnableMouse(true)
        
    frame:SetMovable(true)
        
    frame:SetUserPlaced(true)
        
    frame:SetFrameStrata("BACKGROUND")
        
    frame:SetClampedToScreen(true)
        
    frame:SetAlpha(0)
    end

    local 
    function MoveFunc(frame)
        if 
    movebars==1 then
            frame
    :SetAlpha(1)
            
    frame:RegisterForDrag("LeftButton","RightButton")
            
    frame:SetScript("OnDragStart", function(selfself:StartMoving() end)
            
    frame:SetScript("OnDragStop", function(selfself:StopMovingOrSizing() end)
            
    frame:SetFrameStrata("DIALOG")
        elseif 
    movebars==0 then
            frame
    :SetAlpha(0)
            
    frame:SetScript("OnDragStart", function(selfself:StopMovingOrSizing() end)
            
    frame:SetScript("OnDragStop", function(selfself:StopMovingOrSizing() end)
            
    frame:SetFrameStrata("BACKGROUND")
        
    end
    end

    local buffholder 
    CreateFrame("Frame""Buffs"UIParent)
    anchor(buffholder010positions[1].ppositions[1].apositions[1].xpositions[1].y)
    local debuffholder CreateFrame("Frame""Debuffs"UIParent)
    anchor(debuffholder100positions[2].ppositions[2].apositions[2].xpositions[2].y)
    local enchantholder CreateFrame("Frame""TempEnchants"UIParent)
    anchor(enchantholder001positions[3].ppositions[3].apositions[3].xpositions[3].y)

    SlashCmdList["MOVEBUFFS"] = function()
        if 
    movebars~=1 then movebars 1
        
    else movebars 0 end
        MoveFunc
    (buffholder)
        
    MoveFunc(debuffholder)
        
    MoveFunc(enchantholder)
    end
    SLASH_MOVEBUFFS1 
    "/movebuffs"

    local function makeitgrow(buttonindexanchor)
        for 
    1BUFF_ACTUAL_DISPLAY do 
            if 
    growthvertical == 1 then
                
    if growthhorizontal == 1 then
                    
    if index == ((buffsperrow*i)+1then _G[button..index]:SetPoint("TOPRIGHT"anchor"TOPRIGHT"0, -(buttonsize+spacing+4)*iend
                
    else
                    if 
    index == ((buffsperrow*i)+1then _G[button..index]:SetPoint("TOPLEFT"anchor"TOPLEFT"0, -(buttonsize+spacing+4)*iend
                end
            
    else
                if 
    growthhorizontal == 1 then
                    
    if index == ((buffsperrow*i)+1then _G[button..index]:SetPoint("TOPRIGHT"anchor"TOPRIGHT"0, (buttonsize+spacing+4)*iend
                
    else
                    if 
    index == ((buffsperrow*i)+1then _G[button..index]:SetPoint("TOPLEFT"anchor"TOPLEFT"0, (buttonsize+spacing+4)*iend
                end
            end
        end
        
    if growthhorizontal == 1 then
            _G
    [button..index]:SetPoint("RIGHT"_G[button..(index-1)], "LEFT", -(spacing+4), 0)
        else
            
    _G[button..index]:SetPoint("LEFT"_G[button..(index-1)], "RIGHT", (spacing+4), 0)
        
    end
    end

    local 
    function StyleBuffs(buttonindexframekindanchor)
        
    local buff button..index
        _G
    [buff.."Icon"]:SetTexCoord(.1.9.1.9)
        
    _G[buff.."Icon"]:SetDrawLayer("OVERLAY")
        
    _G[buff]:ClearAllPoints()
        
    _G[buff]:SetHeight(buttonsize)
        
    _G[buff]:SetWidth(buttonsize)
        
    _G[buff]:SetBackdrop({bgFile "Interface\\Buttons\\WHITE8x8"insets = { left = -2right = -2top = -2bottom = -2}})
        
        if 
    framekind == 2 then _G[buff]:SetBackdropColor(.7,0,0,1)
        elseif 
    framekind == 3 then _G[buff]:SetBackdropColor(0,0,.5,1)
        else 
    _G[buff]:SetBackdropColor(0,0,0,1end
        
        _G
    [buff.."Count"]:SetFont(font11"OUTLINE")
        
    _G[buff.."Duration"]:SetFont(font11"OUTLINE")
        
        
    _G[buff.."Count"]:ClearAllPoints()
        
    _G[buff.."Count"]:SetPoint("TOPRIGHT"20)
        
    _G[buff.."Count"]:SetDrawLayer("OVERLAY")
        
        
    _G[buff.."Duration"]:ClearAllPoints()
        
    _G[buff.."Duration"]:SetPoint("BOTTOM")
        
    _G[buff.."Duration"]:SetDrawLayer("OVERLAY")
        if 
    _G[buff.."Border"then _G[buff.."Border"]:Hide() end
        
        
    if index == 1 then _G[buff]:SetPoint("TOPRIGHT"anchor"TOPRIGHT", -10, -10end
        
    if index ~= 1 then makeitgrow(buttonindex_G[button..1]) end
    end

    local 
    function UpdateBuff()
        for 
    1BUFF_ACTUAL_DISPLAY do
            
    StyleBuffs("BuffButton"i1buffholder)
        
    end
        
    for 1BuffFrame.numEnchants do
            
    StyleBuffs("TempEnchant"i3enchantholder)
        
    end
    end
    local 
    function UpdateDebuff(buttonNameindex)
        
    StyleBuffs(buttonNameindex2debuffholder)
    end

    local 
    function updateTime(buttontimeLeft)
        
    local duration _G[button:GetName().."Duration"]
        if 
    SHOW_BUFF_DURATIONS == "1" and timeLeft then
            duration
    :SetTextColor(111)
            
    local dhmChatFrame_TimeBreakDown(timeLeft);
            if 
    0 then
                duration
    :SetFormattedText("%1dd"d)
            elseif 
    0 then
                duration
    :SetFormattedText("%1dh"h)
            elseif 
    0 then
                duration
    :SetFormattedText("%1dm"m)
            else
                
    duration:SetFormattedText("%1d"s)
            
    end
        end
    end

    hooksecurefunc
    ("BuffFrame_UpdateAllBuffAnchors"UpdateBuff)
    hooksecurefunc("DebuffButton_UpdateAnchors"UpdateDebuff)
    hooksecurefunc("AuraButton_UpdateDuration"updateTime)
    SetCVar("consolidateBuffs"0
    [свернуть]


    ps. я бы рад оставить Aura Frames, но с ним какая-то фигня приключилась, вместо черных рамок, белые
    Снимок.jpg
    после перезапуска игры все белые стали sad111
    Последний раз редактировалось carevitch; 10.01.2016 в 11:35.

  2. #2
    Старожил Аватар для Wbtest2
    Регистрация
    21.02.2015
    Адрес
    Minsk
    Сообщений
    183
    Поблагодарил(а)
    46
    Получено благодарностей: 115 (сообщений: 60).
    Репутация: 115
    Цитата Сообщение от carevitch Посмотреть сообщение
    Я бы хотел опустить таймер под иконку
    PHP код:
    _G[buff.."Duration"]:SetPoint("BOTTOM"
    на
    PHP код:
    _G[buff.."Duration"]:SetPoint("BOTTOM"0, -15

Похожие темы

  1. Buff слит...
    от Лавкос в разделе Корзина
    Ответов: 8
    Последнее сообщение: 05.12.2014, 02:34
  2. [Гайд] Satrina Buff Frames
    от Шахтар в разделе Корзина
    Ответов: 23
    Последнее сообщение: 28.04.2012, 01:46
  3. Замена Satrina Buff Frames
    от Шахтар в разделе Корзина
    Ответов: 2
    Последнее сообщение: 08.04.2012, 18:16
  4. Вопрос по Satrina Buff Frames
    от m0ujp3k в разделе Корзина
    Ответов: 0
    Последнее сообщение: 31.01.2012, 09:34

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •