WoWInterface SVN SliceCommander

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 240 to Rev 241
    Reverse comparison

Rev 240 → Rev 241

trunk/Core/Settings.lua
15,21 → 15,21
local selected = {}
local cd
for k, v in pairs(SC.SET.Pos) do
if string.sub(string.upper(k), -2) == 'CD' then
cd = ' CD'
if _G['SC'].BARS[string.upper(k)] == nil or _G['SC'].BARS[string.upper(k)]['name'] == nil then
_G['SC'].SET.Pos[string.upper(k)] = nil--Remove spell
_G['SC'].BARS[string.upper(k)] = nil
else
cd = ''
end
if not selected[v] then
if _G['SC'].BARS[string.upper(k)] == nil or _G['SC'].BARS[string.upper(k)]['name'] == nil then
_G['SC'].SET.Pos[string.upper(k)] = nil--Remove removed spell
_G['SC'].BARS[string.upper(k)] = nil
if string.sub(string.upper(k), -2) == 'CD' then
cd = ' CD'
else
selected[v] = _G['SC'].BARS[string.upper(k)]['name'] .. cd
cd = ''
end
 
else
selected[v] = selected[v] .. ', ' .. _G['SC'].BARS[string.upper(k)]['name'] .. cd
if not selected[v] then
selected[v] = _G['SC'].BARS[string.upper(k)]['name'] .. cd
 
else
selected[v] = selected[v] .. ', ' .. _G['SC'].BARS[string.upper(k)]['name'] .. cd
end
end
end
for key = -30, 30, 1 do
133,6 → 133,19
}
end
 
function SliceCommander:getFlashSetting(spell)
return {
order = SliceCommander:getOrder(),
name = L["Flash when ready"],
desc = L["The bar will keep flashing when it should be use."],
type = "toggle",
set = function(info,val)
SC.SET.flash[spell] = val
end,
get = function(info) return SC.SET.flash[spell] end
}
end
 
function SliceCommander:getHeaderSetting(spell)
return {
order = SliceCommander:getOrder(),
152,9 → 165,15
 
function SliceCommander:getSpellSettings(spell)
local args = {
header = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Spell'],
},
Show = SliceCommander:getShowSetting(spell),
Color = SliceCommander:getColorSetting(spell),
Pos = SliceCommander:getPosSetting(spell),
Flash = SliceCommander:getFlashSetting(spell)
}
if SC.SET.SpellSound ~= nil and SC.SET.SpellSound then
args.SpellSound = SliceCommander:getSpellSound(spell)
169,9 → 188,15
 
function SliceCommander:getCDSettings(spell)
local args = {
headerCD = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Cooldown'],
},
Show = SliceCommander:getShowSetting(spell),
Color = SliceCommander:getColorSetting(spell),
Pos = SliceCommander:getPosSetting(spell),
CDFlash = SliceCommander:getFlashSetting(spell)
}
if SC.SET.SpellSound ~= nil and SC.SET.SpellSound then
args.CDSpellSound = SliceCommander:getCDSpellSound(spell)
198,12 → 223,24
 
