Skip to content

Commit

Permalink
Merge branch 'Jaliborc'
Browse files Browse the repository at this point in the history
Conflicts:
	localization/cn.lua
  • Loading branch information
Jaliborc committed May 15, 2013
2 parents 05ac3e5 + ff4cb84 commit 7a72097
Show file tree
Hide file tree
Showing 24 changed files with 175 additions and 132 deletions.
38 changes: 37 additions & 1 deletion Changelog.txt
@@ -1,5 +1,41 @@
====== 5.2.3
* Fixed "Activate" effect incompatibility with some addons.

====== 5.2.2
* Fixed bug affecting new users on first login.

====== 5.2.1
* Fixed bug causing settings to reset at login.
* New option: spiral opacity! Now, instead of only being able to toggle them on/off, you can set how transparent they should look. Setting to 0% will hide them.

===== 5.2.0
* Updated for patch 5.2: The Thunder King

====== 5.1.3
* Fixed issue causing problems to users coming from extremely outdated versions (pankake and before).

====== 5.1.2
* Fixed issue causing the script engine to not be loaded properly.

====== 5.1.1
* Fixed bug causing french to be the default language.

===== 5.1.0
* Updated for patch 5.1: Landfall.

====== 5.0.9 (beta)
* OmniCC is now fully localized in french! (by Noaah)

====== 5.0.8 (beta)
* Fixed bug preventing the "None" effect from working properly.
* Fixed several issues in the rules panel.

====== 5.0.7 (beta)
* Fixed bug preventing OmniCC from working with addons that do not support spell charges (ex: Ion).

====== 5.0.6 (beta)
* Fixed bug preventing OmniCC from working with addons such as Bartender.
* Fixed settings migration issue.

====== 5.0.5 (beta)
* Optimized the most important bottleneck in OmniCC, for better performance in intense battles.
Expand Down Expand Up @@ -286,4 +322,4 @@
====== 2.0.9
* Updated to LSM 3
* Unthrottled the updates for cooldowns with durations > 1 minute. This is to (hopefully) prevent an issue with the rogue ability Preparation.
* Reimplemented the slash commands* Reimplemented the slash commands
* Reimplemented the slash commands* Reimplemented the slash commandsndssssss
2 changes: 1 addition & 1 deletion License.txt
@@ -1,4 +1,4 @@
Copyright (c) 2010-2012 Jason Greer and João Cardoso
Copyright (c) 2010-2013 Jason Greer and João Cardoso

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions OmniCC.toc
@@ -1,9 +1,9 @@
## Interface: 50001
## Interface: 50200
## Title: |cffE32929OmniCC|r
## Notes: Cooldown count for everything
## Notes-koKR: 모든 것을 위한 쿨다운 카운트
## Author: Tuller
## Version: 5.0.5
## Version: 5.2.3
## SavedVariables: OmniCC4Config

