Цитата Сообщение от nicodemus Посмотреть сообщение
Зороастр, -тогда снова тот же вопрос-как протестить латников на 1.5 сек гкд?И у всех тряпок гкд до 1 сек снижается хастой(ниже же нельзя) а вот как дела у хантов/энхов?У них тоже гкд 1.5 сек?И главный вопрос-есть ли эта задержка в полторы сек на циркле?
Ей богу запарили с варами ... пишешь хук на гкд фрейму и идешь бить маникен.

Кароче вопрос закрыт. Пару минут ютуб обрабатывает ...



- - - Updated - - -

Цитата Сообщение от Зороастр Посмотреть сообщение
Ну блин, даже я достаточно далек от написания консольных команд в игре. Если есть готовая - просто скинь ссюда.
Как то так:

Потом парсишь все кнопки на панеле и цепляешь к ихним кд фреймам UI:RegisterCooldown(cdframe)

PHP код:
local MIN_SCALE 0.5
local ICON_SIZE 
36 
local FONT_SIZE 
20 
local MIN_SCALE 
0.5
local MIN_DURATION 
.1 --минимальное время для вывод таймера
local UI 
CreateFrame("frame")
local floor math.floor
local min 
math.min
local GetTime 
GetTime

local TimeColors 
= {
    [
0] = '|cfffefefe',
    [
1] = '|cfffefefe',
    [
2] = '|cfffefefe',
    [
3] = '|cfffefefe',
    [
4] = '|cfffe0000',
}

UI.TimeFormats = {
    [
0] = { '%dd''%dd' },
    [
1] = { '%dh''%dh' },
    [
2] = { '%dm''%dm' },
    [
3] = { '%ds''%d' },
    [
4] = { '%.1fs''%.1f' },
}

local function Cooldown_OnUpdate(cdelapsed)
    if 
cd.nextUpdate 0 then
        cd
.nextUpdate cd.nextUpdate elapsed
        
return
    
end

    local remain 
cd.duration - (GetTime() - cd.start)

    if 
remain 0.05 then
        
if (cd.fontScale cd:GetEffectiveScale() / UIParent:GetScale()) < MIN_SCALE then
            cd
.text:SetText('')
            
cd.nextUpdate 500
        
else
            
local timervalueformatid
            timervalue
formatidcd.nextUpdate UI:GetTimeInfo(remain2)        
            
cd.text:SetFormattedText(("%s%s|r"):format(TimeColors[formatid], UI.TimeFormats[formatid][2]), timervalue)
        
end
    
else
        
UI:Cooldown_StopTimer(cd)
    
end
end

function UI:Cooldown_OnSizeChanged(cdwidthheight)
    
local fontScale UIParent:GetScale()
    
local override cd:GetParent():GetParent().SizeOverride
    
if override then 
        fontScale 
override FONT_SIZE
    end
    
    
if fontScale == cd.fontScale then
        
return
    
end

    cd
.fontScale fontScale
    
if fontScale MIN_SCALE and not override then
        cd
:Hide()
    else
        
cd:Show()
        
cd.text:FontTemplate(nilfontScale FONT_SIZE'OUTLINE')
        if 
cd.enabled then
            self
:Cooldown_ForceUpdate(cd)
        
end
    end
end

function UI:Cooldown_ForceUpdate(cd)
    
cd.nextUpdate 0
    cd
:Show()
end

function UI:Cooldown_StopTimer(cd)
    
cd.enabled nil
    cd
:Hide()
end

function UI:CreateCooldownTimer(parent)
    
local scaler CreateFrame('Frame'nilparent)
    
scaler:SetAllPoints()

    
local timer CreateFrame('Frame'nilscaler); timer:Hide()
    
timer:SetAllPoints()
    
timer:SetScript('OnUpdate'Cooldown_OnUpdate)

    
local text timer:CreateFontString(nil'OVERLAY'"ChatFontNormal")
    
text:SetPoint('CENTER'11)
    
text:SetJustifyH("CENTER")
    
timer.text text

    self
:Cooldown_OnSizeChanged(timerparent:GetSize())
    
parent:SetScript('OnSizeChanged', function(_, ...) self:Cooldown_OnSizeChanged(timer, ...) end)

    
parent.timer timer
    
return timer
end

function UI:OnSetCooldown(startdurationchargesmaxCharges)
    if(
self.noOCCthen return end
    local button 
self:GetParent()
    
    if 
start and duration MIN_DURATION then
        local timer 
self.timer or UI:CreateCooldownTimer(self)
        
timer.start start
        timer
.duration duration
        timer
.enabled true
        timer
.nextUpdate 0
        
if timer.fontScale >= MIN_SCALE then timer:Show() end
    
else
        
local timer self.timer
        
if timer then
            UI
:Cooldown_StopTimer(timer)
            return
        
end
    end
    
    
if self.timer then
        
if charges and charges 0 then
            self
.timer:SetAlpha(0)
        else
            
self.timer:SetAlpha(1)    
        
end
    end
end

function UI:RegisterCooldown(cooldown)
    if(
cooldown.isHookedthen return end
    hooksecurefunc
(cooldown"SetCooldown"UI.OnSetCooldown)
    
cooldown.isHooked true
end