function SliceCommander:getSpellCDSettings(spell)
local args = {
header = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Spell'],
},
Show = SliceCommander:getShowSetting(spell),
Color = SliceCommander:getColorSetting(spell),
Pos = SliceCommander:getPosSetting(spell),
Flash = SliceCommander:getFlashSetting(spell),
headerCD = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Cooldown'],
},
CDShow = SliceCommander:getShowSetting(spell..'CD'),
CDColor = SliceCommander:getColorSetting(spell..'CD'),
CDPos = SliceCommander:getPosSetting(spell..'CD'),
CDFlash = SliceCommander:getFlashSetting(spell..'CD')
}
if SC.SET.SpellSound ~= nil and SC.SET.SpellSound then
args.SpellSound = SliceCommander:getSpellSound(spell)
644,9 → 681,15
type = "group",
order = SliceCommander:getOrder(),
args = {
headerCD = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Cooldown'],
},
TOTShow = SliceCommander:getShowSetting('TOTCD'),
TOTColor = SliceCommander:getColorSetting('TOTCD'),
TOTPos = SliceCommander:getPosSetting('TOTCD'),
TOTColor = SliceCommander:getColorSetting('TOTCD'),
Flash = SliceCommander:getFlashSetting('TOTCD'),
TOTTarget = {
order = SliceCommander:getOrder(),
name = L["Taget name"],
669,6 → 712,7
ShowKI = SliceCommander:getShowSetting('KICD'),
ColorKI = SliceCommander:getColorSetting('KICD'),
PosKI = SliceCommander:getPosSetting('KICD'),
Flash = SliceCommander:getFlashSetting('KICD'),
HeaderKINotification = {
order = SliceCommander:getOrder(),
name = L["Warning settings"],
972,6 → 1016,11
args = SliceCommander_TableMerge(
SliceCommander:getSpellCDSettings('RB').args,
{
headerSpecial = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Special settings'],
},
replaceName = {
order = SliceCommander:getOrder(),
name = L["Replace spell name with each following spell text"],
996,23 → 1045,34
name = SC_SPELL['BF'],
type = "group",
args = {
header = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Spell'],
},
BFShow = SliceCommander:getShowSetting('BF'),
BFColor = SliceCommander:getColorSetting('BF'),
BFPos = SliceCommander:getPosSetting('BF'),
BFColor = SliceCommander:getColorSetting('BF'),
BFCDShow = SliceCommander:getShowSetting('BFCD'),
BFCDPos = SliceCommander:getPosSetting('BFCD'),
BFCDColor = SliceCommander:getColorSetting('BFCD'),
Flash = SliceCommander:getFlashSetting('BF'),
BFIcon = {
order = SliceCommander:getOrder(),
name = string.format(L["Show %s icon"], SC_SPELL['BF']),
desc = string.format(L["Display the %s icon when enbale"], SC_SPELL['BF']),
width = "full",
type = "toggle",
set = function(info,val)
SC.SET.display.BFICON = val
end,
get = function(info) return SC.SET.display.BFICON end
}
},
headerCD = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Cooldown'],
},
BFCDShow = SliceCommander:getShowSetting('BFCD'),
BFCDColor = SliceCommander:getColorSetting('BFCD'),
BFCDPos = SliceCommander:getPosSetting('BFCD'),
FlashCD = SliceCommander:getFlashSetting('BFCD')
}
},
AR = {
1020,12 → 1080,15
name = SC_SPELL['AR'],
type = "group",
args = {
header = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Spell'],
},
ARShow = SliceCommander:getShowSetting('AR'),
ARColor = SliceCommander:getColorSetting('AR'),
ARPos = SliceCommander:getPosSetting('AR'),
ARColor = SliceCommander:getColorSetting('AR'),
ARCDShow = SliceCommander:getShowSetting('ARCD'),
ARCDPos = SliceCommander:getPosSetting('ARCD'),
ARCDColor = SliceCommander:getColorSetting('ARCD'),
Flash = SliceCommander:getFlashSetting('AR'),
ARMarioMod = {
order = SliceCommander:getOrder(),
name = L["Enable Mario mod"],
1045,7 → 1108,16
SC.SET.ARMarioMod = val
end,
get = function(info) return SC.SET.ARMarioMod end
}
},
headerCD = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Cooldown'],
},
ARCDShow = SliceCommander:getShowSetting('ARCD'),
ARCDColor = SliceCommander:getColorSetting('ARCD'),
ARCDPos = SliceCommander:getPosSetting('ARCD'),
FlashCD = SliceCommander:getFlashSetting('ARCD')
}
},
BE = SliceCommander:getSpellCDSettings('BE'),
1219,9 → 1291,15
name = SC_SPELL['FOTD'],
type = "group",
args = {
header = {
type = "header",
order = SliceCommander:getOrder(),
name = L['Spell'],
},
Show = SliceCommander:getShowSetting('FOTD'),
Pos = SliceCommander:getPosSetting('FOTD'),
Color = SliceCommander:getColorSetting('FOTD'),
Flash = SliceCommander:getFlashSetting('FOTD'),
Icon = {--Shadow of the destroyer icon
order = SliceCommander:getOrder(),
name = string.format(L["%s icon"], SC_SPELL['SOTD']),
trunk/Core/Config.lua
136,7 → 136,7
 
for i,v in pairs(SC.BARS) do
if i ~= "CP" then
SC.BARS[i].obj = SliceCommander:NewFrame(v.color)
SC.BARS[i].obj = SliceCommander:NewFrame(v.color, i)
end
end
 
516,6 → 516,22
end
end
 
function SliceCommander:FlashSpells(Spells)
for i, v in ipairs(Spells) do
if SC.SET.flash[v] == nil then
SC.SET.flash[v] = true
end
end
end
 
function SliceCommander:NotFlashSpells(Spells)
for i, v in ipairs(Spells) do
if SC.SET.flash[v] == nil then
SC.SET.flash[v] = false
end
end
end
 
function SliceCommander:OrderSpells(Spells)
for i, v in pairs(Spells) do
_G['SC'].orderBar = _G['SC'].orderBar+1
542,8 → 558,11
end
 
function SliceCommander:Global()
SliceCommander:DisplaySpells({'CP', 'THREAT', 'CS', 'KS', 'KSCD', 'FOTD', 'CV', 'CVCD', 'TOTCD', 'FE', 'SSCD', 'SUB', 'CDCD', 'AC', 'MDCD', 'DFACD', 'Poison', 'SOTD', 'MAI', 'FECD', 'ESSECD', 'DPICON'})
SliceCommander:DisplaySpells({'CP', 'THREAT', 'SND', 'CS', 'KS', 'KSCD', 'FOTD', 'CV', 'CVCD', 'TOTCD', 'FE', 'SSCD', 'SUB', 'CDCD', 'AC', 'MDCD', 'DFACD', 'Poison', 'SOTD', 'MAI', 'FECD', 'ESSECD', 'DPICON'})
SliceCommander:NotDisplaySpells({'HEALTH', 'THEALTH', 'VANCD', 'KICD', 'COS', 'COSCD', 'EVA', 'EVACD', 'SPR', 'SPRCD', 'SS'})
 
SliceCommander:FlashSpells({'SND'})
SliceCommander:NotFlashSpells({'KSCD', 'CVCD', 'TOTCD', 'SSCD', 'CDCD', 'MDCD', 'DFACD', 'FECD', 'ESSECD', 'VANCD', 'KICD', 'COSCD', 'EVACD', 'SPRCD'})
 
_G['SC'].orderBar = _G['SC'].maxPos
_G['SC'].orderCDBar = _G['SC'].maxCDPos
552,13 → 571,16
SC.SET.Pos.CP = -1
end
 
SliceCommander:OrderSpells({'FOTD', 'CV', 'FE', 'SUB', 'AC', 'MAI', 'COS', 'EVA', 'SPR', 'SS'})
SliceCommander:OrderSpells({'SND', 'FOTD', 'CV', 'FE', 'SUB', 'AC', 'MAI', 'COS', 'EVA', 'SPR', 'SS'})
SliceCommander:OrderCDs({'CVCD', 'TOTCD', 'VANCD', 'SSCD', 'CDCD', 'MDCD', 'DFACD', 'THREAT', 'HEALTH', 'THEALTH', 'CS', 'KS', 'KSCD', 'KICD', 'COSCD', 'EVACD', 'SPRCD', 'FECD', 'ESSECD'})
end
 
function SliceCommander:Assassination()
SliceCommander:DisplaySpells({'RUP', 'GAR', 'GARCD', 'VEN', 'VENCD', 'ENV', 'EP', 'DPBUT', 'EXCD', 'KB', 'KBCD', 'BA', 'ST', 'TXB', 'TXBCD', 'BLS', 'MA', 'CT'})
SliceCommander:NotDisplaySpells({'DP'})
 
SliceCommander:FlashSpells({'VENCD', 'EXCD'})
SliceCommander:NotFlashSpells({'GARCD', 'EXCD', 'KBCD', 'TXBCD'})
 
_G['SC'].orderBar = 0
_G['SC'].orderCDBar = -1
568,19 → 590,25
end
 
function SliceCommander:Outlaw()
SliceCommander:DisplaySpells({'SND', 'RB', 'AR', 'ARCD', 'CDB', 'CDBCD', 'KSPCD', 'GS', 'GHCD', 'BE', 'BECD', 'BF', 'BFCD', 'OP', 'GSWW', 'BB', 'LD', 'GSCD', 'BRCD', 'RBCD'})
SliceCommander:DisplaySpells({'RB', 'AR', 'ARCD', 'CDB', 'CDBCD', 'KSPCD', 'GS', 'GHCD', 'BE', 'BECD', 'BF', 'BFCD', 'OP', 'GSWW', 'BB', 'LD', 'GSCD', 'BRCD', 'RBCD'})
SliceCommander:NotDisplaySpells({'BFICON', 'GG', 'GGCD'})
 
SliceCommander:FlashSpells({'ARCD', 'CDBCD', 'KSPCD', 'BECD', 'BRCD', 'RBCD'})
SliceCommander:NotFlashSpells({'GHCD', 'BFCD', 'GSCD'})
 
_G['SC'].orderBar = 0
_G['SC'].orderCDBar = -1
 
SliceCommander:OrderSpells({'SND', 'RB', 'AR', 'GS', 'OP', 'CDB', 'GSWW', 'BF', 'LD'})
SliceCommander:OrderSpells({'RB', 'AR', 'GS', 'OP', 'CDB', 'GSWW', 'BF', 'LD'})
SliceCommander:OrderCDs({'BECD', 'BE', 'ARCD', 'BFCD', 'KSPCD', 'GHCD', 'CDBCD', 'GSCD', 'BRCD', 'GG', 'GGCD', 'RBCD'})
end
 
function SliceCommander:Subtlety()
SliceCommander:DisplaySpells({'SD', 'SDCD', 'SB', 'SBCD', 'NB', 'SOD', 'GB', 'GBCD', 'SODCD', 'SHT', 'SHTCD', 'STHCD'})
SliceCommander:NotDisplaySpells({'FW'})
 
SliceCommander:FlashSpells({'SDCD', 'SBCD', 'SODCD'})
SliceCommander:NotFlashSpells({'GBCD', 'SHTCD', 'STHCD'})
 
_G['SC'].orderBar = 0
_G['SC'].orderCDBar = -1
666,6 → 694,9
if SC.SET == nil or SC.SET.display == nil or SC.SET.Pos == nil then
SC.SET = { display = {}, Pos = {} }
end
if SC.SET.flash == nil then
SC.SET.flash = {}
end
if _G['SC'].SET.PixelPerfect == nil then
_G['SC'].SET.PixelPerfect = true
end
trunk/Core/Object.lua
1,6 → 1,11
function SliceCommander:NewFrame(color)
local f = CreateFrame("StatusBar", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate")
local Smoother = LibStub("LibSmoothStatusBar-1.0")
local Glower = LibStub("LibCustomGlow-1.0")
 
function SliceCommander:NewFrame(color, name)
local f = CreateFrame("StatusBar", 'SliceCommander_bar_' .. name, UIParent, BackdropTemplateMixin and "BackdropTemplate")
--Mixin(f, "Region")
Smoother:SmoothBar(f)
 
f:SetStatusBarTexture(SliceCommander:BarTexture())
f:SetValue(0)
f:SetDefaultBackdrop()
28,7 → 33,39
f:SetStatusBarColor(unpack(color))
f.border = SliceCommander:tukSkin(f, false)
f.iconBorder = SliceCommander:tukSkin(f, f.icon)
 
local animPlaying = false
 
--Animation (Blink)
f.animFade = f:CreateAnimationGroup()
f.animFade:SetLooping('BOUNCE')
 
local animOut = f.animFade:CreateAnimation("Alpha")
animOut:SetFromAlpha(1)
animOut:SetToAlpha(.3)
animOut:SetDuration(.4)
animOut:SetSmoothing("OUT")
animOut:SetOrder(1)
 
--Animation (Glow)
--local animFrame = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate")
--animFrame:SetAllPoints(f)
f.anim = {
Play = function()
animPlaying = true
Glower.PixelGlow_Start(f)
f.animFade:Play()
end,
Stop = function()
animPlaying = false
Glower.PixelGlow_Stop(f)
f.animFade:Stop()
end,
IsPlaying = function()
return animPlaying
end
}
 
return f
 
end
72,6 → 109,9
 
function SliceCommander:ThinBar(point, relativePoint, x, y)
local f = CreateFrame("StatusBar", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate")
 
Smoother:SmoothBar(f)
 
f:SCHeight(2)
f:SetFrameLevel(2)
f:SetStatusBarTexture(SliceCommander:BarTexture())
108,31 → 148,32
end
 
function SliceCommander:CreateEnergyFrame()
CreateFrame('StatusBar', 'VTimerEnergy', UIParent, BackdropTemplateMixin and "BackdropTemplate")
VTimerEnergy:SCSize(200, 20)
VTimerEnergy:SetMinMaxValues(0,100)
VTimerEnergy:SCPoint('CENTER', SliceCommanderFrame, 'CENTER', 0, 0)
VTimerEnergy:SetFrameLevel(1)
VTimerEnergy:SetMinMaxValues(0,UnitPowerMax("player", Enum.PowerType.Energy))
VTimerEnergy:SetDefaultBackdrop()
VTimerEnergy:SetBackdropBorderColor(unpack(SC.V.wColor))
VTimerEnergy:SetBackdropColor(unpack({.1,.1,.1,.7}))
VTimerEnergy:SetStatusBarTexture(SliceCommander:BarTexture())
VTimerEnergy:SetFrameStrata("MEDIUM")
VTimerEnergy:SetFrameLevel(1)
VTimerEnergy:SetStatusBarColor(unpack(SC.SET.energyColor))
VTimerEnergy.border = SliceCommander:tukSkin(VTimerEnergy, false)
local f = CreateFrame('StatusBar', 'VTimerEnergy', UIParent, BackdropTemplateMixin and "BackdropTemplate")
Smoother:SmoothBar(f)
f:SCSize(200, 20)
f:SetMinMaxValues(0,100)
f:SCPoint('CENTER', SliceCommanderFrame, 'CENTER', 0, 0)
f:SetFrameLevel(1)
f:SetMinMaxValues(0,UnitPowerMax("player", Enum.PowerType.Energy))
f:SetDefaultBackdrop()
f:SetBackdropBorderColor(unpack(SC.V.wColor))
f:SetBackdropColor(unpack({.1,.1,.1,.7}))
f:SetStatusBarTexture(SliceCommander:BarTexture())
f:SetFrameStrata("MEDIUM")
f:SetFrameLevel(1)
f:SetStatusBarColor(unpack(SC.SET.energyColor))
f.border = SliceCommander:tukSkin(f, false)
if SC.SET.HideEnergy then
VTimerEnergy:Hide()
f:Hide()
else
VTimerEnergy:Show()
f:Show()
end
 
VTimerEnergy:CreateFontString('VTimerEnergyTxt', 'OVERLAY', GameFontWhite)
VTimerEnergyTxt:SetJustifyH("RIGHT")
VTimerEnergyTxt:SCSize(49, 20)
VTimerEnergyTxt:SCPoint('RIGHT', VTimerEnergy, 'RIGHT', -5, 0)
VTimerEnergyTxt:SetFontObject(SliceCommander:NewFont("VTimerFont", 17, 0.7, 1, 1, 1))
f.txt = f:CreateFontString('VTimerEnergyTxt', 'OVERLAY', GameFontWhite)
f.txt:SetJustifyH("RIGHT")
f.txt:SCSize(49, 20)
f.txt:SCPoint('RIGHT', VTimerEnergy, 'RIGHT', -5, 0)
f.txt:SetFontObject(SliceCommander:NewFont("VTimerFont", 17, 0.7, 1, 1, 1))
end
 
function SliceCommander:CreateComboText()
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 1237 2020-07-17 22:50:38Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1239 2020-09-20 10:22:02Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
39,7 → 39,7
 
do
local widgetType = "Dropdown-Pullout"
local widgetVersion = 4
local widgetVersion = 5
 
--[[ Static data ]]--
 
193,12 → 193,7
 
local height = 8
for i, item in pairs(items) do
if i == 1 then
item:SetPoint("TOP", itemFrame, "TOP", 0, -2)
else
item:SetPoint("TOP", items[i-1].frame, "BOTTOM", 0, 1)
end
 
item:SetPoint("TOP", itemFrame, "TOP", 0, -2 + (i - 1) * -16)
item:Show()
 
height = height + 16
trunk/SliceCommander.toc
1,6 → 1,6
## Interface: 90001
## Author: Tomate
## Version: 9.01
## Version: 9.02
## Title: |cffc14f2cSlice|r|cff40a740Commander|r
## Notes: Energy bar, Combo point bar and rogue timer bar.
## SavedVariables: SC
trunk/Embeds.xml
10,4 → 10,6
<Include file="Libs\AceLocale-3.0\AceLocale-3.0.xml"/>
<Include file="Libs\AceHook-3.0\AceHook-3.0.xml"/>
<Include file="Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml"/>
<Include file="Libs\LibCustomGlow-1.0\LibCustomGlow-1.0.xml"/>
<Include file="Libs\LibSmoothStatusBar-1.0\LibSmoothStatusBar-1.0.xml"/>
</Ui>
trunk/Locale/enUS.lua
186,4 → 186,9
L["CD Sound"] = true
L["On cooldown"] = true
L["Alert when the spell is ready to be used"] = true
L["Azerite Essence"] = true
\ No newline at end of file +L["Azerite Essence"] = true +L["Spell"] = true +L["Flash when ready"] = true +L["The bar will keep flashing when it should be use."] = true +L["Cooldown"] = true +L["Special settings"] = true \ No newline at end of file
trunk/Locale/ruRU.lua
186,4 → 186,9
L["CD Sound"] = "CD Sound"
L["On cooldown"] = "On cooldown"
L["Alert when the spell is ready to be used"] = "Alert when the spell is ready to be used"
L["Azerite Essence"] = "Azerite Essence"
\ No newline at end of file +L["Azerite Essence"] = "Azerite Essence" +L["Spell"] = "Spell" +L["Flash when ready"] = "Flash when ready" +L["The bar will keep flashing when it should be use."] = "The bar will keep flashing when it should be use." +L["Cooldown"] = "Cooldown" +L["Special settings"] = "Special settings" \ No newline at end of file
trunk/Locale/esES.lua
186,4 → 186,9
L["CD Sound"] = true
L["On cooldown"] = true
L["Alert when the spell is ready to be used"] = true
L["Azerite Essence"] = true
\ No newline at end of file +L["Azerite Essence"] = true +L["Spell"] = true +L["Flash when ready"] = true +L["The bar will keep flashing when it should be use."] = true +L["Cooldown"] = true +L["Special settings"] = true \ No newline at end of file
trunk/Locale/frFR.lua
186,4 → 186,9
L["CD Sound"] = "Son du CD"
L["On cooldown"] = "Au rechargement"
L["Alert when the spell is ready to be used"] = "Alerte quand le sort est près à être utilisé"
L["Azerite Essence"] = "Essence d'Azérite"
\ No newline at end of file +L["Azerite Essence"] = "Essence d'Azérite" +L["Spell"] = "Technique" +L["Flash when ready"] = "Flash quand disponible" +L["The bar will keep flashing when it should be use."] = "La barre clignotera lorsque la technique devrait être utilisée." +L["Cooldown"] = "Cooldown" +L["Special settings"] = "Options spéciales" \ No newline at end of file
trunk/Locale/spell.lua
189,11 → 189,12
 
 
SC_SPELL = {}
SC_SPELL_ICON = {}
 
--GLOBAL
for k, v in pairs(SC_SPELLID) do
if tonumber(v) ~= nil then
SC_SPELL[k] = GetSpellInfo(v)
SC_SPELL[k], _, SC_SPELL_ICON[k] = GetSpellInfo(v)
else
SC_SPELL[k] = v
end
trunk/Locale/deDE.lua
186,4 → 186,9
L["CD Sound"] = "CD Sound"
L["On cooldown"] = "On cooldown"
L["Alert when the spell is ready to be used"] = "Alert when the spell is ready to be used"
L["Azerite Essence"] = "Azerite Essence"
\ No newline at end of file +L["Azerite Essence"] = "Azerite Essence" +L["Spell"] = "Spell" +L["Flash when ready"] = "Flash when ready" +L["The bar will keep flashing when it should be use."] = "The bar will keep flashing when it should be use." +L["Cooldown"] = "Cooldown" +L["Special settings"] = "Special settings" \ No newline at end of file
trunk/Locale/zhCN.lua
186,4 → 186,9
L["CD Sound"] = "CD Sound"
L["On cooldown"] = "On cooldown"
L["Alert when the spell is ready to be used"] = "Alert when the spell is ready to be used"
L["Azerite Essence"] = "Azerite Essence"
\ No newline at end of file +L["Azerite Essence"] = "Azerite Essence" +L["Spell"] = "Spell" +L["Flash when ready"] = "Flash when ready" +L["The bar will keep flashing when it should be use."] = "The bar will keep flashing when it should be use." +L["Cooldown"] = "Cooldown" +L["Special settings"] = "Special settings" \ No newline at end of file
trunk/SliceCommander.lua
100,6 → 100,12
SliceCommander:UnregisterAllEvents()
end
 
function SliceCommander:DEBUG(spell, message)
if spell == 'SND' then
print(spell.. ' => ' ..tostring(message))
end
end
 
function SliceCommander:AbilityCDBar(spell)
local BAR = SC.BARS[spell]
local display = SC.SET.display[spell]
122,20 → 128,52
end
return
end
if start ~= 0 and duration >= 2 and not BAR['obj']:IsVisible() then
if start ~= 0 and duration >= 2 and (not BAR['obj']:IsVisible() or BAR['obj'].anim:IsPlaying()) then
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
end
SliceCommander:EnableBar(BAR, duration, BAR['name'].." (CD)", (start+duration))
return
end
if start == 0 then
BAR['expire'] = 0
if BAR['obj']:IsVisible() then
SliceCommander:HideBar(BAR)
SliceCommander:PlayCDSound(BAR)
if SC.SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
BAR['obj'].text:SetText('')
if BAR['expire'] ~= -1 then
BAR['expire'] = -1
if BAR['obj']:IsVisible() then
SliceCommander:PlayCDSound(BAR)
end
end
if not BAR['obj']:IsVisible() then
if SC.SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name'].." (CD)"))
else
BAR['obj'].text2:SetText('')
end
BAR['obj']:Show()
SliceCommander:ChangeAnchor()
end
BAR['obj'].anim:Play()
end
else
BAR['expire'] = 0
if BAR['obj']:IsVisible() then
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
else
SliceCommander:PlayCDSound(BAR)
end
SliceCommander:HideBar(BAR)
end
end
return
end
if start == 0 or duration < 2 then
BAR['expire'] = 0
if BAR['expire'] ~= -1 then
BAR['expire'] = 0
end
return
end
BAR['expire'] = (start+duration)
171,15 → 209,45
end
return
end
if charges ~= maxCharges and not BAR['obj']:IsVisible() then
if charges ~= maxCharges and (not BAR['obj']:IsVisible() or BAR['obj'].anim:IsPlaying()) then
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
end
SliceCommander:EnableBar(BAR, duration, BAR['name'].." (CD)", (start+duration))
return
end
if charges == maxCharges then
BAR['expire'] = 0
if BAR['obj']:IsVisible() then
SliceCommander:HideBar(BAR)
SliceCommander:PlayCDSound(BAR)
if SC.SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
BAR['obj'].text:SetText('')
if BAR['expire'] ~= -1 then
BAR['expire'] = -1
if BAR['obj']:IsVisible() then
SliceCommander:PlayCDSound(BAR)
end
end
if not BAR['obj']:IsVisible() then
if SC.SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name'].." (CD)"))
else
BAR['obj'].text2:SetText('')
end
BAR['obj']:Show()
SliceCommander:ChangeAnchor()
end
BAR['obj'].anim:Play()
end
else
BAR['expire'] = 0
if BAR['obj']:IsVisible() then
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
else
SliceCommander:PlayCDSound(BAR)
end
SliceCommander:HideBar(BAR)
end
end
return
end
225,6 → 293,9
end
 
function SliceCommander:HideBar(BAR)
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
end
BAR['expire'] = 0
BAR['obj']:Hide()
BAR['obj'].text:SetText("")
246,29 → 317,30
value1, value2, value3 = 0 , 0, 0
local last = BAR['expire']
if BAR['type'] == 1 then
_, icon, count, _, duration, BAR['expire'], unitCaster, _, _, _, _, _, _, _, _, value1, value2, value3 = SliceCommander:UnitAura("player", BAR['id'], "HELPFUL PLAYER")
_, icon, count, _, duration, expire, unitCaster, _, _, _, _, _, _, _, _, value1, value2, value3 = SliceCommander:UnitAura("player", BAR['id'], "HELPFUL PLAYER")
elseif BAR['type'] == 2 then
_, icon, count, _, duration, BAR['expire'], unitCaster = SliceCommander:UnitAura("target", BAR['id'], "HARMFUL PLAYER")
_, icon, count, _, duration, expire, unitCaster = SliceCommander:UnitAura("target", BAR['id'], "HARMFUL PLAYER")
elseif BAR['type'] == 3 then
_, icon, count, _, duration, BAR['expire'], unitCaster = SliceCommander:UnitAura("player", BAR['id'], "HARMFUL")
_, icon, count, _, duration, expire, unitCaster = SliceCommander:UnitAura("player", BAR['id'], "HARMFUL")
end
 
if unitCaster ~= "player" and BAR['type'] ~= 3 and unitCaster ~= nil then
BAR['expire'] = last
expire = last
end
 
if BAR['expire'] == nil then
BAR['expire'] = 0
if expire == nil then
expire = 0
end
if SC.tNow == nil then
SC.tNow = GetTime()
end
if BAR['expire'] > 0 and SC.tNow < BAR['expire'] then
x = BAR['expire'] - SC.tNow
if expire > 0 and SC.tNow < expire then
x = expire - SC.tNow
else
x = 0
end
if x > 0 then
BAR['expire'] = expire
local xlast = SliceCommander:ShowBar(BAR, duration, icon)
 
local textcount = ''
290,16 → 362,43
BAR['obj']:SetValue(x)
 
BAR['obj'].text:SetText(string.format("%0.1f", x))
 
 
SliceCommander:Tick(BAR, x)
SliceCommander:Pandemic(BAR, x)
SliceCommander:SoundBar(BAR, x, xlast)
else
if BAR['obj']:IsVisible() then
if BAR['sound'] ~= nil then
SliceCommander:PlaySound(BAR['sound']['expired'])
if SC.SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
BAR['obj'].text:SetText('')
if BAR['expire'] ~= -1 then
BAR['expire'] = -1
if BAR['obj']:IsVisible() then
SliceCommander:PlaySound(BAR['sound']['expired'])
end
end
if not BAR['obj']:IsVisible() then
if SC.SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name']))
else
BAR['obj'].text2:SetText('')
end
BAR['obj'].icon:SetTexture(SC_SPELL_ICON[spell])
BAR['obj']:Show()
SliceCommander:ChangeAnchor()
end
BAR['obj'].anim:Play()
end
SliceCommander:HideBar(BAR)
else
BAR['expire'] = expire
if BAR['obj']:IsVisible() then
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
elseif BAR['sound'] ~= nil then
SliceCommander:PlaySound(BAR['sound']['expired'])
end
SliceCommander:HideBar(BAR)
end
end
end
end
671,7 → 770,10
end
 
function SliceCommander:ShowBar(BAR, duration, icon)
if not BAR['obj']:IsVisible() then
if not BAR['obj']:IsVisible() or BAR['obj'].anim:IsPlaying() then
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
end
if BAR['sound'] ~= nil then
SliceCommander:PlaySound(BAR['sound']['applied'])
end
735,11 → 837,37
SliceCommander:Pandemic(BAR, x)
SliceCommander:SoundBar(BAR, x, xlast)
else
if BAR['obj']:IsVisible() then
if BAR['sound'] ~= nil then
SliceCommander:PlaySound(BAR['sound']['expired'])
if SC.SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
BAR['obj'].text:SetText('')
if BAR['expire'] ~= -1 then
BAR['expire'] = -1
if BAR['obj']:IsVisible() then
SliceCommander:PlaySound(BAR['sound']['expired'])
end
end
if not BAR['obj']:IsVisible() then
if SC.SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name']))
else
BAR['obj'].text2:SetText('')
end
BAR['obj']:Show()
SliceCommander:ChangeAnchor()
end
BAR['obj'].anim:Play()
end
SliceCommander:HideBar(BAR)
else
if BAR['obj']:IsVisible() then
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
end
if BAR['sound'] ~= nil and BAR['expire'] ~= -1 then
SliceCommander:PlaySound(BAR['sound']['expired'])
end
SliceCommander:HideBar(BAR)
end
end
end
end