libs\libs.xml
Expand Down
27 changes: 13 additions & 14 deletions core/cooldown.lua
Expand Up @@ -9,6 +9,18 @@ local Timer = OmniCC.Timer
--[[ Control ]]--
function Cooldown:Start(...)
local timer = Timer:Get(self) or Timer:New(self)
timer:UpdateOpacity()
if Cooldown.CanShow(self, ...) then
Cooldown.Setup(self)
timer:Start(...)
else
Cooldown.Stop(self)
end
end
function Cooldown:Setup()
if not self.omnicc then
self:HookScript('OnShow', Cooldown.OnShow)
Expand All @@ -20,17 +32,6 @@ function Cooldown:Setup()
OmniCC:SetupEffect(self)
end
function Cooldown:Start(...)
if Cooldown.CanShow(self, ...) then
Cooldown.Setup(self)
local timer = Timer:Get(self) or Timer:New(self)
timer:Start(...)
else
Cooldown.Stop(self)
end
end
function Cooldown:Stop()
local timer = Timer:Get(self)
if timer and timer.enabled then
Expand All @@ -39,13 +40,11 @@ function Cooldown:Stop()
end
function Cooldown:CanShow(start, duration, charges)
if self.noCooldownCount or not (start and duration) or charges ~= 0 then
if self.noCooldownCount or not (start and duration) or (charges or 0) ~= 0 then
return false
end
local sets = OmniCC:GetGroupSettingsFor(self)
self:SetAlpha(sets.showCooldownModels and 1 or 0)
return start > 0 and duration >= sets.minDuration and sets.enabled
end
Expand Down
10 changes: 3 additions & 7 deletions core/timer.lua
Expand Up @@ -69,10 +69,6 @@ function Timer:ScheduleUpdate(delay)
updater:ScheduleUpdate(delay)
end
function Timer:OnScheduledUpdate()
self:UpdateText()
end
function Timer:CancelUpdate()
local engine = OmniCC:GetUpdateEngine()
local updater = engine:GetActive(self)
Expand Down Expand Up @@ -124,7 +120,7 @@ function Timer:UpdateText(forceStyleUpdate)
end
else
if self.duration >= self:GetSettings().minEffectDuration then
OmniCC:TriggerEffect(self:GetSettings().effect, self.cooldown)
OmniCC:TriggerEffect(self.cooldown)
end
self:Stop()
Expand Down Expand Up @@ -169,8 +165,8 @@ function Timer:UpdateShown()
end
end
function Timer:UpdateCooldownShown()
self.cooldown:SetAlpha(self:GetSettings().showCooldownModels and 1 or 0)
function Timer:UpdateOpacity()
self.cooldown:SetAlpha(self:GetSettings().spiralOpacity)
end
Expand Down
63 changes: 34 additions & 29 deletions effects/activate.lua
Expand Up @@ -3,38 +3,43 @@
mimics the default effect that shows up when an ability "procs"
--]]
local Classy = LibStub('Classy-1.0')
local L = OMNICC_LOCALS
local hooked = {}
local active = {}
local function OnFinish(anim)
local overlay = anim:GetParent()
local button = overlay:GetParent()
if active[button] then
ActionButton_HideOverlayGlow(button)
active[button] = nil
end
end
OmniCC:RegisterEffect({
local L = OMNICC_LOCALS
local Activate = OmniCC:RegisterEffect {
id = 'activate',
name = L.Activate,
desc = L.ActivateTip,
Setup = function() end,
Run = function(self, cooldown)
}
function Activate:Setup(cooldown)
if not self:Get(cooldown) then
local button = cooldown:GetParent()
if button then
ActionButton_ShowOverlayGlow(button)
active[button] = true
local overlay = button.overlay
if not hooked[overlay] then
overlay.animIn:HookScript('OnFinished', OnFinish)
hooked[overlay] = true
end
end
local width, height = button:GetSize()
local overlay = CreateFrame('Frame', '$parentOmniCCActivate', button, 'ActionBarButtonSpellActivationAlert')
overlay:SetSize(width * 1.4, height * 1.4)
overlay:SetFrameLevel(overlay:GetFrameLevel() + 5)
overlay:SetPoint('TOPLEFT', button, 'TOPLEFT', -width * 0.2, height * 0.2)
overlay:SetPoint('BOTTOMRIGHT', button, 'BOTTOMRIGHT', width * 0.2, -height * 0.2)
overlay.animIn:HookScript('OnFinished', self.OnFinish)
cooldown.omniccActivate = overlay
end
end
function Activate:Run(cooldown)
local overlay = self:Get(cooldown)
if overlay.animOut:IsPlaying() then
overlay.animOut:Stop()
end
})
overlay.animIn:Play()
end
function Activate:OnFinish()
self:Stop()
self:GetParent().animOut:Play()
end
function Activate:Get(cooldown)
return cooldown.omniccActivate
end
4 changes: 3 additions & 1 deletion effects/effects.lua
Expand Up @@ -6,7 +6,8 @@
--[[ Effects ]]--
function OmniCC:TriggerEffect(id, cooldown)
function OmniCC:TriggerEffect(cooldown)
local id = self:GetGroupSettingsFor(cooldown).effect
self:GetEffect(id):Run(cooldown)
end
Expand All @@ -17,6 +18,7 @@ end
function OmniCC:RegisterEffect(effect)
self.effects[effect.id] = effect
return effect
end
function OmniCC:GetEffect(id)
Expand Down
1 change: 1 addition & 0 deletions effects/effects.xml
Expand Up @@ -6,4 +6,5 @@
<Script file="pulse.lua"/>
<Script file="shine.lua"/>
<Script file="flare.lua"/>
<Script file="none.lua"/>
</Ui>
15 changes: 15 additions & 0 deletions effects/none.lua
@@ -0,0 +1,15 @@
--[[
none.lua
no effect
--]]
local L = OMNICC_LOCALS
local noFunc = function() end
OmniCC:RegisterEffect {
name = L.None,
id = 'none',
Run = noFunc,
Setup = noFunc
}
2 changes: 1 addition & 1 deletion engines/animation.lua
Expand Up @@ -62,5 +62,5 @@ end
function AniUpdater:OnFinished()
self:Hide()
self.frame:OnScheduledUpdate()
self.frame:UpdateText()
end
2 changes: 1 addition & 1 deletion engines/engines.xml
@@ -1,4 +1,4 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="animation.lua"/>
<Script file="classic.lua"/>
<Script file="script.lua"/>
</Ui>
2 changes: 1 addition & 1 deletion engines/script.lua
Expand Up @@ -41,7 +41,7 @@ end
function ScriptUpdater:OnFinished()
self:Cleanup()
self.frame:OnScheduledUpdate()
self.frame:UpdateText()
end
Expand Down
20 changes: 3 additions & 17 deletions localization/br.lua
@@ -1,29 +1,15 @@
--[[
OmniCC localization - Portuguese
--]]
if GetLocale() ~= 'ptBR' then return end
local L = OMNICC_LOCALS

-- effect names
L.Updated = "Atualizado para a versão %s"
L.None = NONE
L.Pulse = "Pulse"
L.Shine = "Brilhar"
L.Alert = "Alertar"
L.Activate = "Ativar"

--effect tooltip text
-- effect tooltips
L.ActivateTip = [[Imita o efeito padrão que aparece quando uma abilidade é ativada.]]
L.AlertTip = [[Pulses the finished cooldown icon
at the center of the screen.]]
L.PulseTip = [[Pulses the cooldown icon.]]

--slash command text
L.SetEngine_Classic = 'Motor clássico ativado. Essa configuração só terá efeito na próxima vez que você efetuar login.'
L.SetEngine_Animation = 'Motor de animação ativado. Essa configuração só terá efeito na próxima vez que você efetuar login.'
L.UnknownEngineName = "Motor desconhecido: '%s'"
L.Commands = 'Comandos (/omnicc or /occ):'
L.Command_ShowOptionsMenu = '- config - Mostra o menu de configuração'
L.Command_SetTimerEngine = '- setengine <classic | animation> - Muda o motor de atualização'
L.Command_ShowAddonVersion = '- version - Mostra a atual versão do programa'
L.UnknownCommandName = "Comando desconhecido '%s'"
L.PulseTip = [[Pulses the cooldown icon.]]
11 changes: 6 additions & 5 deletions localization/cn.lua
@@ -1,12 +1,8 @@
--[[
OmniCC localization - zhCN
--]]
if GetLocale() ~= 'zhCN' then return end
local L = OMNICC_LOCALS

-- effect names
<<<<<<< HEAD
L.None = NONE
L.Pulse = "搏动"
L.Shine = "闪亮"
Expand All @@ -23,3 +19,8 @@ L.PulseTip = [[结束冷却的图标将发生搏动。]]
-- other
L.ConfigMissing = '%s无法被载入,因为该插件%s'
L.Version = '你正在使用|cffFCF75EOmniCC 版本(%s)|r'
=======
L.Updated = "升级至 v%s"
L.Pulse = "脉冲"
L.Shine = "闪亮"
>>>>>>> Jaliborc
6 changes: 0 additions & 6 deletions localization/de.lua
@@ -1,12 +1,6 @@
--[[
OmniCC localization - deDE
--]]
if GetLocale() ~= 'deDE' then return end
local L = OMNICC_LOCALS

L.Updated = "Aktualisiert auf v%s"
L.None = NONE
L.Pulse = "Pulse"
L.Shine = "Shine"
8 changes: 2 additions & 6 deletions localization/en.lua
@@ -1,8 +1,4 @@
--[[
OmniCC localization - English
--]]
OMNICC_LOCALS = {} --should be done in the US locale file, only
OMNICC_LOCALS = {} -- should be done in the US locale file, only
local L = OMNICC_LOCALS

-- effect names
Expand All @@ -13,7 +9,7 @@ L.Alert = "Alert"
L.Activate = "Activate"
L.Flare = "Flare"

--effect tooltips
-- effect tooltips
L.ActivateTip = [[Mimics the default effect that shows on
action buttons when an ability "procs".]]
L.AlertTip = [[Pulses the finished cooldown icon
Expand Down

0 comments on commit 7a72097

Please sign in to comment.