WoWInterface SVN SliceCommander

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 248 to Rev 249
    Reverse comparison

Rev 248 → Rev 249

trunk/SliceCommander.lua
1,26 → 1,27
SliceCommander = LibStub("AceAddon-3.0"):NewAddon("SliceCommander", "AceEvent-3.0", "AceHook-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("SliceCommander")
local LSM = LibStub("LibSharedMedia-3.0")
local _G = getfenv(0)
 
function SliceCommander:BarTexture()
return LSM:Fetch("statusbar", SC.SET.BarTexture)
return LSM:Fetch("statusbar", _G['SC'].SET.BarTexture)
end
 
function SliceCommander:PlayCDSound(BAR)
if BAR['sound'] ~= nil and not _G['SC'].preventSound then
local name = BAR['sound']['available']
if (SliceCommander:isCombat() or SC.SET.ForceCDSpellSound) and name ~= 'None' and name ~= nil then
PlaySoundFile(LSM:Fetch("sound", name), SC.SET.soundChannel)
if (SliceCommander:isCombat() or _G['SC'].SET.ForceCDSpellSound) and name ~= 'None' and name ~= nil then
PlaySoundFile(LSM:Fetch("sound", name), _G['SC'].SET.soundChannel)
end
end
end
 
function SliceCommander:PlaySoundReal(name)
local _
if SC.previousSound then
StopSound(SC.previousSound)
if _G['SC'].previousSound then
StopSound(_G['SC'].previousSound)
end
_, SC.previousSound = PlaySoundFile(LSM:Fetch("sound", name), SC.SET.soundChannel)
_, _G['SC'].previousSound = PlaySoundFile(LSM:Fetch("sound", name), _G['SC'].SET.soundChannel)
end
 
function SliceCommander:PlaySound(name)
31,26 → 32,26
 
function SliceCommander:ChangeAnchor()
local offSetSize, numberPos, numberNeg, alignPos, alignNeg
offSetSize = SC.SET.BarMargin+SC.SET.TimerHeight
offSetSize = _G['SC'].SET.BarMargin+_G['SC'].SET.TimerHeight
numberPos = 0
numberNeg = 0
 
for i = 1, _G['SC'].countBars do
for j,v in pairs(SC.BARS) do
for j,v in pairs(_G['SC'].BARS) do
if v['obj']:IsVisible() and v['expire'] == nil then
v['obj']:Hide()
if v['type'] == 4 or v['type'] == 5 then
SliceCommander:PlayCDSound(v)
end
end
if SC.SET.Pos[j] == i and v['obj']:IsVisible() then
alignPos = -1*numberNeg*offSetSize-SC.SET.BarMargin
if _G['SC'].SET.Pos[j] == i and v['obj']:IsVisible() then
alignPos = -1*numberNeg*offSetSize-_G['SC'].SET.BarMargin
v['obj']:ClearAllPoints()
v['obj']:SCPoint("TOPRIGHT", VTimerEnergy, "BOTTOMRIGHT", 0, alignPos)
numberNeg = numberNeg +1
end
if SC.SET.Pos[j] == i*-1 and v['obj']:IsVisible() then
alignNeg = numberPos*offSetSize+SC.SET.BarMargin
if _G['SC'].SET.Pos[j] == i*-1 and v['obj']:IsVisible() then
alignNeg = numberPos*offSetSize+_G['SC'].SET.BarMargin
v['obj']:ClearAllPoints()
v['obj']:SCPoint("BOTTOMRIGHT", VTimerEnergy, "TOPRIGHT", 0, alignNeg)
numberPos = numberPos +1
60,7 → 61,7
end
 
function SliceCommander:isCombat()
if SC.SET.SoundCombat==true then
if _G['SC'].SET.SoundCombat==true then
return UnitAffectingCombat("player")
else
return true
72,27 → 73,27
local maxCP = UnitPowerMax("player", Enum.PowerType.ComboPoints)
 
for i = 1, maxCP do
SC.BARS['CP']['obj'].combos[i].bg:Hide()
_G['SC'].BARS['CP']['obj'].combos[i].bg:Hide()
end
SC.BARS['CP']['obj']:Hide()
_G['SC'].BARS['CP']['obj']:Hide()
local text = points
if text == 0 then
text = ''
end
 
if points < SC.BARS['CP']['expire'] then
SC.BARS['CP']['last'] = SC.BARS['CP']['expire']
if points < _G['SC'].BARS['CP']['expire'] then
_G['SC'].BARS['CP']['last'] = _G['SC'].BARS['CP']['expire']
end
SC.BARS['CP']['expire'] = points
_G['SC'].BARS['CP']['expire'] = points
 
SliceCommander_Combo:SetText(text)
SC.BARS['CP']['obj'].comboText:SetText(text)
_G['SC'].BARS['CP']['obj'].comboText:SetText(text)
 
if SC.SET.display.CP == true then
if _G['SC'].SET.display.CP == true then
for i = 1, points do
SC.BARS['CP']['obj'].combos[i].bg:Show()
_G['SC'].BARS['CP']['obj'].combos[i].bg:Show()
end
SC.BARS['CP']['obj']:Show()
_G['SC'].BARS['CP']['obj']:Show()
end
end
 
107,8 → 108,8
end
 
function SliceCommander:AbilityCDBar(spell)
local BAR = SC.BARS[spell]
local display = SC.SET.display[spell]
local BAR = _G['SC'].BARS[spell]
local display = _G['SC'].SET.display[spell]
 
if display ~= true then
BAR['expire'] = 0
136,7 → 137,7
return
end
if start == 0 then
if SC.SET.flash[spell] == true and UnitAffectingCombat("player") then
if _G['SC'].SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
BAR['obj'].text:SetText('')
147,7 → 148,7
end
end
if not BAR['obj']:IsVisible() then
if SC.SET.SpellText == true then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name'].." (CD)"))
else
BAR['obj'].text2:SetText('')
178,8 → 179,8
end
BAR['expire'] = (start+duration)
local x
if BAR['expire'] > 0 and SC.tNow < BAR['expire'] then
x = BAR['expire'] - SC.tNow
if BAR['expire'] > 0 and _G['SC'].tNow < BAR['expire'] then
x = BAR['expire'] - _G['SC'].tNow
else
x = 0
end
188,8 → 189,8
end
 
function SliceCommander:ChargeAbilityCDBar(spell)
local BAR = SC.BARS[spell]
local display = SC.SET.display[spell]
local BAR = _G['SC'].BARS[spell]
local display = _G['SC'].SET.display[spell]
 
if display ~= true then
BAR['expire'] = 0
217,7 → 218,7
return
end
if charges == maxCharges then
if SC.SET.flash[spell] == true and UnitAffectingCombat("player") then
if _G['SC'].SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
BAR['obj'].text:SetText('')
228,7 → 229,7
end
end
if not BAR['obj']:IsVisible() then
if SC.SET.SpellText == true then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name'].." (CD)"))
else
BAR['obj'].text2:SetText('')
254,8 → 255,8
 
BAR['expire'] = (start+duration)
local x
if BAR['expire'] > 0 and SC.tNow < BAR['expire'] then
x = BAR['expire'] - SC.tNow
if BAR['expire'] > 0 and _G['SC'].tNow < BAR['expire'] then
x = BAR['expire'] - _G['SC'].tNow
else
x = 0
end
265,7 → 266,7
textcount = ' x'..charges
end
if not BAR['count'] or BAR['count'] ~= charges then
if SC.SET.SpellText == true then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name'].." (CD)"..textcount))
else
BAR['obj'].text2:SetText(textcount)
278,12 → 279,12
 
function SliceCommander:EnableBar(BAR, duration, text, expire)
BAR['expire'] = expire
if SC.SET.FullTimer == true and duration then
if _G['SC'].SET.FullTimer == true and duration then
BAR['obj']:SetMinMaxValues(0, duration)
else
BAR['obj']:SetMinMaxValues(0, 6.0)
end
if SC.SET.SpellText == true then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", text))
else
BAR['obj'].text2:SetText('')
303,18 → 304,18
end
 
function SliceCommander:UpdateBar(spell)
local BAR = SC.BARS[spell]
local BAR = _G['SC'].BARS[spell]
local name, expire, icon, count, duration, unitCaster, x, _, maxValue, widthSeconde, value1, value2, value3, spellId
 
if SC.SET.display[spell] ~= true then
if _G['SC'].SET.display[spell] ~= true then
BAR['expire'] = 0
if BAR['obj']:IsVisible() then
SliceCommander:HideBar(BAR)
end
return
end
if SC.tNow == nil then
SC.tNow = GetTime()
if _G['SC'].tNow == nil then
_G['SC'].tNow = GetTime()
end
 
value1, value2, value3 = 0 , 0, 0
333,7 → 334,7
 
BAR['expire'] = expire
if expire == nil then
if SC.SET.flash[spell] == true and UnitAffectingCombat("player") then
if _G['SC'].SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
BAR['obj'].text:SetText('')
346,7 → 347,7
end
end
if not BAR['obj']:IsVisible() then
if SC.SET.SpellText == true then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name']))
else
BAR['obj'].text2:SetText('')
369,8 → 370,8
end
end
else
if expire > 0 and SC.tNow < expire then
x = expire - SC.tNow
if expire > 0 and _G['SC'].tNow < expire then
x = expire - _G['SC'].tNow
else
x = 0
end
387,7 → 388,7
count = value1..value2..value3
end
if not BAR['count'] or BAR['count'] ~= count then
if SC.SET.SpellText == true then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name']..textcount))
else
BAR['obj'].text2:SetText(textcount)
414,18 → 415,18
if not UnitAffectingCombat("player") then
local alreadyExist = GetMacroBody("SC_TOT")
if alreadyExist then
EditMacro("SC_TOT", "SC_TOT", "INV_MISC_QUESTIONMARK", "#showtooltip\n/cast [@"..SC.SET.TOTTarget..",modifier:alt] [help] [@targettarget, help][@none,@"..SC.SET.TOTTarget.."] "..GetSpellInfo(SC_SPELL['TOTCD']), 1, 1)
EditMacro("SC_TOT", "SC_TOT", "INV_MISC_QUESTIONMARK", "#showtooltip\n/cast [@".._G['SC'].SET.TOTTarget..",modifier:alt] [help] [@targettarget, help][@none,@".._G['SC'].SET.TOTTarget.."] "..GetSpellInfo(SC_SPELL['TOTCD']), 1, 1)
else
CreateMacro("SC_TOT", "INV_MISC_QUESTIONMARK", "#showtooltip\n/cast [@"..SC.SET.TOTTarget..",modifier:alt] [help] [@targettarget, help][@none,@"..SC.SET.TOTTarget.."] "..GetSpellInfo(SC_SPELL['TOTCD']), 1, 1)
CreateMacro("SC_TOT", "INV_MISC_QUESTIONMARK", "#showtooltip\n/cast [@".._G['SC'].SET.TOTTarget..",modifier:alt] [help] [@targettarget, help][@none,@".._G['SC'].SET.TOTTarget.."] "..GetSpellInfo(SC_SPELL['TOTCD']), 1, 1)
end
end
end
 
function SliceCommander:HealthBar(bar)
if SC.SET.display[bar] then
if _G['SC'].SET.display[bar] then
local HP, maxHP, pourcentHP, hexCol, rCol, gCol, bCol, healthText
HP = UnitHealth(SC.BARS[bar]['target'])
maxHP = UnitHealthMax(SC.BARS[bar]['target'])
HP = UnitHealth(_G['SC'].BARS[bar]['target'])
maxHP = UnitHealthMax(_G['SC'].BARS[bar]['target'])
if maxHP ~= 0 then
pourcentHP = (HP / maxHP) * 100
else
438,15 → 439,15
HP = 0
end
if HP == 0 then
if SC.BARS[bar]['obj']:IsVisible() then
SC.BARS[bar]['obj']:Hide()
if _G['SC'].BARS[bar]['obj']:IsVisible() then
_G['SC'].BARS[bar]['obj']:Hide()
end
SC.BARS[bar]['expire'] = 0
_G['SC'].BARS[bar]['expire'] = 0
else
if SC.BARS[bar]['expire'] > 35 and pourcentHP < 35 then
SliceCommander:PlaySound(SC.SET[bar].LowUnder)
elseif SC.BARS[bar]['expire'] > 50 and pourcentHP < 50 then
SliceCommander:PlaySound(SC.SET[bar].MidUnder)
if _G['SC'].BARS[bar]['expire'] > 35 and pourcentHP < 35 then
SliceCommander:PlaySound(_G['SC'].SET[bar].LowUnder)
elseif _G['SC'].BARS[bar]['expire'] > 50 and pourcentHP < 50 then
SliceCommander:PlaySound(_G['SC'].SET[bar].MidUnder)
end
hexCol = (100-pourcentHP)*(255/100)
rCol = hexCol
465,19 → 466,19
end
bCol = 50
 
if SC.SET[bar].HideCombat and not UnitAffectingCombat("player") then
if SC.BARS[bar]['obj']:IsVisible() then
SC.BARS[bar]['obj']:Hide()
if _G['SC'].SET[bar].HideCombat and not UnitAffectingCombat("player") then
if _G['SC'].BARS[bar]['obj']:IsVisible() then
_G['SC'].BARS[bar]['obj']:Hide()
end
SC.BARS[bar]['expire'] = 0
_G['SC'].BARS[bar]['expire'] = 0
else
if not SC.BARS[bar]['obj']:IsVisible() then
SC.BARS[bar]['obj']:Show()
if not _G['SC'].BARS[bar]['obj']:IsVisible() then
_G['SC'].BARS[bar]['obj']:Show()
end
SC.BARS[bar]['expire'] = pourcentHP
_G['SC'].BARS[bar]['expire'] = pourcentHP
end
SC.BARS[bar]['obj']:SetValue(pourcentHP)
if SC.SET[bar].value then
_G['SC'].BARS[bar]['obj']:SetValue(pourcentHP)
if _G['SC'].SET[bar].value then
if HP > 1000000000 then
healthText = string.format("%0.1f", HP/1000000000)..'G'
elseif HP > 1000000 then
490,24 → 491,24
else
healthText = string.format("%0.1f", pourcentHP)
end
SC.BARS[bar]['obj'].text:SetText(healthText)
SC.BARS[bar]['obj']:SetStatusBarColor(rCol/255,gCol/255,bCol/255)
_G['SC'].BARS[bar]['obj'].text:SetText(healthText)
_G['SC'].BARS[bar]['obj']:SetStatusBarColor(rCol/255,gCol/255,bCol/255)
end
else
SC.BARS[bar]['expire'] = 0
SC.BARS[bar]['obj']:Hide()
_G['SC'].BARS[bar]['expire'] = 0
_G['SC'].BARS[bar]['obj']:Hide()
end
end
 
 
function SliceCommander:TargetThreat()
local hexCol, rCol, gCol, bCol
if SC.SET.display.THREAT == false or (SC.SET.ThreatGroupOnly and IsInRaid() == false and IsInGroup() == false) then
SC.BARS['THREAT']['expire'] = 0
if _G['SC'].SET.display.THREAT == false or (_G['SC'].SET.ThreatGroupOnly and IsInRaid() == false and IsInGroup() == false) then
_G['SC'].BARS['THREAT']['expire'] = 0
else
local isTanking, status, threatpct, rawthreatpct, threatvalue = UnitDetailedThreatSituation("player", "target")
if rawthreatpct == nil then
SC.BARS['THREAT']['expire'] = 0
_G['SC'].BARS['THREAT']['expire'] = 0
else
hexCol = rawthreatpct *(255/110)
rCol = hexCol-45
530,31 → 531,31
gCol = 50
end
bCol = 50
SC.BARS['THREAT']['expire'] = rawthreatpct
_G['SC'].BARS['THREAT']['expire'] = rawthreatpct
end
end
if SC.BARS['THREAT']['expire'] == 0 then
SC.BARS['THREAT']['obj']:Hide()
if _G['SC'].BARS['THREAT']['expire'] == 0 then
_G['SC'].BARS['THREAT']['obj']:Hide()
else
SC.BARS['THREAT']['obj']:SetValue(SC.BARS['THREAT']['expire'])
SC.BARS['THREAT']['obj'].text:SetText(string.format("%0.1f", SC.BARS['THREAT']['expire']))
SC.BARS['THREAT']['obj']:SetStatusBarColor(rCol/255,gCol/255,bCol/255)
SC.BARS['THREAT']['obj']:Show()
_G['SC'].BARS['THREAT']['obj']:SetValue(_G['SC'].BARS['THREAT']['expire'])
_G['SC'].BARS['THREAT']['obj'].text:SetText(string.format("%0.1f", _G['SC'].BARS['THREAT']['expire']))
_G['SC'].BARS['THREAT']['obj']:SetStatusBarColor(rCol/255,gCol/255,bCol/255)
_G['SC'].BARS['THREAT']['obj']:Show()
SliceCommander:ChangeAnchor()
end
end
 
function SliceCommander:SetTransparency(value)
VTimerEnergy:SetAlpha(value/100)
SC.OTHER['AS']['obj']:SetAlpha(value/100)
_G['SC'].OTHER['AS']['obj']:SetAlpha(value/100)
end
 
function SliceCommander:TestDP()
local combat = UnitAffectingCombat("player")
if SC.SET.display.DPICON then --and GetSpecialization() == 1
if _G['SC'].SET.display.DPICON then --and GetSpecialization() == 1
local aSpec = GetSpecialization()
local mhPoison = SC.SET.poison.mh[aSpec]
local ohPoison = SC.SET.poison.oh[aSpec]
local mhPoison = _G['SC'].SET.poison.mh[aSpec]
local ohPoison = _G['SC'].SET.poison.oh[aSpec]
local _, _, _, selected = GetTalentInfo(4, 1, 1)
if not selected and ohPoison == SC_SPELL['LP'] then
ohPoison = 'CRP'
563,33 → 564,33
local name, _, _, _, _, expirationTime = SliceCommander:UnitAura("player", SC_SPELLID[mhPoison], "HELPFUL PLAYER")
local name2, _, _, _, _, expirationTime2 = SliceCommander:UnitAura("player", SC_SPELLID[ohPoison], "HELPFUL PLAYER")
 
local minimalTime = SC.SET.display.DPTIME*60
local minimalTime = _G['SC'].SET.display.DPTIME*60
 
if IsMounted() or ((name and ((expirationTime-SC.tNow) > minimalTime or combat)) and (name2 and ((expirationTime2-SC.tNow) > minimalTime or combat))) then
if SC.SET.IsLocked == true then
if SC.OTHER['POISON']['obj']:GetAlpha() == 1 then
SC.OTHER['POISON']['obj']:SetAlpha(0)
if IsMounted() or ((name and ((expirationTime-_G['SC'].tNow) > minimalTime or combat)) and (name2 and ((expirationTime2-_G['SC'].tNow) > minimalTime or combat))) then
if _G['SC'].SET.IsLocked == true then
if _G['SC'].OTHER['POISON']['obj']:GetAlpha() == 1 then
_G['SC'].OTHER['POISON']['obj']:SetAlpha(0)
end
if not combat and SC.OTHER['POISON']['obj'].button:IsMouseEnabled() then
--SC.OTHER['POISON']['obj'].button:EnableMouse(false)
if not combat and _G['SC'].OTHER['POISON']['obj'].button:IsMouseEnabled() then
--_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(false)
end
end
elseif not name or not name2 or (((expirationTime-SC.tNow) < minimalTime or (expirationTime2-SC.tNow) < minimalTime) and not combat) and not IsMounted() then
if SC.OTHER['POISON']['obj']:GetAlpha() ~= 1 then
SliceCommander:PlaySoundReal(SC.SET.DPSound)
SC.OTHER['POISON']['obj']:SetAlpha(1)
elseif not name or not name2 or (((expirationTime-_G['SC'].tNow) < minimalTime or (expirationTime2-_G['SC'].tNow) < minimalTime) and not combat) and not IsMounted() then
if _G['SC'].OTHER['POISON']['obj']:GetAlpha() ~= 1 then
SliceCommander:PlaySoundReal(_G['SC'].SET.DPSound)
_G['SC'].OTHER['POISON']['obj']:SetAlpha(1)
end
if not combat and not SC.OTHER['POISON']['obj'].button:IsMouseEnabled() and SC.SET.display.DPBUT then
SC.OTHER['POISON']['obj'].button:EnableMouse(true)
if not combat and not _G['SC'].OTHER['POISON']['obj'].button:IsMouseEnabled() and _G['SC'].SET.display.DPBUT then
_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(true)
end
end
else
if SC.SET.IsLocked == true then
if SC.OTHER['POISON']['obj']:GetAlpha() == 1 then
SC.OTHER['POISON']['obj']:SetAlpha(0)
if _G['SC'].SET.IsLocked == true then
if _G['SC'].OTHER['POISON']['obj']:GetAlpha() == 1 then
_G['SC'].OTHER['POISON']['obj']:SetAlpha(0)
end
if not combat and SC.OTHER['POISON']['obj'].button:IsMouseEnabled() then
--SC.OTHER['POISON']['obj'].button:EnableMouse(false)
if not combat and _G['SC'].OTHER['POISON']['obj'].button:IsMouseEnabled() then
--_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(false)
end
end
end
607,10 → 608,10
 
function SliceCommander:Latency()
local _
SC.tNow = GetTime()
if (SC.SET.PadLatency) then
_, _, SC.lag = GetNetStats()
SC.tNow = SC.tNow + (SC.lag*2/1000)
_G['SC'].tNow = GetTime()
if (_G['SC'].SET.PadLatency) then
_, _, _G['SC'].lag = GetNetStats()
_G['SC'].tNow = _G['SC'].tNow + (_G['SC'].lag*2/1000)
end
end
 
621,20 → 622,20
VTimerEnergyTxt:SetText(value)
 
if UnitPowerMax("player", Enum.PowerType.Energy) == UnitPower("player", Enum.PowerType.Energy) and not UnitAffectingCombat("player") then
SliceCommander:SetTransparency(SC.SET.EnergyTrans)
SliceCommander:SetTransparency(_G['SC'].SET.EnergyTrans)
else
SliceCommander:SetTransparency(SC.SET.FrameOpacity)
SliceCommander:SetTransparency(_G['SC'].SET.FrameOpacity)
end
end
 
function SliceCommander:GCD()
if not SC.OTHER['AS']['expire'] then return SC.OTHER['AS']['obj']:Hide() end
if not _G['SC'].OTHER['AS']['expire'] then return _G['SC'].OTHER['AS']['obj']:Hide() end
 
local val = (SC.OTHER['AS']['expire']-GetTime())
local val = (_G['SC'].OTHER['AS']['expire']-GetTime())
if val < 0 then
SC.OTHER['AS']['expire'] = nil
_G['SC'].OTHER['AS']['expire'] = nil
else
SC.OTHER['AS']['obj']:SetValue(val)
_G['SC'].OTHER['AS']['obj']:SetValue(val)
end
end
 
659,7 → 660,7
end
 
function SliceCommander:Pandemic(BAR, current)
if SC.SET.Pandemic and BAR['pandemic'] then
if _G['SC'].SET.Pandemic and BAR['pandemic'] then
local timers = BAR['pandemictimer']
local maxCP = UnitPowerMax("player", Enum.PowerType.ComboPoints)
if maxCP > 6 then
693,7 → 694,7
end
 
function SliceCommander:Tick(BAR, current)
if SC.SET.Tick and BAR['tick'] ~= nil and BAR['tick']['value'] ~= nil then
if _G['SC'].SET.Tick and BAR['tick'] ~= nil and BAR['tick']['value'] ~= nil then
local tick = BAR['tick']['value']
local _, maxValue = BAR['obj']:GetMinMaxValues()
local widthSeconde = (BAR['obj']:GetWidth())/maxValue
737,9 → 738,9
end
 
function SliceCommander:MultipleAbilityBar(spell)
local BAR = SC.BARS[spell]
local BAR = _G['SC'].BARS[spell]
local expire, duration, tempDuration, x, _, expire
if SC.SET.display[spell] ~= true then
if _G['SC'].SET.display[spell] ~= true then
BAR['expire'] = 0
if BAR['obj']:IsVisible() then
SliceCommander:HideBar(BAR)
756,8 → 757,8
for k, v in pairs(BAR.subbar) do
_, _, _, _, tempDuration, expire = SliceCommander:UnitAura("player", k, "HELPFUL PLAYER")
if expire ~= nil then
if SC.SET.RB[v] then
spellname[v] = SC.SET.RB[v]
if _G['SC'].SET.RB[v] then
spellname[v] = _G['SC'].SET.RB[v]
spellduration[v] = expire
end
if expire > BAR['expire'] then
767,20 → 768,20
end
end
 
if SC.tNow == nil then
SC.tNow = GetTime()
if _G['SC'].tNow == nil then
_G['SC'].tNow = GetTime()
end
if BAR['expire'] > 0 and SC.tNow < BAR['expire'] then
x = BAR['expire'] - SC.tNow
if BAR['expire'] > 0 and _G['SC'].tNow < BAR['expire'] then
x = BAR['expire'] - _G['SC'].tNow
else
x = 0
end
if x > 0 then
local xlast = SliceCommander:ShowBar(BAR, duration, false)
 
if SC.SET.SpellText == true then
if _G['SC'].SET.SpellText == true then
local displayConcatName = spell..'Name'
if SC.SET.display[displayConcatName] and next(spellname) ~= nil then
if _G['SC'].SET.display[displayConcatName] and next(spellname) ~= nil then
local label = ''
for k, v in pairs(spellduration) do
if v == BAR['expire'] then
792,7 → 793,7
end
for k, v in pairs(spellduration) do
if v ~= BAR['expire'] then
local xOther = v - SC.tNow
local xOther = v - _G['SC'].tNow
label = label .. ' - |cff33bb33' .. spellname[k] .. '|r'-- .. ' (' .. string.format("%0.1f", xOther) .. ')|r'
end
end
807,7 → 808,7
SliceCommander:Pandemic(BAR, x)
SliceCommander:SoundBar(BAR, x, xlast)
else
if SC.SET.flash[spell] == true and UnitAffectingCombat("player") then
if _G['SC'].SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
BAR['obj'].text:SetText('')
818,7 → 819,7
end
end
if not BAR['obj']:IsVisible() then
if SC.SET.SpellText == true then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name']))
else
BAR['obj'].text2:SetText('')
851,9 → 852,9
SlashCmdList["SLICECOMMANDER"] = function(msg, editbox)
local command, rest = msg:match("^(%S*)%s*(.-)$")
if command == "lock" or command == "unlock" then
SliceCommander:LockCkecked(not SC.SET.IsLocked)
SliceCommander:LockCkecked(not _G['SC'].SET.IsLocked)
elseif command == "eyefinity" and tonumber(rest) then
SC.SET.eyefinity = rest
_G['SC'].SET.eyefinity = rest
ReloadUI()
elseif command == "tot" then
if rest == nil or rest == '' or not tostring(rest) then
867,14 → 868,14
end
if rest and tostring(rest) then
rest = tostring(rest)
SC.SET.TOTTarget = rest
_G['SC'].SET.TOTTarget = rest
SliceCommander:CreateTOTMacro()
print(L['Macro update'])
else
print(L['Macro update failed!'])
end
elseif command == "resolution" and tostring(rest) then
SC.SET.fixedResolution = rest
_G['SC'].SET.fixedResolution = rest
ReloadUI()
else
InterfaceOptionsFrame_OpenToCategory("SliceCommander "..GetAddOnMetadata("SliceCommander", "Version"))
trunk/Core/StaticPopups.lua
21,22 → 21,23
local ChatEdit_FocusActiveWindow = ChatEdit_FocusActiveWindow
local STATICPOPUP_TEXTURE_ALERT = STATICPOPUP_TEXTURE_ALERT
local STATICPOPUP_TEXTURE_ALERTGEAR = STATICPOPUP_TEXTURE_ALERTGEAR
local _G = getfenv(0)
 
function SliceCommander:LoadPopup()
SC.PopupDialogs = {};
SC.StaticPopup_DisplayedFrames = {};
_G['SC'].PopupDialogs = {};
_G['SC'].StaticPopup_DisplayedFrames = {};
 
SC.PopupDialogs['FAILED_UISCALE'] = {
_G['SC'].PopupDialogs['FAILED_UISCALE'] = {
text = L["You have changed your UIScale, however you still have the PixelPerfect option enabled in SliceCommander. Press accept if you would like to disable the Auto Scale option."],
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = function() SC.SET.PixelPerfect = false; ReloadUI(); end,
OnAccept = function() _G['SC'].SET.PixelPerfect = false; ReloadUI(); end,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
 
SC.PopupDialogs["CONFIG_UNLOCK"] = {
_G['SC'].PopupDialogs["CONFIG_UNLOCK"] = {
text = L["SliceCommander frames are currently unlocked. Accept to relock them."],
button1 = ACCEPT,
OnAccept = function() SliceCommander:LockCkecked(true) end,
45,7 → 46,7
hideOnEscape = false,
}
 
SC.PopupDialogs["CONFIG_RL"] = {
_G['SC'].PopupDialogs["CONFIG_RL"] = {
text = L["One or more of the changes you have made require a ReloadUI."],
button1 = ACCEPT,
button2 = CANCEL,
55,7 → 56,7
hideOnEscape = false,
}
 
SC.PopupDialogs["FAILED_UISCALERESOLUTION"] = {
_G['SC'].PopupDialogs["FAILED_UISCALERESOLUTION"] = {
text = L["The resolution for the PixelPerfect option can not be found properly. You should try to change your client to fullscreen and then back to windowed. If does not fix the issue you can force the resolution for SliceCommander with the following macro '/sc resolution 1920x1080' (replace 1920x1080 by your resolution)."],
button1 = ACCEPT,
OnAccept = function() GameMenuButtonOptions:Click(); end,
70,7 → 71,7
function SliceCommander:StaticPopup_OnShow()
PlaySound("igMainMenuOpen");
 
local dialog = SC.PopupDialogs[self.which];
local dialog = _G['SC'].PopupDialogs[self.which];
local OnShow = dialog.OnShow;
 
if ( OnShow ) then
80,15 → 81,15
_G[self:GetName().."MoneyInputFrameGold"]:SetFocus();
end
if ( dialog.enterClicksFirstButton ) then
self:SetScript("OnKeyDown", SC.StaticPopup_OnKeyDown);
self:SetScript("OnKeyDown", _G['SC'].StaticPopup_OnKeyDown);
end
end
 
function SliceCommander:StaticPopup_EscapePressed()
local closed = nil;
for _, frame in pairs(SC.StaticPopup_DisplayedFrames) do
for _, frame in pairs(_G['SC'].StaticPopup_DisplayedFrames) do
if( frame:IsShown() and frame.hideOnEscape ) then
local standardDialog = SC.PopupDialogs[frame.which];
local standardDialog = _G['SC'].PopupDialogs[frame.which];
if ( standardDialog ) then
local OnCancel = standardDialog.OnCancel;
local noCancelOnEscape = standardDialog.noCancelOnEscape;
111,10 → 112,10
end
 
function SliceCommander:StaticPopup_CollapseTable()
if (SC.StaticPopup_DisplayedFrames == nil) then
if (_G['SC'].StaticPopup_DisplayedFrames == nil) then
SliceCommander:LoadPopup();
end
local displayedFrames = SC.StaticPopup_DisplayedFrames;
local displayedFrames = _G['SC'].StaticPopup_DisplayedFrames;
local index = #displayedFrames;
while ( ( index >= 1 ) and ( not displayedFrames[index]:IsShown() ) ) do
tremove(displayedFrames, index);
123,14 → 124,14
end
 
function SliceCommander:StaticPopup_SetUpPosition(dialog)
if not tContains(SC.StaticPopup_DisplayedFrames, dialog) then
local lastFrame = SC.StaticPopup_DisplayedFrames[#SC.StaticPopup_DisplayedFrames];
if not tContains(_G['SC'].StaticPopup_DisplayedFrames, dialog) then
local lastFrame = _G['SC'].StaticPopup_DisplayedFrames[#_G['SC'].StaticPopup_DisplayedFrames];
if lastFrame then
dialog:SCPoint("TOP", lastFrame, "BOTTOM", 0, -4);
else
dialog:SCPoint("TOP", UIParent, "TOP", 0, -100);
end
tinsert(SC.StaticPopup_DisplayedFrames, dialog);
tinsert(_G['SC'].StaticPopup_DisplayedFrames, dialog);
end
end
 
149,8 → 150,8
 
--Used to figure out if we can resize a frame
function SliceCommander:StaticPopup_IsLastDisplayedFrame(frame)
for i=#SC.StaticPopup_DisplayedFrames, 1, -1 do
local popup = SC.StaticPopup_DisplayedFrames[i];
for i=#_G['SC'].StaticPopup_DisplayedFrames, 1, -1 do
local popup = _G['SC'].StaticPopup_DisplayedFrames[i];
if ( popup:IsShown() ) then
return frame == popup
end
166,7 → 167,7
return;
end
 
local dialog = SC.PopupDialogs[self.which];
local dialog = _G['SC'].PopupDialogs[self.which];
if ( dialog ) then
if ( key == "ENTER" and dialog.enterClicksFirstButton ) then
local frameName = self:GetName();
193,7 → 194,7
 
SliceCommander:StaticPopup_CollapseTable();
 
local dialog = SC.PopupDialogs[self.which];
local dialog = _G['SC'].PopupDialogs[self.which];
local OnHide = dialog.OnHide;
if ( OnHide ) then
OnHide(self, self.data);
209,9 → 210,9
local which = self.which;
local timeleft = self.timeleft - elapsed;
if ( timeleft <= 0 ) then
if ( not SC.PopupDialogs[which].timeoutInformationalOnly ) then
if ( not _G['SC'].PopupDialogs[which].timeoutInformationalOnly ) then
self.timeleft = 0;
local OnCancel = SC.PopupDialogs[which].OnCancel;
local OnCancel = _G['SC'].PopupDialogs[which].OnCancel;
if ( OnCancel ) then
OnCancel(self, self.data, "timeout");
end
228,7 → 229,7
if ( timeleft <= 0 ) then
self.startDelay = nil;
local text = _G[self:GetName().."Text"];
text:SetFormattedText(SC.PopupDialogs[which].text, text.text_arg1, text.text_arg2);
text:SetFormattedText(_G['SC'].PopupDialogs[which].text, text.text_arg1, text.text_arg2);
local button1 = _G[self:GetName().."Button1"];
button1:Enable();
StaticPopup_Resize(self, which);
237,7 → 238,7
self.startDelay = timeleft;
end
 
local onUpdate = SC.PopupDialogs[self.which].OnUpdate;
local onUpdate = _G['SC'].PopupDialogs[self.which].OnUpdate;
if ( onUpdate ) then
onUpdate(self, elapsed);
end
248,7 → 249,7
return;
end
local which = self.which;
local info = SC.PopupDialogs[which];
local info = _G['SC'].PopupDialogs[which];
if ( not info ) then
return nil;
end
288,7 → 289,7
dialog = parent:GetParent();
end
if ( not self.autoCompleteParams or not AutoCompleteEditBox_OnEnterPressed(self) ) then
EditBoxOnEnterPressed = SC.PopupDialogs[which].EditBoxOnEnterPressed;
EditBoxOnEnterPressed = _G['SC'].PopupDialogs[which].EditBoxOnEnterPressed;
if ( EditBoxOnEnterPressed ) then
EditBoxOnEnterPressed(self, dialog.data);
end
296,7 → 297,7
end
 
function SliceCommander:StaticPopup_EditBoxOnEscapePressed()
local EditBoxOnEscapePressed = SC.PopupDialogs[self:GetParent().which].EditBoxOnEscapePressed;
local EditBoxOnEscapePressed = _G['SC'].PopupDialogs[self:GetParent().which].EditBoxOnEscapePressed;
if ( EditBoxOnEscapePressed ) then
EditBoxOnEscapePressed(self, self:GetParent().data);
end
304,7 → 305,7
 
function SliceCommander:StaticPopup_EditBoxOnTextChanged(userInput)
if ( not self.autoCompleteParams or not AutoCompleteEditBox_OnTextChanged(self, userInput) ) then
local EditBoxOnTextChanged = SC.PopupDialogs[self:GetParent().which].EditBoxOnTextChanged;
local EditBoxOnTextChanged = _G['SC'].PopupDialogs[self:GetParent().which].EditBoxOnTextChanged;
if ( EditBoxOnTextChanged ) then
EditBoxOnTextChanged(self, self:GetParent().data);
end
312,7 → 313,7
end
 
function SliceCommander:StaticPopup_FindVisible(which, data)
local info = SC.PopupDialogs[which];
local info = _G['SC'].PopupDialogs[which];
if ( not info ) then
return nil;
end
326,7 → 327,7
end
 
function SliceCommander:StaticPopup_Resize(dialog, which)
local info = SC.PopupDialogs[which];
local info = _G['SC'].PopupDialogs[which];
if ( not info ) then
return nil;
end
380,10 → 381,10
 
local tempButtonLocs = {}; --So we don't make a new table each time.
function SliceCommander:StaticPopup_Show(which, text_arg1, text_arg2, data)
if SC.PopupDialogs == nil then
if _G['SC'].PopupDialogs == nil then
SliceCommander:LoadPopup()
end
local info = SC.PopupDialogs[which];
local info = _G['SC'].PopupDialogs[which];
if not info then
return nil;
end
407,7 → 408,7
local frame = _G["SliceCommander_StaticPopup"..index];
if ( frame:IsShown() and (frame.which == info.cancels) ) then
frame:Hide();
local OnCancel = SC.PopupDialogs[frame.which].OnCancel;
local OnCancel = _G['SC'].PopupDialogs[frame.which].OnCancel;
if ( OnCancel ) then
OnCancel(frame, frame.data, "override");
end
512,9 → 513,9
_G[dialog:GetName().."MoneyFrame"]:Hide();
-- Set OnEnterPress for money input frames
if ( info.EditBoxOnEnterPressed ) then
moneyInputFrame.gold:SetScript("OnEnterPressed", SC.StaticPopup_EditBoxOnEnterPressed);
moneyInputFrame.silver:SetScript("OnEnterPressed", SC.StaticPopup_EditBoxOnEnterPressed);
moneyInputFrame.copper:SetScript("OnEnterPressed", SC.StaticPopup_EditBoxOnEnterPressed);
moneyInputFrame.gold:SetScript("OnEnterPressed", _G['SC'].StaticPopup_EditBoxOnEnterPressed);
moneyInputFrame.silver:SetScript("OnEnterPressed", _G['SC'].StaticPopup_EditBoxOnEnterPressed);
moneyInputFrame.copper:SetScript("OnEnterPressed", _G['SC'].StaticPopup_EditBoxOnEnterPressed);
else
moneyInputFrame.gold:SetScript("OnEnterPressed", nil);
moneyInputFrame.silver:SetScript("OnEnterPressed", nil);
667,17 → 668,17
end
 
function SliceCommander:Contruct_StaticPopups()
SC.StaticPopupFrames = {}
_G['SC'].StaticPopupFrames = {}
 
for index = 1, MAX_STATIC_POPUPS do
SC.StaticPopupFrames[index] = CreateFrame('Frame', 'SliceCommander_StaticPopup'..index, UIParent, 'StaticPopupTemplate')
SC.StaticPopupFrames[index]:SetID(index)
_G['SC'].StaticPopupFrames[index] = CreateFrame('Frame', 'SliceCommander_StaticPopup'..index, UIParent, 'StaticPopupTemplate')
_G['SC'].StaticPopupFrames[index]:SetID(index)
 
--Fix Scripts
SC.StaticPopupFrames[index]:SetScript('OnShow', SC.StaticPopup_OnShow)
SC.StaticPopupFrames[index]:SetScript('OnHide', SC.StaticPopup_OnHide)
SC.StaticPopupFrames[index]:SetScript('OnUpdate', SC.StaticPopup_OnUpdate)
SC.StaticPopupFrames[index]:SetScript('OnEvent', SC.StaticPopup_OnEvent)
_G['SC'].StaticPopupFrames[index]:SetScript('OnShow', _G['SC'].StaticPopup_OnShow)
_G['SC'].StaticPopupFrames[index]:SetScript('OnHide', _G['SC'].StaticPopup_OnHide)
_G['SC'].StaticPopupFrames[index]:SetScript('OnUpdate', _G['SC'].StaticPopup_OnUpdate)
_G['SC'].StaticPopupFrames[index]:SetScript('OnEvent', _G['SC'].StaticPopup_OnEvent)
 
for i = 1, 3 do
_G['SliceCommander_StaticPopup'..index..'Button'..i]:SetScript('OnClick', function(self)
685,9 → 686,9
end)
end
 
_G['SliceCommander_StaticPopup'..index..'EditBox']:SetScript('OnEnterPressed', SC.StaticPopup_EditBoxOnEnterPressed)
_G['SliceCommander_StaticPopup'..index..'EditBox']:SetScript('OnEscapePressed', SC.StaticPopup_EditBoxOnEscapePressed)
_G['SliceCommander_StaticPopup'..index..'EditBox']:SetScript('OnTextChanged', SC.StaticPopup_EditBoxOnTextChanged)
_G['SliceCommander_StaticPopup'..index..'EditBox']:SetScript('OnEnterPressed', _G['SC'].StaticPopup_EditBoxOnEnterPressed)
_G['SliceCommander_StaticPopup'..index..'EditBox']:SetScript('OnEscapePressed', _G['SC'].StaticPopup_EditBoxOnEscapePressed)
_G['SliceCommander_StaticPopup'..index..'EditBox']:SetScript('OnTextChanged', _G['SC'].StaticPopup_EditBoxOnTextChanged)
 
end
 
trunk/Core/Settings.lua
2,8 → 2,8
local AceConfig = LibStub("AceConfig-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("SliceCommander")
local LSM = LibStub("LibSharedMedia-3.0")
local _G = getfenv(0)
 
 
function SliceCommander:getOrder()
_G['SC'].order = _G['SC'].order+1
 
16,7 → 16,7
local cd
 
local count = 0
for k, v in pairs(SC.SET.Pos) do
for k, v in pairs(_G['SC'].SET.Pos) do
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
66,10 → 66,10
desc = SliceCommander:getColorCDDescription(spell),
type = "color",
set = function(info, r, g, b)
SC.BARS[spell]['obj']:SetStatusBarColor(r, g, b)
SC.BARS[spell]['color'] = {r, g, b}
_G['SC'].BARS[spell]['obj']:SetStatusBarColor(r, g, b)
_G['SC'].BARS[spell]['color'] = {r, g, b}
end,
get = function(info) return unpack(SC.BARS[spell]['color']) end
get = function(info) return unpack(_G['SC'].BARS[spell]['color']) end
}
end
 
80,11 → 80,11
desc = L["CP color"],
type = "color",
set = function(info, r, g, b)
SC.SET.CP[type][id] = {r, g, b }
_G['SC'].SET.CP[type][id] = {r, g, b }
local maxCP = UnitPowerMax("player", SPELL_POWER_COMBO_POINTS)
SC.BARS['CP']['obj'].combos[id].bg:SetVertexColor(unpack(SC.SET.CP[maxCP][id]))
_G['SC'].BARS['CP']['obj'].combos[id].bg:SetVertexColor(unpack(_G['SC'].SET.CP[maxCP][id]))
end,
get = function(info) return unpack(SC.SET.CP[type][id]) end
get = function(info) return unpack(_G['SC'].SET.CP[type][id]) end
}
end
 
97,9 → 97,9
width = "full",
values = SliceCommander:ArrayPos(),
set = function(info,val)
SC.SET.Pos[spell] = val
_G['SC'].SET.Pos[spell] = val
end,
get = function(info) return SC.SET.Pos[spell] end
get = function(info) return _G['SC'].SET.Pos[spell] end
}
end
 
134,9 → 134,9
desc = SliceCommander:getShowCDDescription(spell),
type = "toggle",
set = function(info,val)
SC.SET.display[spell] = val
_G['SC'].SET.display[spell] = val
end,
get = function(info) return SC.SET.display[spell] end
get = function(info) return _G['SC'].SET.display[spell] end
}
end
 
147,9 → 147,9
desc = L["The bar will keep flashing when it should be use."],
type = "toggle",
set = function(info,val)
SC.SET.flash[spell] = val
_G['SC'].SET.flash[spell] = val
end,
get = function(info) return SC.SET.flash[spell] end
get = function(info) return _G['SC'].SET.flash[spell] end
}
end
 
182,7 → 182,7
['Pos'..spell] = SliceCommander:getPosSetting(spell),
['Flash'..spell] = SliceCommander:getFlashSetting(spell)
}
if SC.SET.SpellSound ~= nil and SC.SET.SpellSound then
if _G['SC'].SET.SpellSound ~= nil and _G['SC'].SET.SpellSound then
args.SpellSound = SliceCommander:getSpellSound(spell)
end
return {
205,7 → 205,7
['Pos'..spell] = SliceCommander:getPosSetting(spell),
['CDFlash'..spell] = SliceCommander:getFlashSetting(spell)
}
if SC.SET.SpellSound ~= nil and SC.SET.SpellSound then
if _G['SC'].SET.SpellSound ~= nil and _G['SC'].SET.SpellSound then
args.CDSpellSound = SliceCommander:getCDSpellSound(spell)
end
return {
223,8 → 223,8
desc = string.format(L["%s text."], SC_SPELL[spell]),
type = "input",
width = "half",
set = function(info,val) SC.SET.RB[spell] = val end,
get = function(info) return SC.SET.RB[spell] end
set = function(info,val) _G['SC'].SET.RB[spell] = val end,
get = function(info) return _G['SC'].SET.RB[spell] end
}
end
 
249,7 → 249,7
['CDPos'..spell] = SliceCommander:getPosSetting(spell..'CD'),
['CDFlash'..spell] = SliceCommander:getFlashSetting(spell..'CD')
}
if SC.SET.SpellSound ~= nil and SC.SET.SpellSound then
if _G['SC'].SET.SpellSound ~= nil and _G['SC'].SET.SpellSound then
args.SpellSound = SliceCommander:getSpellSound(spell)
args.CDSpellSound = SliceCommander:getCDSpellSound(spell..'CD')
end
304,10 → 304,10
step = 1,
bigStep = 1,
set = function(info,val)
SC.SET.Energy[spec][id] = val
_G['SC'].SET.Energy[spec][id] = val
SliceCommander:SetSparks()
end,
get = function(info) return SC.SET.Energy[spec][id] end,
get = function(info) return _G['SC'].SET.Energy[spec][id] end,
isPercent = false
}
end
334,12 → 334,12
dialogControl = 'LSM30_Sound',
values = LSM:HashTable("sound"),
set = function(info,val)
SC.BARS[spell]['sound'][id] = val
_G['SC'].BARS[spell]['sound'][id] = val
end,
get = function(info)
if SC.BARS[spell]['sound'] == nil then SC.BARS[spell]['sound'] = {} end
if SC.BARS[spell]['sound'][id] == nil then SC.BARS[spell]['sound'][id] = 'None' end
return SC.BARS[spell]['sound'][id]
if _G['SC'].BARS[spell]['sound'] == nil then _G['SC'].BARS[spell]['sound'] = {} end
if _G['SC'].BARS[spell]['sound'][id] == nil then _G['SC'].BARS[spell]['sound'][id] = 'None' end
return _G['SC'].BARS[spell]['sound'][id]
end
}
end
378,8 → 378,8
name = L["Sound Combat"],
desc = L["Disable sounds out of combat"],
type = "toggle",
set = function(info,val) SC.SET.SoundCombat = val end,
get = function(info) return SC.SET.SoundCombat end
set = function(info,val) _G['SC'].SET.SoundCombat = val end,
get = function(info) return _G['SC'].SET.SoundCombat end
},
SoundChannel = {
order = SliceCommander:getOrder(),
396,9 → 396,9
return returnArray
end,
set = function(info,val)
SC.SET.soundChannel = val
_G['SC'].SET.soundChannel = val
end,
get = function(info) return SC.SET.soundChannel end
get = function(info) return _G['SC'].SET.soundChannel end
},
SoundVolume = {
order = SliceCommander:getOrder(),
421,14 → 421,14
desc = L["Each spell will have full sound personalization in their respective settings."],
type = "toggle",
set = function(info,val)
SC.SET.SpellSound = val
_G['SC'].SET.SpellSound = val
SliceCommander:StaticPopup_Show('CONFIG_RL')
end,
get = function(info)
if SC.SET.SpellSound == nil then
SC.SET.SpellSound = false
if _G['SC'].SET.SpellSound == nil then
_G['SC'].SET.SpellSound = false
end
return SC.SET.SpellSound
return _G['SC'].SET.SpellSound
end
},
ForceCDSpellSound = {
437,13 → 437,13
desc = L["Force the cooldown sound to be play even if you are not in combat."],
type = "toggle",
set = function(info,val)
SC.SET.ForceCDSpellSound = val
_G['SC'].SET.ForceCDSpellSound = val
end,
get = function(info)
if SC.SET.ForceCDSpellSound == nil then
SC.SET.ForceCDSpellSound = false
if _G['SC'].SET.ForceCDSpellSound == nil then
_G['SC'].SET.ForceCDSpellSound = false
end
return SC.SET.ForceCDSpellSound
return _G['SC'].SET.ForceCDSpellSound
end
},
}
511,10 → 511,10
desc = L["Show HP value rather than health percentage."],
type = "toggle",
set = function(info,val)
SC.SET.HEALTH.value = val
_G['SC'].SET.HEALTH.value = val
SliceCommander:HealthBar('HEALTH')
end,
get = function(info) return SC.SET.HEALTH.value end
get = function(info) return _G['SC'].SET.HEALTH.value end
},
healthCombat = {
order = SliceCommander:getOrder(),
522,10 → 522,10
desc = L["Hide health bar when you are not in combat."],
type = "toggle",
set = function(info,val)
SC.SET.HEALTH.HideCombat = val
_G['SC'].SET.HEALTH.HideCombat = val
SliceCommander:HealthBar('HEALTH')
end,
get = function(info) return SC.SET.HEALTH.HideCombat end
get = function(info) return _G['SC'].SET.HEALTH.HideCombat end
},
MidHealthUnder = {
order = SliceCommander:getOrder(),
535,10 → 535,10
dialogControl = 'LSM30_Sound',
values = LSM:HashTable("sound"),
set = function(info,val)
SC.SET.HEALTH.MidUnder = val
_G['SC'].SET.HEALTH.MidUnder = val
end,
get = function(info)
return SC.SET.HEALTH.MidUnder
return _G['SC'].SET.HEALTH.MidUnder
end
},
LowHealthUnder = {
549,10 → 549,10
dialogControl = 'LSM30_Sound',
values = LSM:HashTable("sound"),
set = function(info,val)
SC.SET.HEALTH.LowUnder = val
_G['SC'].SET.HEALTH.LowUnder = val
end,
get = function(info)
return SC.SET.HEALTH.LowUnder
return _G['SC'].SET.HEALTH.LowUnder
end
},
}
570,10 → 570,10
desc = L["Show HP value rather than health percentage."],
type = "toggle",
set = function(info,val)
SC.SET.THEALTH.value = val
_G['SC'].SET.THEALTH.value = val
SliceCommander:HealthBar('THEALTH')
end,
get = function(info) return SC.SET.THEALTH.value end
get = function(info) return _G['SC'].SET.THEALTH.value end
},
healthCombat = {
order = SliceCommander:getOrder(),
581,10 → 581,10
desc = L["Hide health bar when you are not in combat."],
type = "toggle",
set = function(info,val)
SC.SET.THEALTH.HideCombat = val
_G['SC'].SET.THEALTH.HideCombat = val
SliceCommander:HealthBar('THEALTH')
end,
get = function(info) return SC.SET.THEALTH.HideCombat end
get = function(info) return _G['SC'].SET.THEALTH.HideCombat end
},
}
},
602,9 → 602,9
type = "toggle",
width = "full",
set = function(info,val)
SC.SET.ThreatGroupOnly = val
_G['SC'].SET.ThreatGroupOnly = val
end,
get = function(info) return SC.SET.ThreatGroupOnly end
get = function(info) return _G['SC'].SET.ThreatGroupOnly end
},
}
},
619,9 → 619,9
desc = string.format(L["Display the %s icon when the timer left on your poison go under specified time. If you are in combat it only display the icon when it fade out."], SC_SPELL['DP']),
type = "toggle",
set = function(info,val)
SC.SET.display.DPICON = val
_G['SC'].SET.display.DPICON = val
end,
get = function(info) return SC.SET.display.DPICON end
get = function(info) return _G['SC'].SET.display.DPICON end
},
DPTimeCheck = {
order = SliceCommander:getOrder(),
634,12 → 634,12
bigStep = 5,
set = function(info,val)
if strmatch(val,"%d") then
SC.SET.display.DPTIME = val
_G['SC'].SET.display.DPTIME = val
else
SC.SET.display.DPTIME = 10
_G['SC'].SET.display.DPTIME = 10
end
end,
get = function(info) return SC.SET.display.DPTIME end
get = function(info) return _G['SC'].SET.display.DPTIME end
},
DPButtonEnable = {
order = SliceCommander:getOrder(),
647,9 → 647,9
desc = L["Enable poison button has no effect if poison icon is not shown. If it is enable there is two restrinction: You can't click through the area where the icon was when the icon is hide in combat and the button does not work when the icon is shown in combat."],
type = "toggle",
set = function(info,val)
SC.SET.display.DPBUT = val
_G['SC'].SET.display.DPBUT = val
end,
get = function(info) return SC.SET.display.DPBUT end
get = function(info) return _G['SC'].SET.display.DPBUT end
},
DPSound = {
order = SliceCommander:getOrder(),
659,9 → 659,9
dialogControl = 'LSM30_Sound',
values = LSM:HashTable("sound"),
set = function(info,val)
SC.SET.DPSound = val
_G['SC'].SET.DPSound = val
end,
get = function(info) return SC.SET.DPSound end
get = function(info) return _G['SC'].SET.DPSound end
},
}
},
706,10 → 706,10
desc = L["Write a macro which Tricks the target if it is friendly, if not the target of target. Except if a modifier is down the Tricks will target the player name specify here."],
type = "input",
set = function(info,val)
SC.SET.TOTTarget = val
_G['SC'].SET.TOTTarget = val
SliceCommander:CreateTOTMacro()
end,
get = function(info) return SC.SET.TOTTarget end
get = function(info) return _G['SC'].SET.TOTTarget end
},
}
},
733,8 → 733,8
name = L["Enable kick warning"],
desc = L["If enable, a warning message will be display when you succeed to interrupts spellcasting."],
type = "toggle",
set = function(info,val) SC.SET.kickEnable = val end,
get = function(info) return SC.SET.kickEnable end
set = function(info,val) _G['SC'].SET.kickEnable = val end,
get = function(info) return _G['SC'].SET.kickEnable end
},
kickChannel = {
order = SliceCommander:getOrder(),
747,8 → 747,8
['PARTY'] = L["Party"],
['SAY'] = L["Say"]
},
set = function(info, key, val) SC.SET.kickChannel[key] = val end,
get = function(info, key) return SC.SET.kickChannel[key] end
set = function(info, key, val) _G['SC'].SET.kickChannel[key] = val end,
get = function(info, key) return _G['SC'].SET.kickChannel[key] end
},
kickMessage = {
order = SliceCommander:getOrder(),
756,16 → 756,16
desc = L["The warning message which will be display when you kick is successful."],
type = "input",
width = "full",
set = function(info,val) SC.SET.kickMessage = val end,
get = function(info) return SC.SET.kickMessage end
set = function(info,val) _G['SC'].SET.kickMessage = val end,
get = function(info) return _G['SC'].SET.kickMessage end
},
kickSpell = {
order = SliceCommander:getOrder(),
name = L["Add spell"],
desc = L["Add kicked spell at the start of the message."],
type = "toggle",
set = function(info,val) SC.SET.kickSpell = val end,
get = function(info) return SC.SET.kickSpell end
set = function(info,val) _G['SC'].SET.kickSpell = val end,
get = function(info) return _G['SC'].SET.kickSpell end
},
}
},
902,12 → 902,12
set = function(info,val)
local aSpec = GetSpecialization()
if aSpec == 1 then
SC.OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[val])
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[val])
end
SC.SET.poison.mh[1] = val
_G['SC'].SET.poison.mh[1] = val
end,
get = function(info)
return SC.SET.poison.mh[1]
return _G['SC'].SET.poison.mh[1]
end
},
Utility = {
920,12 → 920,12
set = function(info,val)
local aSpec = GetSpecialization()
if aSpec == 1 then
SC.OTHER['POISON']['obj'].button:SetAttribute("spell2", SC_SPELL[val])
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell2", SC_SPELL[val])
end
SC.SET.poison.oh[1] = val
_G['SC'].SET.poison.oh[1] = val
end,
get = function(info)
return SC.SET.poison.oh[1]
return _G['SC'].SET.poison.oh[1]
end
},
}
1024,13 → 1024,13
set = function(info,val)
local aSpec = GetSpecialization()
if aSpec == 2 then
SC.OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[val])
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[val])
end
SC.OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[val])
SC.SET.poison.mh[2] = val
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[val])
_G['SC'].SET.poison.mh[2] = val
end,
get = function(info)
return SC.SET.poison.mh[2]
return _G['SC'].SET.poison.mh[2]
end
},
Utility = {
1043,12 → 1043,12
set = function(info,val)
local aSpec = GetSpecialization()
if aSpec == 2 then
SC.OTHER['POISON']['obj'].button:SetAttribute("spell2", SC_SPELL[val])
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell2", SC_SPELL[val])
end
SC.SET.poison.oh[2] = val
_G['SC'].SET.poison.oh[2] = val
end,
get = function(info)
return SC.SET.poison.oh[2]
return _G['SC'].SET.poison.oh[2]
end
},
}
1087,9 → 1087,9
desc = L["Each active buff actually up will be displayed in the spell name."],
type = "toggle",
set = function(info,val)
SC.SET.display.RBName = val
_G['SC'].SET.display.RBName = val
end,
get = function(info) return SC.SET.display.RBName end
get = function(info) return _G['SC'].SET.display.RBName end
},
SC = SliceCommander:getRBSetting('SC'),
GM = SliceCommander:getRBSetting('GM'),
1121,19 → 1121,19
desc = L["Enable mario star music during Adrenaline rush buff"],
type = "toggle",
set = function(info,val)
if SC.BARS['AR']['sound'] == nil then SC.BARS['AR']['sound'] = {} end
if _G['SC'].BARS['AR']['sound'] == nil then _G['SC'].BARS['AR']['sound'] = {} end
if val then
SliceCommander:PlaySoundReal('Mario')
SC.BARS['AR']['sound']['applied'] = 'Mario'
_G['SC'].BARS['AR']['sound']['applied'] = 'Mario'
else
if SC.previousSound then
StopSound(SC.previousSound)
if _G['SC'].previousSound then
StopSound(_G['SC'].previousSound)
end
SC.BARS['AR']['sound']['applied'] = 'None'
_G['SC'].BARS['AR']['sound']['applied'] = 'None'
end
SC.SET.ARMarioMod = val
_G['SC'].SET.ARMarioMod = val
end,
get = function(info) return SC.SET.ARMarioMod end
get = function(info) return _G['SC'].SET.ARMarioMod end
},
headerCD = {
type = "header",
1173,7 → 1173,7
}
}
}
if SC.SET.SpellSound ~= nil and SC.SET.SpellSound then
if _G['SC'].SET.SpellSound ~= nil and _G['SC'].SET.SpellSound then
SC_OptionsTable["Outlaw"]['args']['Skills']['args']['AR']['args']['ARCDSpellSound'] = SliceCommander:getCDSpellSound('ARCD')
end
 
1224,12 → 1224,12
set = function(info,val)
local aSpec = GetSpecialization()
if aSpec == 3 then
SC.OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[val])
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[val])
end
SC.SET.poison.mh[3] = val
_G['SC'].SET.poison.mh[3] = val
end,
get = function(info)
return SC.SET.poison.mh[3]
return _G['SC'].SET.poison.mh[3]
end
},
Utility = {
1242,12 → 1242,12
set = function(info,val)
local aSpec = GetSpecialization()
if aSpec == 3 then
SC.OTHER['POISON']['obj'].button:SetAttribute("spell2", SC_SPELL[val])
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell2", SC_SPELL[val])
end
SC.SET.poison.oh[3] = val
_G['SC'].SET.poison.oh[3] = val
end,
get = function(info)
return SC.SET.poison.oh[3]
return _G['SC'].SET.poison.oh[3]
end
},
}
1374,39 → 1374,39
set = function(info,val)
SliceCommander:LockCkecked(val)
end,
get = function(info) return SC.SET.IsLocked end
get = function(info) return _G['SC'].SET.IsLocked end
},
FullTimer = {--Full timer
order = SliceCommander:getOrder(),
name = L["Full Timer"],
desc = L["Make timer full bar duration"],
type = "toggle",
set = function(info,val) SC.SET.FullTimer = val end,
get = function(info) return SC.SET.FullTimer end
set = function(info,val) _G['SC'].SET.FullTimer = val end,
get = function(info) return _G['SC'].SET.FullTimer end
},
PadLatency = {--Latency
order = SliceCommander:getOrder(),
name = L["Enable Latency"],
desc = L["Pad Alerts with Latency"],
type = "toggle",
set = function(info,val) SC.SET.PadLatency = val end,
get = function(info) return SC.SET.PadLatency end
set = function(info,val) _G['SC'].SET.PadLatency = val end,
get = function(info) return _G['SC'].SET.PadLatency end
},
SpellText = {--Spell text
order = SliceCommander:getOrder(),
name = L["Spell Text"],
desc = L["Enable spell text on bars"],
type = "toggle",
set = function(info,val) SC.SET.SpellText = val end,
get = function(info) return SC.SET.SpellText end
set = function(info,val) _G['SC'].SET.SpellText = val end,
get = function(info) return _G['SC'].SET.SpellText end
},
GCD = {--Spell text
order = SliceCommander:getOrder(),
name = L["GCD Bar"],
desc = L["Enable GCD bar"],
type = "toggle",
set = function(info,val) SC.SET.displayGCD = val end,
get = function(info) return SC.SET.displayGCD end
set = function(info,val) _G['SC'].SET.displayGCD = val end,
get = function(info) return _G['SC'].SET.displayGCD end
},
PixelPerfect = {
order = SliceCommander:getOrder(),
1414,10 → 1414,10
desc = L["Should be enabled. If you change this option state you have to reload interface. This option is automatically disabled after a reload to only force uiscale one time."],
type = "toggle",
set = function(info,val)
SC.SET.PixelPerfect = val
_G['SC'].SET.PixelPerfect = val
SliceCommander:StaticPopup_Show('CONFIG_RL')
end,
get = function(info) return SC.SET.PixelPerfect end
get = function(info) return _G['SC'].SET.PixelPerfect end
},
skinEnable = {
order = SliceCommander:getOrder(),
1425,11 → 1425,11
desc = L["Add a border like the one on Tukui."],
type = "toggle",
set = function(info,val)
SC.SET.skin = val
_G['SC'].SET.skin = val
SliceCommander:ApplySkin(val)
SliceCommander:ShowHideBorder(val)
end,
get = function(info) return SC.SET.skin end
get = function(info) return _G['SC'].SET.skin end
},
headerDisplaySetting = {--CDisplay Setting
order = SliceCommander:getOrder(),
1446,10 → 1446,10
step = 1,
bigStep = 1,
set = function(info,val)
SC.SET.IconSize = val
_G['SC'].SET.IconSize = val
SliceCommander:SetIconSize(val)
end,
get = function(info) return SC.SET.IconSize end,
get = function(info) return _G['SC'].SET.IconSize end,
isPercent = false
},
Width = {--Width
1462,17 → 1462,17
step = 1,
bigStep = 5,
set = function(info,val)
SC.SET.Width = val
if SC.SET.skin then
_G['SC'].SET.Width = val
if _G['SC'].SET.skin then
SliceCommander:ApplySkin(false)
end
SliceCommander:SetWidth(val)
if SC.SET.skin then
if _G['SC'].SET.skin then
SliceCommander:ApplySkin(true)
end
 
end,
get = function(info) return SC.SET.Width end,
get = function(info) return _G['SC'].SET.Width end,
isPercent = false
},
TimerHeight = {--Timer height
1485,11 → 1485,11
step = 1,
bigStep = 1,
set = function(info,val)
SC.SET.TimerHeight = val
_G['SC'].SET.TimerHeight = val
SliceCommander:SetTimersHeight(val)
SliceCommander:ApplySkin(SC.SET.skin)
SliceCommander:ApplySkin(_G['SC'].SET.skin)
end,
get = function(info) return SC.SET.TimerHeight end,
get = function(info) return _G['SC'].SET.TimerHeight end,
isPercent = false
},
BarMargin = {--Margin
1501,8 → 1501,8
max = 10,
step = 1,
bigStep = 1,
set = function(info,val) SC.SET.BarMargin = val end,
get = function(info) return SC.SET.BarMargin end,
set = function(info,val) _G['SC'].SET.BarMargin = val end,
get = function(info) return _G['SC'].SET.BarMargin end,
isPercent = false
},
FrameOpacity = {--Opacity
1516,9 → 1516,9
bigStep = 1,
set = function(info,val)
SliceCommander:FrameOpacity(val)
SC.SET.FrameOpacity = val
_G['SC'].SET.FrameOpacity = val
end,
get = function(info) return SC.SET.FrameOpacity end,
get = function(info) return _G['SC'].SET.FrameOpacity end,
isPercent = false
},
BarTexture = {--Texture
1529,10 → 1529,10
dialogControl = 'LSM30_Statusbar',
values = LSM:HashTable("statusbar"),
set = function(info,val)
SC.SET.BarTexture = val
_G['SC'].SET.BarTexture = val
SliceCommander:Config_RetextureBars(SliceCommander:BarTexture())
end,
get = function(info) return SC.SET.BarTexture end
get = function(info) return _G['SC'].SET.BarTexture end
},
Font = {
order = SliceCommander:getOrder(),
1541,10 → 1541,10
dialogControl = 'LSM30_Font',
values = LSM:HashTable("font"),
set = function(info,val)
SC.SET.font = val
_G['SC'].SET.font = val
SliceCommander:StaticPopup_Show('CONFIG_RL')
end,
get = function(info) return SC.SET.font end
get = function(info) return _G['SC'].SET.font end
},
headerEnergySetting = {
order = SliceCommander:getOrder(),
1562,9 → 1562,9
else
VTimerEnergy:Show()
end
SC.SET.HideEnergy = val
_G['SC'].SET.HideEnergy = val
end,
get = function(info) return SC.SET.HideEnergy end
get = function(info) return _G['SC'].SET.HideEnergy end
},
EnergyHeight = {
order = SliceCommander:getOrder(),
1576,10 → 1576,10
step = 1,
bigStep = 1,
set = function(info,val)
SC.SET.EnergyHeight = val
_G['SC'].SET.EnergyHeight = val
SliceCommander:SetEnergyHeight(val)
end,
get = function(info) return SC.SET.EnergyHeight end,
get = function(info) return _G['SC'].SET.EnergyHeight end,
isPercent = false
},
EnergyTrans = {
1593,9 → 1593,9
bigStep = 1,
set = function(info,val)
SliceCommander:SetTransparency(val)
SC.SET.EnergyTrans = val
_G['SC'].SET.EnergyTrans = val
end,
get = function(info) return SC.SET.EnergyTrans end,
get = function(info) return _G['SC'].SET.EnergyTrans end,
isPercent = false
},
EnergyColor = {
1604,9 → 1604,9
type = "color",
set = function(info, r, g, b)
VTimerEnergy:SetStatusBarColor(r, g, b)
SC.SET.energyColor = {r, g, b}
_G['SC'].SET.energyColor = {r, g, b}
end,
get = function(info) return unpack(SC.SET.energyColor) end
get = function(info) return unpack(_G['SC'].SET.energyColor) end
},
headerTicksSetting = {
order = SliceCommander:getOrder(),
1620,9 → 1620,9
type = "toggle",
width = "full",
set = function(info,val)
SC.SET.Pandemic = val
_G['SC'].SET.Pandemic = val
end,
get = function(info) return SC.SET.Pandemic end
get = function(info) return _G['SC'].SET.Pandemic end
},
TickToggle = {
order = SliceCommander:getOrder(),
1631,9 → 1631,9
type = "toggle",
width = "full",
set = function(info,val)
SC.SET.Tick = val
_G['SC'].SET.Tick = val
end,
get = function(info) return SC.SET.Tick end
get = function(info) return _G['SC'].SET.Tick end
},
}
}
trunk/Core/Event.lua
1,4 → 1,5
local L = LibStub("AceLocale-3.0"):GetLocale("SliceCommander")
local _G = getfenv(0)
 
function SliceCommander:UNIT_HEALTH(_, unitID)
if unitID == "player" then
20,19 → 21,19
--13:extraSpellID 14:extraSpellName 15:extraSchool
function SliceCommander:COMBAT_LOG_EVENT_UNFILTERED()
local _, event, _, _, sourceName, _, _, _, _, _, _, _, _, _, extraSpellID = CombatLogGetCurrentEventInfo()
if event == "SPELL_INTERRUPT" and sourceName == UnitName("player") and SC.SET.kickEnable == true then
local message = SC.SET.kickMessage
if SC.SET.kickSpell then
if event == "SPELL_INTERRUPT" and sourceName == UnitName("player") and _G['SC'].SET.kickEnable == true then
local message = _G['SC'].SET.kickMessage
if _G['SC'].SET.kickSpell then
local link = GetSpellLink(extraSpellID)
message = link..' > '..message
end
if SC.SET.kickChannel['INSTANCE_CHAT'] and IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
if _G['SC'].SET.kickChannel['INSTANCE_CHAT'] and IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
SendChatMessage(message, 'INSTANCE_CHAT')
elseif SC.SET.kickChannel['RAID'] and IsInRaid() then
elseif _G['SC'].SET.kickChannel['RAID'] and IsInRaid() then
SendChatMessage(message, 'RAID')
elseif SC.SET.kickChannel['PARTY'] and IsInGroup() then
elseif _G['SC'].SET.kickChannel['PARTY'] and IsInGroup() then
SendChatMessage(message, 'PARTY')
elseif SC.SET.kickChannel['SAY'] then
elseif _G['SC'].SET.kickChannel['SAY'] then
SendChatMessage(message, 'SAY')
end
end
54,30 → 55,30
end
 
function SliceCommander:UNIT_SPELLCAST_START(_, unit, _, spellId)
if unit == "player" and SC.SET.displayGCD then
if unit == "player" and _G['SC'].SET.displayGCD then
local start, dur = GetSpellCooldown(spellId)
if dur and dur > 0 and dur <= 1.5 then
SC.OTHER['AS']['expire'] = start+dur
SC.OTHER['AS']['obj']:SetMinMaxValues(0, dur)
SC.OTHER['AS']['obj']:Show()
_G['SC'].OTHER['AS']['expire'] = start+dur
_G['SC'].OTHER['AS']['obj']:SetMinMaxValues(0, dur)
_G['SC'].OTHER['AS']['obj']:Show()
end
end
end
 
function SliceCommander:UNIT_MAXPOWER(_, UnitId, PowyerType)
if SC.initDone and UnitId == "player" and PowyerType == "COMBO_POINTS" then
if _G['SC'].initDone and UnitId == "player" and PowyerType == "COMBO_POINTS" then
--Update CP Bar
local maxCP = UnitPowerMax("player", Enum.PowerType.ComboPoints)
 
for i = 1, maxCP do
SC.BARS['CP']['obj'].combos[i].bg:SetVertexColor(unpack(SC.SET.CP[maxCP][i]))
_G['SC'].BARS['CP']['obj'].combos[i].bg:SetVertexColor(unpack(_G['SC'].SET.CP[maxCP][i]))
end
for i = 1, 10 do
SC.BARS['CP']['obj'].combos[i].bg:Hide()
_G['SC'].BARS['CP']['obj'].combos[i].bg:Hide()
end
 
SliceCommander:SetTimersHeight(SC.SET.TimerHeight)
SliceCommander:SetWidth(SC.SET.Width)
SliceCommander:SetTimersHeight(_G['SC'].SET.TimerHeight)
SliceCommander:SetWidth(_G['SC'].SET.Width)
SliceCommander:SetComboPts()
end
end
87,14 → 88,14
end
 
function SliceCommander:ACTIVE_TALENT_GROUP_CHANGED()
if SC.initDone then
if _G['SC'].initDone then
SliceCommander:SetSparks()--MOVE SPARK for the current spec
 
local aSpec = GetSpecialization()
SC.OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[SC.SET.poison.mh[aSpec]])
SC.OTHER['POISON']['obj'].button:SetAttribute("spell2", SC_SPELL[SC.SET.poison.oh[aSpec]])
if SC.SET.poison.oh == 'none' then
SC.OTHER['POISON']['obj'].button:SetAttribute("spell2", nil)
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell1", SC_SPELL[_G['SC'].SET.poison.mh[aSpec]])
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell2", SC_SPELL[_G['SC'].SET.poison.oh[aSpec]])
if _G['SC'].SET.poison.oh == 'none' then
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("spell2", nil)
end
end
end
130,9 → 131,10
end
 
function SliceCommander:OnInitialize()
if SC == nil then
if _G['SC'] == nil then
_G['SC'] = {}
end
 
_G['SC'].initDone = false
local _, englishClass = UnitClass("player")
 
205,15 → 207,15
SliceCommander:GCD()--GCD
SliceCommander:TargetThreat()--Threat
 
for k, v in pairs(SC.BARS) do
if SC.BARS[k]['type'] ~= nil then--1=BUFF 2=DEBUFF 3=SELF DEBUF
if SC.BARS[k]['type'] == 1 or SC.BARS[k]['type'] == 2 or SC.BARS[k]['type'] == 3 then
for k, v in pairs(_G['SC'].BARS) do
if _G['SC'].BARS[k]['type'] ~= nil then--1=BUFF 2=DEBUFF 3=SELF DEBUF
if _G['SC'].BARS[k]['type'] == 1 or _G['SC'].BARS[k]['type'] == 2 or _G['SC'].BARS[k]['type'] == 3 then
SliceCommander:UpdateBar(k)
elseif SC.BARS[k]['type'] == 4 then--CD
elseif _G['SC'].BARS[k]['type'] == 4 then--CD
SliceCommander:AbilityCDBar(k)
elseif SC.BARS[k]['type'] == 5 then--CHARGE CD
elseif _G['SC'].BARS[k]['type'] == 5 then--CHARGE CD
SliceCommander:ChargeAbilityCDBar(k)
elseif SC.BARS[k]['type'] == 6 then--MULTIPLE BUFF BAR
elseif _G['SC'].BARS[k]['type'] == 6 then--MULTIPLE BUFF BAR
SliceCommander:MultipleAbilityBar(k)
end
end
trunk/Core/Config.lua
1,15 → 1,16
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local AceConfig = LibStub("AceConfig-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("SliceCommander")
local _G = getfenv(0)
 
function SliceCommander:ChangeVolume(val)
if SC.SET.soundChannel == "Master" then
if _G['SC'].SET.soundChannel == "Master" then
SetCVar("Sound_MasterVolume",val)
elseif SC.SET.soundChannel == "SFX" then
elseif _G['SC'].SET.soundChannel == "SFX" then
SetCVar("Sound_SFXVolume",val)
elseif SC.SET.soundChannel == "Ambience" then
elseif _G['SC'].SET.soundChannel == "Ambience" then
SetCVar("Sound_AmbienceVolume",val)
elseif SC.SET.soundChannel == "Music" then
elseif _G['SC'].SET.soundChannel == "Music" then
SetCVar("Sound_MusicVolume",val)
end
end
22,26 → 23,26
end
 
function SliceCommander:MoveStart(frame)
if SC.SET.IsLocked == false then
if _G['SC'].SET.IsLocked == false then
frame:StartMoving()
end
end
 
function SliceCommander:MoveStop(frame)
if SC.SET.IsLocked == false then
if _G['SC'].SET.IsLocked == false then
frame:StopMovingOrSizing()
frame:SetUserPlaced(false)
SC.OTHER[frame:GetName()]['position'].point,
SC.OTHER[frame:GetName()]['position'].relativeTo,
SC.OTHER[frame:GetName()]['position'].relativePoint,
SC.OTHER[frame:GetName()]['position'].xOfs,
SC.OTHER[frame:GetName()]['position'].yOfs = frame:GetPoint();
_G['SC'].OTHER[frame:GetName()]['position'].point,
_G['SC'].OTHER[frame:GetName()]['position'].relativeTo,
_G['SC'].OTHER[frame:GetName()]['position'].relativePoint,
_G['SC'].OTHER[frame:GetName()]['position'].xOfs,
_G['SC'].OTHER[frame:GetName()]['position'].yOfs = frame:GetPoint();
end
end
 
function SliceCommander:ApplySkin(isApply)
if isApply then
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if i ~= 'CP' then
if i ~= 'THREAT' and i ~= 'HEALTH' then
v['obj'].icon:ClearAllPoints()
50,7 → 51,7
end
end
else
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if i ~= 'CP' then
if i ~= 'THREAT' and i ~= 'HEALTH' then
v['obj'].icon:ClearAllPoints()
60,20 → 61,20
end
end
 
SliceCommander:SetTimersHeight(SC.SET.TimerHeight)
SliceCommander:SetWidth(SC.SET.Width)
SliceCommander:SetEnergyHeight(SC.SET.EnergyHeight)
SliceCommander:SetIconSize(SC.SET.IconSize)
SliceCommander:SetTimersHeight(_G['SC'].SET.TimerHeight)
SliceCommander:SetWidth(_G['SC'].SET.Width)
SliceCommander:SetEnergyHeight(_G['SC'].SET.EnergyHeight)
SliceCommander:SetIconSize(_G['SC'].SET.IconSize)
end
 
function SliceCommander:GetVolume()
if SC.SET.soundChannel == "Master" then
if _G['SC'].SET.soundChannel == "Master" then
return GetCVar("Sound_MasterVolume")
elseif SC.SET.soundChannel == "SFX" then
elseif _G['SC'].SET.soundChannel == "SFX" then
return GetCVar("Sound_SFXVolume")
elseif SC.SET.soundChannel == "Ambience" then
elseif _G['SC'].SET.soundChannel == "Ambience" then
return GetCVar("Sound_AmbienceVolume")
elseif SC.SET.soundChannel == "Music" then
elseif _G['SC'].SET.soundChannel == "Music" then
return GetCVar("Sound_MusicVolume")
end
end
89,34 → 90,34
end
 
function SliceCommander:InitFont()
SC.BarFont1 = SliceCommander:NewFont("VTimerFont2", 8, 0.7, 213/255, 200/255, 184/255)
SC.BarFont2 = SliceCommander:NewFont("VTimerFont4", 8, 1, 213/255, 200/255, 184/255)
SC.FontIcon = SliceCommander:NewFont("IconFont", 15, 0.5, 1, 1, 1)
_G['SC'].BarFont1 = SliceCommander:NewFont("VTimerFont2", 8, 0.7, 213/255, 200/255, 184/255)
_G['SC'].BarFont2 = SliceCommander:NewFont("VTimerFont4", 8, 1, 213/255, 200/255, 184/255)
_G['SC'].FontIcon = SliceCommander:NewFont("IconFont", 15, 0.5, 1, 1, 1)
end
 
function SliceCommander:InitIcon()
SC.OTHER['POISON']['obj'] = SliceCommander:NewIcon("Interface\\Icons\\ability_rogue_dualweild", 'POISON')--Create poison icon warning when it left 5minute or less on the current timer
SC.OTHER['POISON']['obj']:Show()
SC.OTHER['POISON']['obj'].button = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")--Create button to reaply poison
SC.OTHER['POISON']['obj'].button:SetFrameStrata("HIGH")
SC.OTHER['POISON']['obj'].button:SetFrameLevel(5)
SC.OTHER['POISON']['obj'].button:SetPoint("BOTTOMLEFT", SC.OTHER['POISON']['obj'], "BOTTOMLEFT")
SC.OTHER['POISON']['obj'].button:SetPoint("TOPRIGHT", SC.OTHER['POISON']['obj'], "TOPRIGHT")
_G['SC'].OTHER['POISON']['obj'] = SliceCommander:NewIcon("Interface\\Icons\\ability_rogue_dualweild", 'POISON')--Create poison icon warning when it left 5minute or less on the current timer
_G['SC'].OTHER['POISON']['obj']:Show()
_G['SC'].OTHER['POISON']['obj'].button = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")--Create button to reaply poison
_G['SC'].OTHER['POISON']['obj'].button:SetFrameStrata("HIGH")
_G['SC'].OTHER['POISON']['obj'].button:SetFrameLevel(5)
_G['SC'].OTHER['POISON']['obj'].button:SetPoint("BOTTOMLEFT", _G['SC'].OTHER['POISON']['obj'], "BOTTOMLEFT")
_G['SC'].OTHER['POISON']['obj'].button:SetPoint("TOPRIGHT", _G['SC'].OTHER['POISON']['obj'], "TOPRIGHT")
local state = C_CVar.GetCVarBool("ActionButtonUseKeyDown")
if state then
SC.OTHER['POISON']['obj'].button:RegisterForClicks("LeftButtonDown", "RightButtonDown")
_G['SC'].OTHER['POISON']['obj'].button:RegisterForClicks("LeftButtonDown", "RightButtonDown")
else
SC.OTHER['POISON']['obj'].button:RegisterForClicks("LeftButtonUp", "RightButtonUp")
_G['SC'].OTHER['POISON']['obj'].button:RegisterForClicks("LeftButtonUp", "RightButtonUp")
end
 
SC.OTHER['POISON']['obj'].button:SetAttribute("unit", "player")
SC.OTHER['POISON']['obj'].button:SetAttribute("type", "spell")
SC.OTHER['POISON']['obj'].button:EnableMouse(false)
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("unit", "player")
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("type", "spell")
_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(false)
end
 
function SliceCommander:InitGCDBar()
SC.OTHER['AS']['obj'] = SliceCommander:ThinBar("BOTTOMLEFT", "TOPLEFT", 0 , 0)--Create Autoshot
SC.OTHER['AS']['obj']:SetStatusBarColor(180/255, 38/255, 38/255)
_G['SC'].OTHER['AS']['obj'] = SliceCommander:ThinBar("BOTTOMLEFT", "TOPLEFT", 0 , 0)--Create Autoshot
_G['SC'].OTHER['AS']['obj']:SetStatusBarColor(180/255, 38/255, 38/255)
end
 
function SliceCommander:DisableIcon(obj, val)
127,93 → 128,93
end
 
function SliceCommander:InitBar()
SC.BARS['CP']['obj'] = SliceCommander:CPFrame()--create Combo Point bar
_G['SC'].BARS['CP']['obj'] = SliceCommander:CPFrame()--create Combo Point bar
local maxCP = UnitPowerMax("player", Enum.PowerType.ComboPoints)
 
for i = 1, maxCP do
SC.BARS['CP']['obj'].combos[i].bg:SetVertexColor(unpack(SC.SET.CP[maxCP][i]))
SC.BARS['CP']['obj'].combos[i].border[2]:SetBackdropColor(unpack(SC.V.wColor))
_G['SC'].BARS['CP']['obj'].combos[i].bg:SetVertexColor(unpack(_G['SC'].SET.CP[maxCP][i]))
_G['SC'].BARS['CP']['obj'].combos[i].border[2]:SetBackdropColor(unpack(_G['SC'].V.wColor))
end
 
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if i ~= "CP" then
SC.BARS[i].obj = SliceCommander:NewFrame(v.color, i)
_G['SC'].BARS[i].obj = SliceCommander:NewFrame(v.color, i)
end
end
 
--GLOBAL
SC.BARS['KSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_kidneyshot")
SC.BARS['TOTCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Rogue_TricksOftheTrade")
SC.BARS['VANCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Vanish")
SC.BARS['MDCD']['obj'].icon:SetTexture("Interface\\Icons\\achievement_bg_killingblow_berserker")
SC.BARS['DFACD']['obj'].icon:SetTexture("Interface\\Icons\\spell_rogue_deathfromabove")
SC.BARS['CVCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_crimsonvial")
SC.BARS['KICD']['obj'].icon:SetTexture("Interface\\Icons\\ability_kick")
SC.BARS['COSCD']['obj'].icon:SetTexture("Interface\\Icons\\spell_shadow_nethercloak")
SC.BARS['EVACD']['obj'].icon:SetTexture("Interface\\Icons\\spell_shadow_shadowward")
SC.BARS['SPRCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_sprint")
SC.BARS['SSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_shadowstep")
SC.BARS['FECD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_feint")
_G['SC'].BARS['KSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_kidneyshot")
_G['SC'].BARS['TOTCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Rogue_TricksOftheTrade")
_G['SC'].BARS['VANCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Vanish")
_G['SC'].BARS['MDCD']['obj'].icon:SetTexture("Interface\\Icons\\achievement_bg_killingblow_berserker")
_G['SC'].BARS['DFACD']['obj'].icon:SetTexture("Interface\\Icons\\spell_rogue_deathfromabove")
_G['SC'].BARS['CVCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_crimsonvial")
_G['SC'].BARS['KICD']['obj'].icon:SetTexture("Interface\\Icons\\ability_kick")
_G['SC'].BARS['COSCD']['obj'].icon:SetTexture("Interface\\Icons\\spell_shadow_nethercloak")
_G['SC'].BARS['EVACD']['obj'].icon:SetTexture("Interface\\Icons\\spell_shadow_shadowward")
_G['SC'].BARS['SPRCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_sprint")
_G['SC'].BARS['SSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_shadowstep")
_G['SC'].BARS['FECD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_feint")
 
--COVENANTS
SC.BARS['SUMSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_kyrian_summonsteward")
SC.BARS['FCCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_necrolord_fleshcraft")
SC.BARS['SOSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_nightfae_flicker")
SC.BARS['DOSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_venthyr_doorofshadows")
SC.BARS['ERCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_bastion_rogue")
SC.BARS['SBSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_maldraxxus_rogue")
SC.BARS['SPCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_ardenweald_rogue")
SC.BARS['FLACD']['obj'].icon:SetTexture("Interface\\Icons\\ability_revendreth_rogue")
_G['SC'].BARS['SUMSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_kyrian_summonsteward")
_G['SC'].BARS['FCCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_necrolord_fleshcraft")
_G['SC'].BARS['SOSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_nightfae_flicker")
_G['SC'].BARS['DOSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_venthyr_doorofshadows")
_G['SC'].BARS['ERCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_bastion_rogue")
_G['SC'].BARS['SBSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_maldraxxus_rogue")
_G['SC'].BARS['SPCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_ardenweald_rogue")
_G['SC'].BARS['FLACD']['obj'].icon:SetTexture("Interface\\Icons\\ability_revendreth_rogue")
 
 
--ASSASSINATION
SC.BARS['VENCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Rogue_Deadliness")
SC.BARS['EXCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_deathwing_bloodcorruption_earth")
SC.BARS['GARCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_garrote")
SC.BARS['KBCD']['obj'].icon:SetTexture("Interface\\Icons\\inv_knife_1h_artifactgarona_d_01")
_G['SC'].BARS['VENCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Rogue_Deadliness")
_G['SC'].BARS['EXCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_deathwing_bloodcorruption_earth")
_G['SC'].BARS['GARCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_garrote")
_G['SC'].BARS['KBCD']['obj'].icon:SetTexture("Interface\\Icons\\inv_knife_1h_artifactgarona_d_01")
 
--OUTLAW
SC.BARS['ARCD']['obj'].icon:SetTexture("Interface\\Icons\\Spell_Shadow_ShadowWordDominate")
SC.BARS['KSPCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Rogue_Murderspree")
SC.BARS['GHCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_grapplinghook")
SC.BARS['BECD']['obj'].icon:SetTexture("Interface\\Icons\\inv_weapon_rifle_01")
SC.BARS['RB']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_rollthebones")
SC.BARS['RBCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_rollthebones")
SC.BARS['CDBCD']['obj'].icon:SetTexture("Interface\\Icons\\inv_sword_1h_artifactskywall_d_01dual")
SC.BARS['BFCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Warrior_PunishingBlow")
SC.BARS['GSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_creature_cursed_02")
SC.BARS['BRCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_arakkoa_spinning_blade")
SC.BARS['GGCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_gouge")
_G['SC'].BARS['ARCD']['obj'].icon:SetTexture("Interface\\Icons\\Spell_Shadow_ShadowWordDominate")
_G['SC'].BARS['KSPCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Rogue_Murderspree")
_G['SC'].BARS['GHCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_grapplinghook")
_G['SC'].BARS['BECD']['obj'].icon:SetTexture("Interface\\Icons\\inv_weapon_rifle_01")
_G['SC'].BARS['RB']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_rollthebones")
_G['SC'].BARS['RBCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_rollthebones")
_G['SC'].BARS['CDBCD']['obj'].icon:SetTexture("Interface\\Icons\\inv_sword_1h_artifactskywall_d_01dual")
_G['SC'].BARS['BFCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Warrior_PunishingBlow")
_G['SC'].BARS['GSCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_creature_cursed_02")
_G['SC'].BARS['BRCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_arakkoa_spinning_blade")
_G['SC'].BARS['GGCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_gouge")
 
--SUBTLETY
SC.BARS['SDCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Rogue_Shadowdance")
SC.BARS['SBCD']['obj'].icon:SetTexture("Interface\\Icons\\inv_knife_1h_grimbatolraid_d_03")
SC.BARS['GBCD']['obj'].icon:SetTexture("Interface\\Icons\\inv_knife_1h_artifactfangs_d_01")
SC.BARS['SODCD']['obj'].icon:SetTexture("Interface\\Icons\\spell_shadow_rune")
SC.BARS['SHTCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_throwingspecialization")
SC.BARS['STHCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_sinistercalling")
_G['SC'].BARS['SDCD']['obj'].icon:SetTexture("Interface\\Icons\\Ability_Rogue_Shadowdance")
_G['SC'].BARS['SBCD']['obj'].icon:SetTexture("Interface\\Icons\\inv_knife_1h_grimbatolraid_d_03")
_G['SC'].BARS['GBCD']['obj'].icon:SetTexture("Interface\\Icons\\inv_knife_1h_artifactfangs_d_01")
_G['SC'].BARS['SODCD']['obj'].icon:SetTexture("Interface\\Icons\\spell_shadow_rune")
_G['SC'].BARS['SHTCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_throwingspecialization")
_G['SC'].BARS['STHCD']['obj'].icon:SetTexture("Interface\\Icons\\ability_rogue_sinistercalling")
 
SliceCommander:DisableIcon(SC.BARS['THREAT']['obj'], 110)
SliceCommander:DisableIcon(SC.BARS['HEALTH']['obj'], 100)
SliceCommander:DisableIcon(SC.BARS['THEALTH']['obj'], 100)
SliceCommander:DisableIcon(_G['SC'].BARS['THREAT']['obj'], 110)
SliceCommander:DisableIcon(_G['SC'].BARS['HEALTH']['obj'], 100)
SliceCommander:DisableIcon(_G['SC'].BARS['THEALTH']['obj'], 100)
end
 
function SliceCommander:InitConstantValue()
local height, width
height = tonumber(string.match(GetCVar("gxWindowedResolution"), "%d+x(%d+)"))
width = tonumber(string.match(GetCVar("gxWindowedResolution"), "(%d+)x+%d"))
width = width*SC.SET.eyefinity--eyefinity is wired
SC.curCombo = 0
SC.RUP_AlertPending = 3
SC.SND_AlertPending = 3
SC.V = {
width = width*_G['SC'].SET.eyefinity--eyefinity is wired
_G['SC'].curCombo = 0
_G['SC'].RUP_AlertPending = 3
_G['SC'].SND_AlertPending = 3
_G['SC'].V = {
['bColor'] = {.1,.1,.1},
['wColor'] = {.6,.6,.6},
['pxH'] = UIParent:GetHeight() / height,
['pxW'] = UIParent:GetWidth() / width,
}
 
SC.Spark = {}
_G['SC'].Spark = {}
end
 
function SliceCommander:ShowHideBorder(visible)
221,7 → 222,7
for i,v in pairs(VTimerEnergy.border) do
v:Show()
end
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if i ~= "CP" then
for j,w in pairs(v['obj'].border) do
w:Show()
233,7 → 234,7
end
end
end
for i,v in pairs(SC.BARS['CP']['obj'].combos) do
for i,v in pairs(_G['SC'].BARS['CP']['obj'].combos) do
for j,w in pairs(v.border) do
w:Show()
end
242,7 → 243,7
for i,v in pairs(VTimerEnergy.border) do
v:Hide()
end
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if i ~= "CP" then
for j,w in pairs(v['obj'].border) do
w:Hide()
254,7 → 255,7
end
end
end
for i,v in pairs(SC.BARS['CP']['obj'].combos) do
for i,v in pairs(_G['SC'].BARS['CP']['obj'].combos) do
for j,w in pairs(v.border) do
w:Hide()
end
263,77 → 264,77
end
 
function SliceCommander:ApplyConf()
SliceCommander:LockCkecked(SC.SET.IsLocked)
SliceCommander:SetTimersHeight(SC.SET.TimerHeight)
SliceCommander:SetWidth(SC.SET.Width)
SliceCommander:SetEnergyHeight(SC.SET.EnergyHeight)
SliceCommander:SetIconSize(SC.SET.IconSize)
SliceCommander:LockCkecked(_G['SC'].SET.IsLocked)
SliceCommander:SetTimersHeight(_G['SC'].SET.TimerHeight)
SliceCommander:SetWidth(_G['SC'].SET.Width)
SliceCommander:SetEnergyHeight(_G['SC'].SET.EnergyHeight)
SliceCommander:SetIconSize(_G['SC'].SET.IconSize)
SliceCommander:Config_RetextureBars(SliceCommander:BarTexture())
SliceCommander:FrameOpacity(SC.SET.FrameOpacity)
SliceCommander:SetTransparency(SC.SET.EnergyTrans)
SliceCommander:ApplySkin(SC.SET.skin)
SliceCommander:ShowHideBorder(SC.SET.skin)
SliceCommander:FrameOpacity(_G['SC'].SET.FrameOpacity)
SliceCommander:SetTransparency(_G['SC'].SET.EnergyTrans)
SliceCommander:ApplySkin(_G['SC'].SET.skin)
SliceCommander:ShowHideBorder(_G['SC'].SET.skin)
SliceCommander:ACTIVE_TALENT_GROUP_CHANGED()
end
 
function SliceCommander:SetSparks()
local spec = GetSpecialization()
 
SC.Spark[1]:SCPoint("TOPLEFT", VTimerEnergy, "TOPLEFT", ((SC.SET.Energy[spec][1] / UnitPowerMax("player", Enum.PowerType.Energy) * SC.SET.Width)-1), 0)
SC.Spark[2]:SCPoint("TOPLEFT", VTimerEnergy, "TOPLEFT", ((SC.SET.Energy[spec][2] / UnitPowerMax("player", Enum.PowerType.Energy) * SC.SET.Width)-1), 0)
SC.Spark[3]:SCPoint("TOPLEFT", VTimerEnergy, "TOPLEFT", ((SC.SET.Energy[spec][3] / UnitPowerMax("player", Enum.PowerType.Energy) * SC.SET.Width)-1), 0)
_G['SC'].Spark[1]:SCPoint("TOPLEFT", VTimerEnergy, "TOPLEFT", ((_G['SC'].SET.Energy[spec][1] / UnitPowerMax("player", Enum.PowerType.Energy) * _G['SC'].SET.Width)-1), 0)
_G['SC'].Spark[2]:SCPoint("TOPLEFT", VTimerEnergy, "TOPLEFT", ((_G['SC'].SET.Energy[spec][2] / UnitPowerMax("player", Enum.PowerType.Energy) * _G['SC'].SET.Width)-1), 0)
_G['SC'].Spark[3]:SCPoint("TOPLEFT", VTimerEnergy, "TOPLEFT", ((_G['SC'].SET.Energy[spec][3] / UnitPowerMax("player", Enum.PowerType.Energy) * _G['SC'].SET.Width)-1), 0)
end
 
function SliceCommander:LockCkecked(checked)
if checked then
SliceCommander:SetTransparency(SC.SET.FrameOpacity)
SliceCommander:SetTransparency(_G['SC'].SET.FrameOpacity)
SliceCommanderFrame:SetAlpha(0)
SliceCommanderFrame:EnableMouse(false)
SC.OTHER['POISON']['obj']['moveframe']:SetAlpha(0)
SC.OTHER['POISON']['obj']['moveframe']:EnableMouse(false)
SC.SET.IsLocked = true
_G['SC'].OTHER['POISON']['obj']['moveframe']:SetAlpha(0)
_G['SC'].OTHER['POISON']['obj']['moveframe']:EnableMouse(false)
_G['SC'].SET.IsLocked = true
else
SliceCommander:SetTransparency(100)
SliceCommanderFrame:SetAlpha(.5)
SliceCommanderFrame:EnableMouse(true)
SC.OTHER['POISON']['obj']['moveframe']:SetAlpha(.5)
SC.OTHER['POISON']['obj']['moveframe']:EnableMouse(true)
SC.OTHER['POISON']['obj']:SetAlpha(1)
SC.OTHER['POISON']['obj']:Show()
SC.SET.IsLocked = false
_G['SC'].OTHER['POISON']['obj']['moveframe']:SetAlpha(.5)
_G['SC'].OTHER['POISON']['obj']['moveframe']:EnableMouse(true)
_G['SC'].OTHER['POISON']['obj']:SetAlpha(1)
_G['SC'].OTHER['POISON']['obj']:Show()
_G['SC'].SET.IsLocked = false
SliceCommander:StaticPopup_Show('CONFIG_UNLOCK')
end
end
 
function SliceCommander:Config_RetextureBars(texture)
VTimerEnergy:SetStatusBarTexture(texture)
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if v['expire'] ~= nil and i ~= 'CP' then
v['obj']:SetStatusBarTexture(texture)
end
end
 
for i = 1, 10 do
SC.BARS['CP']['obj'].combos[i].bg:SetTexture(texture)
_G['SC'].BARS['CP']['obj'].combos[i].bg:SetTexture(texture)
end
end
 
function SliceCommander:SetWidth(w)
local pxMargin = 1
local maxCP = UnitPowerMax("player", Enum.PowerType.ComboPoints)
if SC.SET.skin then
if _G['SC'].SET.skin then
pxMargin = 7
end
local widthCP = math.floor((w-(pxMargin*(maxCP-1)))/maxCP)
w = widthCP*maxCP+pxMargin*(maxCP-1)
 
local h = SC.SET.TimerHeight
local h = _G['SC'].SET.TimerHeight
 
if SC.SET.skin then
if _G['SC'].SET.skin then
--3 pixel border x2 + 1 pixel margin
h = h + 6 + 1
end
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if v['expire'] ~= nil and i ~= 'THREAT' and i ~= 'CP' and i ~= "HEALTH" and i ~= "THEALTH" then
SliceCommander:SetSizeBorder(w-h, 0, v['obj'].border)
v['obj']:SCWidth(w-h)
344,23 → 345,23
SliceCommander:SetSizeBorder(w, 0, VTimerEnergy.border)
SliceCommanderFrame:SCWidth(w+16)
 
SC.OTHER['AS']['obj']:SCWidth(w)
SC.BARS['CP']['obj']:SCWidth(w)
_G['SC'].OTHER['AS']['obj']:SCWidth(w)
_G['SC'].BARS['CP']['obj']:SCWidth(w)
 
SC.BARS['THREAT']['obj']:SCWidth(w)
SliceCommander:SetSizeBorder(w, 0, SC.BARS['THREAT']['obj'].border)
SC.BARS['HEALTH']['obj']:SCWidth(w)
SliceCommander:SetSizeBorder(w, 0, SC.BARS['HEALTH']['obj'].border)
SC.BARS['THEALTH']['obj']:SCWidth(w)
SliceCommander:SetSizeBorder(w, 0, SC.BARS['THEALTH']['obj'].border)
_G['SC'].BARS['THREAT']['obj']:SCWidth(w)
SliceCommander:SetSizeBorder(w, 0, _G['SC'].BARS['THREAT']['obj'].border)
_G['SC'].BARS['HEALTH']['obj']:SCWidth(w)
SliceCommander:SetSizeBorder(w, 0, _G['SC'].BARS['HEALTH']['obj'].border)
_G['SC'].BARS['THEALTH']['obj']:SCWidth(w)
SliceCommander:SetSizeBorder(w, 0, _G['SC'].BARS['THEALTH']['obj'].border)
 
local cx = 0
for i = 1, maxCP do
SC.BARS['CP']['obj'].combos[i]:ClearAllPoints()
SC.BARS['CP']['obj'].combos[i]:SCPoint("TOPLEFT", SC.BARS['CP']['obj'], "TOPLEFT", cx, 0)
SC.BARS['CP']['obj'].combos[i]:SCPoint("BOTTOMRIGHT", SC.BARS['CP']['obj'], "BOTTOMLEFT", cx + widthCP , 0)
SC.BARS['CP']['obj'].combos[i]:SCWidth(widthCP)
SliceCommander:SetSizeBorder(widthCP, 0, SC.BARS['CP']['obj'].combos[i].border)
_G['SC'].BARS['CP']['obj'].combos[i]:ClearAllPoints()
_G['SC'].BARS['CP']['obj'].combos[i]:SCPoint("TOPLEFT", _G['SC'].BARS['CP']['obj'], "TOPLEFT", cx, 0)
_G['SC'].BARS['CP']['obj'].combos[i]:SCPoint("BOTTOMRIGHT", _G['SC'].BARS['CP']['obj'], "BOTTOMLEFT", cx + widthCP , 0)
_G['SC'].BARS['CP']['obj'].combos[i]:SCWidth(widthCP)
SliceCommander:SetSizeBorder(widthCP, 0, _G['SC'].BARS['CP']['obj'].combos[i].border)
cx = cx + widthCP + pxMargin
end
SliceCommander:SetSparks()
384,16 → 385,16
SliceCommanderFrame:SCHeight(h+16)
VTimerEnergyTxt:SCHeight(h)
SliceCommander_Combo:SCHeight(h)
SC.Spark[1]:SCHeight(h)
SC.Spark[2]:SCHeight(h)
SC.Spark[3]:SCHeight(h)
_G['SC'].Spark[1]:SCHeight(h)
_G['SC'].Spark[2]:SCHeight(h)
_G['SC'].Spark[3]:SCHeight(h)
SliceCommander:SetSizeBorder(0, h, VTimerEnergy.border)
SliceCommander:HealthBar('HEALTH')
SliceCommander:HealthBar('THEALTH')
end
 
function SliceCommander:SetIconSize(w)
SliceCommander:SetIconSizeObj(SC.OTHER['POISON']['obj'], w)
SliceCommander:SetIconSizeObj(_G['SC'].OTHER['POISON']['obj'], w)
end
 
function SliceCommander:SetIconSizeObj(obj, w)
406,7 → 407,7
end
 
function SliceCommander:SetTimersHeight(h)
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if v['expire'] ~= nil and i ~= 'CP' then
v['obj']:SCHeight(h)
v['obj'].text:SCHeight(h)
425,29 → 426,29
v:SCHeight(h)
end
 
SC.BARS['CP']['obj']:SCHeight(h)
SC.BARS['CP']['obj'].comboText:SCHeight(h)
_G['SC'].BARS['CP']['obj']:SCHeight(h)
_G['SC'].BARS['CP']['obj'].comboText:SCHeight(h)
local maxCP = UnitPowerMax("player", Enum.PowerType.ComboPoints)
for i = 1, maxCP do
SC.BARS['CP']['obj'].combos[i]:SCHeight(h)
SliceCommander:SetSizeBorder(0, h, SC.BARS['CP']['obj'].combos[i].border)
_G['SC'].BARS['CP']['obj'].combos[i]:SCHeight(h)
SliceCommander:SetSizeBorder(0, h, _G['SC'].BARS['CP']['obj'].combos[i].border)
end
 
SC.BarFont1:SetFont(SliceCommander:GetFont(), (h-2)*SC.V.pxH, "")
SC.BarFont2:SetFont(SliceCommander:GetFont(), (h-2)*SC.V.pxH, "")
SC.BARS['CP']['obj'].comboText:SetFont(SliceCommander:GetFont(), (h-2)*SC.V.pxH, "THINOUTLINE")
SliceCommander:SetWidth(SC.SET.Width)
_G['SC'].BarFont1:SetFont(SliceCommander:GetFont(), (h-2)*_G['SC'].V.pxH, "")
_G['SC'].BarFont2:SetFont(SliceCommander:GetFont(), (h-2)*_G['SC'].V.pxH, "")
_G['SC'].BARS['CP']['obj'].comboText:SetFont(SliceCommander:GetFont(), (h-2)*_G['SC'].V.pxH, "THINOUTLINE")
SliceCommander:SetWidth(_G['SC'].SET.Width)
end
 
function SliceCommander:GetFont()
local LSM = LibStub("LibSharedMedia-3.0")
return LSM:Fetch("font", SC.SET.font)
return LSM:Fetch("font", _G['SC'].SET.font)
end
 
function SliceCommander:FrameOpacity(opValue)
SliceCommander:SetTransparency(opValue)
 
for i,v in pairs(SC.BARS) do
for i,v in pairs(_G['SC'].BARS) do
if v['expire'] ~= nil then
v['obj']:SetAlpha(opValue/100)
end
455,7 → 456,7
end
 
function SliceCommander:TestCurrentVersion()
if _G['SC'].version == nil or _G['SC'].version < '7.00' then
if _G['SC'].version == nil or tonumber(_G['SC'].version) < 7.00 then
_G['SC'] = {version = GetAddOnMetadata("SliceCommander", "Version")}
else
if tonumber(_G['SC'].version) < 9.01 then
500,7 → 501,7
end
 
if tonumber(_G['SC'].version) < 10.0 then
_G['SC'].SET.CP = nil
_G['SC'].SET['CP'] = nil
end
 
_G['SC'].version = GetAddOnMetadata("SliceCommander", "Version")
509,32 → 510,32
 
function SliceCommander:DisplaySpells(Spells)
for i, v in ipairs(Spells) do
if SC.SET.display[v] == nil then
SC.SET.display[v] = true
if _G['SC'].SET.display[v] == nil then
_G['SC'].SET.display[v] = true
end
end
end
 
function SliceCommander:NotDisplaySpells(Spells)
for i, v in ipairs(Spells) do
if SC.SET.display[v] == nil then
SC.SET.display[v] = false
if _G['SC'].SET.display[v] == nil then
_G['SC'].SET.display[v] = false
end
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
if _G['SC'].SET.flash[v] == nil then
_G['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
if _G['SC'].SET.flash[v] == nil then
_G['SC'].SET.flash[v] = false
end
end
end
545,8 → 546,8
if _G['SC'].orderBar > _G['SC'].maxPos then
_G['SC'].maxPos = _G['SC'].orderBar
end
if SC.SET.Pos[v] == nil then
SC.SET.Pos[v] = _G['SC'].orderBar
if _G['SC'].SET.Pos[v] == nil then
_G['SC'].SET.Pos[v] = _G['SC'].orderBar
end
end
end
557,8 → 558,8
if _G['SC'].orderCDBar < _G['SC'].maxCDPos then
_G['SC'].maxCDPos = _G['SC'].orderCDBar
end
if SC.SET.Pos[v] == nil then
SC.SET.Pos[v] = _G['SC'].orderCDBar
if _G['SC'].SET.Pos[v] == nil then
_G['SC'].SET.Pos[v] = _G['SC'].orderCDBar
end
end
 
574,8 → 575,8
_G['SC'].orderBar = _G['SC'].maxPos
_G['SC'].orderCDBar = _G['SC'].maxCDPos
 
if SC.SET.Pos.CP == nil then--Combo Points
SC.SET.Pos.CP = -1
if _G['SC'].SET.Pos.CP == nil then--Combo Points
_G['SC'].SET.Pos.CP = -1
end
 
SliceCommander:OrderSpells({'SND', 'CV', 'FE', 'SUB', 'AC', 'MAI', 'COS', 'EVA', 'SPR', 'SS', 'SP', 'FLA', 'SBS', 'ER'})
636,15 → 637,15
SC_SPELLID['ESSECD'] = SC_SPELLID['ALLESSE'][essenceId][essenceRank]
local name, _, icon = GetSpellInfo(SC_SPELLID['ESSECD'])
SC_SPELL['ESSECD'] = name
if SC.BARS['ESSECD']['obj'] ~= nil and SC.BARS['ESSECD']['obj'] ~= 0 then
SC.BARS['ESSECD']['obj'].icon:SetTexture(icon)
if _G['SC'].BARS['ESSECD']['obj'] ~= nil and _G['SC'].BARS['ESSECD']['obj'] ~= 0 then
_G['SC'].BARS['ESSECD']['obj'].icon:SetTexture(icon)
end
else
SC_SPELLID['ESSECD'] = -1
SC_SPELL['ESSECD'] = 'ESSENCE'
end
SC.BARS['ESSECD']['name'] = SC_SPELL['ESSECD']
SC.BARS['ESSECD']['id'] = SC_SPELLID['ESSECD']
_G['SC'].BARS['ESSECD']['name'] = SC_SPELL['ESSECD']
_G['SC'].BARS['ESSECD']['id'] = SC_SPELLID['ESSECD']
end
 
function SliceCommander:DisplayOrderBar()
657,27 → 658,27
function SliceCommander:SetSetOptions()
local defaultTable = {'poison'}
for k, v in pairs(defaultTable) do
if SC.SET[v] == nil then
SC.SET[v] = {}
if _G['SC'].SET[v] == nil then
_G['SC'].SET[v] = {}
end
end
local defaultEnabled = {'PadLatency', 'SpellText', 'SoundCombat', 'ThreatGroupOnly', 'kickEnable', 'displayGCD'}
for k, v in pairs(defaultEnabled) do
if SC.SET[v] == nil then
SC.SET[v] = true
if _G['SC'].SET[v] == nil then
_G['SC'].SET[v] = true
end
end
local defaultDisabled = {'IsLocked', 'HideEnergy', 'FullTimer', 'ARMarioMod', 'skin'}
for k, v in pairs(defaultDisabled) do
if SC.SET[v] == nil then
SC.SET[v] = false
if _G['SC'].SET[v] == nil then
_G['SC'].SET[v] = false
end
end
end
 
function SliceCommander:SetRB()
if SC.SET.RB == nil then
SC.SET.RB = {
if _G['SC'].SET.RB == nil then
_G['SC'].SET.RB = {
['SC'] = 'SS',
['GM'] = 'AS',
['RP'] = 'Crit',
685,9 → 686,9
['BT'] = 'NRJ',
['BS'] = 'CP+'
}
SC.SET.display.RBName = true
_G['SC'].SET.display.RBName = true
end
SC.BARS['RB'].subbar = {
_G['SC'].BARS['RB'].subbar = {
[SC_SPELLID['SC']] = 'SC',
[SC_SPELLID['GM']] = 'GM',
[SC_SPELLID['RP']] = 'RP',
698,19 → 699,19
end
 
function SliceCommander:TestValueOptions()
if SC.SET == nil or SC.SET.display == nil or SC.SET.Pos == nil then
SC.SET = { display = {}, Pos = {} }
if _G['SC'].SET == nil or _G['SC'].SET.display == nil or _G['SC'].SET.Pos == nil then
_G['SC'].SET = { display = {}, Pos = {} }
end
if SC.SET.flash == nil then
SC.SET.flash = {}
if _G['SC'].SET.flash == nil then
_G['SC'].SET.flash = {}
end
if _G['SC'].SET.PixelPerfect == nil then
_G['SC'].SET.PixelPerfect = true
end
SliceCommander:DisplayOrderBar()
SliceCommander:SetSetOptions()
if SC.SET.Energy == nil then
SC.SET.Energy = {
if _G['SC'].SET.Energy == nil then
_G['SC'].SET.Energy = {
[1] = {--ASSASSINATION
[1] = 25,
[2] = 35,
728,89 → 729,89
}
}
end
if SC.SET.kickMessage == nil then
SC.SET.kickMessage = "Kick successful"
if _G['SC'].SET.kickMessage == nil then
_G['SC'].SET.kickMessage = "Kick successful"
end
if SC.SET.kickSpell == nil then
SC.SET.kickSpell = true
if _G['SC'].SET.kickSpell == nil then
_G['SC'].SET.kickSpell = true
end
if SC.SET.kickChannel == nil then
SC.SET.kickChannel = {
if _G['SC'].SET.kickChannel == nil then
_G['SC'].SET.kickChannel = {
['INSTANCE_CHAT'] = true,
['RAID'] = true,
['PARTY'] = true,
['SAY'] = true
}
end
if SC.SET.eyefinity == nil then
SC.SET.eyefinity = 1
if _G['SC'].SET.eyefinity == nil then
_G['SC'].SET.eyefinity = 1
end
if SC.SET.HEALTH == nil then
SC.SET.HEALTH = {
if _G['SC'].SET.HEALTH == nil then
_G['SC'].SET.HEALTH = {
value = false,
HideCombat = true,
MidUnder = 'None',
LowUnder = 'None'
}
end
if SC.SET.THEALTH == nil then
SC.SET.THEALTH = {
if _G['SC'].SET.THEALTH == nil then
_G['SC'].SET.THEALTH = {
value = false,
HideCombat = true,
MidUnder = 'None',
LowUnder = 'None'
}
end
--[[if SC.SET.EnergySound1 == nil then
SC.SET.EnergySound1 = 'None'
--[[if _G['SC'].SET.EnergySound1 == nil then
_G['SC'].SET.EnergySound1 = 'None'
end
if SC.SET.EnergySound2 == nil then
SC.SET.EnergySound2 = 'None'
if _G['SC'].SET.EnergySound2 == nil then
_G['SC'].SET.EnergySound2 = 'None'
end
if SC.SET.EnergySound3 == nil then
SC.SET.EnergySound3 = 'None'
if _G['SC'].SET.EnergySound3 == nil then
_G['SC'].SET.EnergySound3 = 'None'
end]]
if SC.SET.DPSound == nil then
SC.SET.DPSound = 'None'
if _G['SC'].SET.DPSound == nil then
_G['SC'].SET.DPSound = 'None'
end
if SC.SET.Width == nil then
SC.SET.Width = 287
if _G['SC'].SET.Width == nil then
_G['SC'].SET.Width = 287
end
if SC.SET.EnergyTrans == nil then
SC.SET.EnergyTrans = 0
if _G['SC'].SET.EnergyTrans == nil then
_G['SC'].SET.EnergyTrans = 0
end
if SC.SET.BarMargin == nil then
SC.SET.BarMargin = 2
if _G['SC'].SET.BarMargin == nil then
_G['SC'].SET.BarMargin = 2
end
if SC.SET.EnergyHeight == nil then
SC.SET.EnergyHeight = 28
if _G['SC'].SET.EnergyHeight == nil then
_G['SC'].SET.EnergyHeight = 28
end
if SC.SET.IconSize == nil then
SC.SET.IconSize = 30
if _G['SC'].SET.IconSize == nil then
_G['SC'].SET.IconSize = 30
end
if SC.SET.TimerHeight == nil then
SC.SET.TimerHeight = 17
if _G['SC'].SET.TimerHeight == nil then
_G['SC'].SET.TimerHeight = 17
end
if SC.SET.BarTexture == nil then
SC.SET.BarTexture = 'Tukui'
if _G['SC'].SET.BarTexture == nil then
_G['SC'].SET.BarTexture = 'Tukui'
end
if SC.SET.display.DPTIME == nil then
SC.SET.display.DPTIME = 10
if _G['SC'].SET.display.DPTIME == nil then
_G['SC'].SET.display.DPTIME = 10
end
if SC.SET.FrameOpacity == nil then
SC.SET.FrameOpacity = 100
if _G['SC'].SET.FrameOpacity == nil then
_G['SC'].SET.FrameOpacity = 100
end
if SC.SET.soundChannel == nil then
SC.SET.soundChannel = "Master"
if _G['SC'].SET.soundChannel == nil then
_G['SC'].SET.soundChannel = "Master"
end
if SC.SET.Pandemic == nil then
SC.SET.Pandemic = true
if _G['SC'].SET.Pandemic == nil then
_G['SC'].SET.Pandemic = true
end
if SC.SET.Tick == nil then
SC.SET.Tick = true
if _G['SC'].SET.Tick == nil then
_G['SC'].SET.Tick = true
end
if SC.SET.CP == nil then
SC.SET.CP = {
if _G['SC'].SET.CP == nil then
_G['SC'].SET.CP = {
[5] = {
[1] = {.33, .63, .33},
[2] = {.46, .63, .35},
837,23 → 838,23
}
}
end
if SC.SET.energyColor == nil then
SC.SET.energyColor = {.92, .92, .92}
if _G['SC'].SET.energyColor == nil then
_G['SC'].SET.energyColor = {.92, .92, .92}
end
if SC.SET.poison.mh == nil or SC.SET.poison.oh == nil or type(SC.SET.poison.mh) ~= "table" or type(SC.SET.poison.oh) ~= "table" then
SC.SET.poison.mh = {
if _G['SC'].SET.poison.mh == nil or _G['SC'].SET.poison.oh == nil or type(_G['SC'].SET.poison.mh) ~= "table" or type(_G['SC'].SET.poison.oh) ~= "table" then
_G['SC'].SET.poison.mh = {
[1] = 'DPB',
[2] = 'IP',
[3] = 'IP'
}
SC.SET.poison.oh = {
_G['SC'].SET.poison.oh = {
[1] = 'CRP',
[2] = 'CRP',
[3] = 'CRP'
}
end
if SC.SET.font == nil then
SC.SET.font = "Friz Quadrata TT"
if _G['SC'].SET.font == nil then
_G['SC'].SET.font = "Friz Quadrata TT"
end
SliceCommander:InitBarArray()
SliceCommander:InitOtherArray()
862,18 → 863,18
 
 
function SliceCommander:InitOtherArray()
if SC.OTHER == nil then
SC.OTHER = {}
if _G['SC'].OTHER == nil then
_G['SC'].OTHER = {}
end
if SC.OTHER['AS'] == nil then
SC.OTHER['AS'] = {
if _G['SC'].OTHER['AS'] == nil then
_G['SC'].OTHER['AS'] = {
['obj'] = 0,
['expire'] = 0,
['color'] = 0
}
end
if SC.OTHER['POISON'] == nil then
SC.OTHER['POISON'] = {
if _G['SC'].OTHER['POISON'] == nil then
_G['SC'].OTHER['POISON'] = {
['obj'] = 0,
['expire'] = 0,
['color'] = 0,
886,8 → 887,8
}
}
end
if SC.OTHER['SliceCommanderFrame'] == nil then
SC.OTHER['SliceCommanderFrame'] = {
if _G['SC'].OTHER['SliceCommanderFrame'] == nil then
_G['SC'].OTHER['SliceCommanderFrame'] = {
['position'] = {
['xOfs'] = -250,
['yOfs'] = 75,
900,322 → 901,322
end
 
function SliceCommander:InitGlobalBarArray()
if SC.BARS['HEALTH'] == nil then
SC.BARS['HEALTH'] = {['color'] = {0, 0, 0}}
if _G['SC'].BARS['HEALTH'] == nil then
_G['SC'].BARS['HEALTH'] = {['color'] = {0, 0, 0}}
end
SC.BARS['HEALTH']['target'] = "player"
if SC.BARS['THEALTH'] == nil then
SC.BARS['THEALTH'] = {['color'] = {0, 0, 0}}
_G['SC'].BARS['HEALTH']['target'] = "player"
if _G['SC'].BARS['THEALTH'] == nil then
_G['SC'].BARS['THEALTH'] = {['color'] = {0, 0, 0}}
end
SC.BARS['THEALTH']['target'] = "target"
if SC.BARS['THREAT'] == nil then
SC.BARS['THREAT'] = {['color'] = {0, 0, 0}}
_G['SC'].BARS['THEALTH']['target'] = "target"
if _G['SC'].BARS['THREAT'] == nil then
_G['SC'].BARS['THREAT'] = {['color'] = {0, 0, 0}}
end
SC.BARS['CP'] = {
_G['SC'].BARS['CP'] = {
['last'] = 0,--last CP has to be init to 0
['target'] = '',
['color'] = 0
}
 
if SC.BARS['KS'] == nil then--Kidney Shot
SC.BARS['KS'] = {['color'] = {.89, .73, .52}}
if _G['SC'].BARS['KS'] == nil then--Kidney Shot
_G['SC'].BARS['KS'] = {['color'] = {.89, .73, .52}}
end
if SC.BARS['KSCD'] == nil then--Kidney Shot CD
SC.BARS['KSCD'] = {['color'] = {.89, .73, .52}}
if _G['SC'].BARS['KSCD'] == nil then--Kidney Shot CD
_G['SC'].BARS['KSCD'] = {['color'] = {.89, .73, .52}}
end
if SC.BARS['CS'] == nil then--Cheap Shot
SC.BARS['CS'] = {['color'] = {.89, .73, .2}}
if _G['SC'].BARS['CS'] == nil then--Cheap Shot
_G['SC'].BARS['CS'] = {['color'] = {.89, .73, .2}}
end
if SC.BARS['VANCD'] == nil then--Vanish
SC.BARS['VANCD'] = {['color'] = {.42, .46, .51}}
if _G['SC'].BARS['VANCD'] == nil then--Vanish
_G['SC'].BARS['VANCD'] = {['color'] = {.42, .46, .51}}
end
if SC.BARS['SS'] == nil then--Shadowstep
SC.BARS['SS'] = {['color'] = {.76, .28, .78}}
if _G['SC'].BARS['SS'] == nil then--Shadowstep
_G['SC'].BARS['SS'] = {['color'] = {.76, .28, .78}}
end
if SC.BARS['SSCD'] == nil then--Shadowstep CD
SC.BARS['SSCD'] = {['color'] = {.76, .28, .78}}
if _G['SC'].BARS['SSCD'] == nil then--Shadowstep CD
_G['SC'].BARS['SSCD'] = {['color'] = {.76, .28, .78}}
end
if SC.BARS['FE'] == nil then--Feint
SC.BARS['FE'] = {['color'] = {.15, .42, .68}}
if _G['SC'].BARS['FE'] == nil then--Feint
_G['SC'].BARS['FE'] = {['color'] = {.15, .42, .68}}
end
if SC.BARS['FECD'] == nil then--Feint CD
SC.BARS['FECD'] = {['color'] = {.15, .42, .68}}
if _G['SC'].BARS['FECD'] == nil then--Feint CD
_G['SC'].BARS['FECD'] = {['color'] = {.15, .42, .68}}
end
if SC.BARS['KICD'] == nil then--Kick
SC.BARS['KICD'] = {['color'] = {.42, .46, .51}}
if _G['SC'].BARS['KICD'] == nil then--Kick
_G['SC'].BARS['KICD'] = {['color'] = {.42, .46, .51}}
end
if SC.BARS['MAI'] == nil then--Master Assassin's Initiative
SC.BARS['MAI'] = {['color'] = {.42, .46, .51}}
if _G['SC'].BARS['MAI'] == nil then--Master Assassin's Initiative
_G['SC'].BARS['MAI'] = {['color'] = {.42, .46, .51}}
end
if SC.BARS['MDCD'] == nil then--Marked for Death
SC.BARS['MDCD'] = {['color'] = {.92, .33, .33}}
if _G['SC'].BARS['MDCD'] == nil then--Marked for Death
_G['SC'].BARS['MDCD'] = {['color'] = {.92, .33, .33}}
end
if SC.BARS['DFACD'] == nil then--Death from Above
SC.BARS['DFACD'] = {['color'] = {.75, .65, .53}}
if _G['SC'].BARS['DFACD'] == nil then--Death from Above
_G['SC'].BARS['DFACD'] = {['color'] = {.75, .65, .53}}
end
if SC.BARS['AC'] == nil then--Alacrity
SC.BARS['AC'] = {['color'] = {.6, .55, .17}}
if _G['SC'].BARS['AC'] == nil then--Alacrity
_G['SC'].BARS['AC'] = {['color'] = {.6, .55, .17}}
end
if SC.BARS['CV'] == nil then--Crimson Vial
SC.BARS['CV'] = {['color'] = {.43, .67, .64}}
if _G['SC'].BARS['CV'] == nil then--Crimson Vial
_G['SC'].BARS['CV'] = {['color'] = {.43, .67, .64}}
end
SC.BARS['CV']['tick'] = {
_G['SC'].BARS['CV']['tick'] = {
['obj'] = {},
['value'] = 1
}
if SC.BARS['CVCD'] == nil then--Crimson Vial
SC.BARS['CVCD'] = {['color'] = {.33, .57, .54}}
if _G['SC'].BARS['CVCD'] == nil then--Crimson Vial
_G['SC'].BARS['CVCD'] = {['color'] = {.33, .57, .54}}
end
if SC.BARS['CDCD'] == nil then--Cheated Death
SC.BARS['CDCD'] = {['color'] = {.2, .47, .19}}
if _G['SC'].BARS['CDCD'] == nil then--Cheated Death
_G['SC'].BARS['CDCD'] = {['color'] = {.2, .47, .19}}
end
if SC.BARS['SUB'] == nil then--Subterfuge
SC.BARS['SUB'] = {['color'] = {.04, .81, .82}}
if _G['SC'].BARS['SUB'] == nil then--Subterfuge
_G['SC'].BARS['SUB'] = {['color'] = {.04, .81, .82}}
end
if SC.BARS['TOTCD'] == nil then--Tricks of the Trade
SC.BARS['TOTCD'] = {['color'] = {.3, .3, 1}}
if _G['SC'].BARS['TOTCD'] == nil then--Tricks of the Trade
_G['SC'].BARS['TOTCD'] = {['color'] = {.3, .3, 1}}
end
if SC.BARS['COS'] == nil then--Cloak of Shadows
SC.BARS['COS'] = {['color'] = {.2, .4, .53}}
if _G['SC'].BARS['COS'] == nil then--Cloak of Shadows
_G['SC'].BARS['COS'] = {['color'] = {.2, .4, .53}}
end
if SC.BARS['COSCD'] == nil then--Cloak of Shadows CD
SC.BARS['COSCD'] = {['color'] = {.12, .32, .45}}
if _G['SC'].BARS['COSCD'] == nil then--Cloak of Shadows CD
_G['SC'].BARS['COSCD'] = {['color'] = {.12, .32, .45}}
end
if SC.BARS['EVA'] == nil then--Evasion
SC.BARS['EVA'] = {['color'] = {.42, .46, .51}}
if _G['SC'].BARS['EVA'] == nil then--Evasion
_G['SC'].BARS['EVA'] = {['color'] = {.42, .46, .51}}
end
if SC.BARS['EVACD'] == nil then--Evasion CD
SC.BARS['EVACD'] = {['color'] = {.42, .46, .51}}
if _G['SC'].BARS['EVACD'] == nil then--Evasion CD
_G['SC'].BARS['EVACD'] = {['color'] = {.42, .46, .51}}
end
if SC.BARS['SPR'] == nil then--Sprint
SC.BARS['SPR'] = {['color'] = {.83, .51, .27}}
if _G['SC'].BARS['SPR'] == nil then--Sprint
_G['SC'].BARS['SPR'] = {['color'] = {.83, .51, .27}}
end
if SC.BARS['SPRCD'] == nil then--Sprint CD
SC.BARS['SPRCD'] = {['color'] = {.83, .51, .27}}
if _G['SC'].BARS['SPRCD'] == nil then--Sprint CD
_G['SC'].BARS['SPRCD'] = {['color'] = {.83, .51, .27}}
end
if SC.BARS['ESSECD'] == nil then--Essence CD
SC.BARS['ESSECD'] = {['color'] = {.01, .59, .78}}
if _G['SC'].BARS['ESSECD'] == nil then--Essence CD
_G['SC'].BARS['ESSECD'] = {['color'] = {.01, .59, .78}}
end
 
SliceCommander:InitCovenantBarArray()
end
 
function SliceCommander:InitCovenantBarArray()
if SC.BARS['SUMSCD'] == nil then--Summon Steward (Kyrian)
SC.BARS['SUMSCD'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['SUMSCD'] == nil then--Summon Steward (Kyrian)
_G['SC'].BARS['SUMSCD'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['FCCD'] == nil then--Fleshcraft (Necrolord)
SC.BARS['FCCD'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['FCCD'] == nil then--Fleshcraft (Necrolord)
_G['SC'].BARS['FCCD'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['SOSCD'] == nil then--Soulshape (Night Fae)
SC.BARS['SOSCD'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['SOSCD'] == nil then--Soulshape (Night Fae)
_G['SC'].BARS['SOSCD'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['DOSCD'] == nil then--Door of Shadows (Venthyr)
SC.BARS['DOSCD'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['DOSCD'] == nil then--Door of Shadows (Venthyr)
_G['SC'].BARS['DOSCD'] = {['color'] = {.2, .45, .82}}
end
 
 
if SC.BARS['ERCD'] == nil then--Echoing Reprimand (Kyrian)
SC.BARS['ERCD'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['ERCD'] == nil then--Echoing Reprimand (Kyrian)
_G['SC'].BARS['ERCD'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['ER'] == nil then--Echoing Reprimand (Kyrian)
SC.BARS['ER'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['ER'] == nil then--Echoing Reprimand (Kyrian)
_G['SC'].BARS['ER'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['SBSCD'] == nil then--Serrated Bone Spike (Necrolord)
SC.BARS['SBSCD'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['SBSCD'] == nil then--Serrated Bone Spike (Necrolord)
_G['SC'].BARS['SBSCD'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['SBS'] == nil then--Serrated Bone Spike (Necrolord)
SC.BARS['SBS'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['SBS'] == nil then--Serrated Bone Spike (Necrolord)
_G['SC'].BARS['SBS'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['SP'] == nil then--Sepsis (Night Fae)
SC.BARS['SP'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['SP'] == nil then--Sepsis (Night Fae)
_G['SC'].BARS['SP'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['SPCD'] == nil then--Sepsis (Night Fae)
SC.BARS['SPCD'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['SPCD'] == nil then--Sepsis (Night Fae)
_G['SC'].BARS['SPCD'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['FLA'] == nil then--Flagellation (Venthyr)
SC.BARS['FLA'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['FLA'] == nil then--Flagellation (Venthyr)
_G['SC'].BARS['FLA'] = {['color'] = {.2, .45, .82}}
end
if SC.BARS['FLACD'] == nil then--Flagellation (Venthyr)
SC.BARS['FLACD'] = {['color'] = {.2, .45, .82}}
if _G['SC'].BARS['FLACD'] == nil then--Flagellation (Venthyr)
_G['SC'].BARS['FLACD'] = {['color'] = {.2, .45, .82}}
end
end
 
function SliceCommander:InitAssassinationBarArray()
if SC.BARS['GAR'] == nil then--Garrote
SC.BARS['GAR'] = {['color'] = {.83, .27, .27}}
if _G['SC'].BARS['GAR'] == nil then--Garrote
_G['SC'].BARS['GAR'] = {['color'] = {.83, .27, .27}}
end
SC.BARS['GAR']['tick'] = {
_G['SC'].BARS['GAR']['tick'] = {
['obj'] = {},
['value'] = 3
}
if SC.BARS['GARCD'] == nil then--Garrote CD
SC.BARS['GARCD'] = {['color'] = {.83, .27, .27}}
if _G['SC'].BARS['GARCD'] == nil then--Garrote CD
_G['SC'].BARS['GARCD'] = {['color'] = {.83, .27, .27}}
end
if SC.BARS['RUP'] == nil then--Rupture
SC.BARS['RUP'] = {['color'] = {.83, .27, .27}}
if _G['SC'].BARS['RUP'] == nil then--Rupture
_G['SC'].BARS['RUP'] = {['color'] = {.83, .27, .27}}
end
SC.BARS['RUP']['tick'] = {
_G['SC'].BARS['RUP']['tick'] = {
['obj'] = {},
['value'] = 2
}
if SC.BARS['BA'] == nil then--Blood of the Assassinated
SC.BARS['BA'] = {['color'] = {.83, .27, .27}}
if _G['SC'].BARS['BA'] == nil then--Blood of the Assassinated
_G['SC'].BARS['BA'] = {['color'] = {.83, .27, .27}}
end
if SC.BARS['EXCD'] == nil then--Exsanguinate
SC.BARS['EXCD'] = {['color'] = {.83, .27, .27}}
if _G['SC'].BARS['EXCD'] == nil then--Exsanguinate
_G['SC'].BARS['EXCD'] = {['color'] = {.83, .27, .27}}
end
if SC.BARS['DP'] == nil then--Deadly Poison
SC.BARS['DP'] = {['color'] = {.27, .68, .23}}
if _G['SC'].BARS['DP'] == nil then--Deadly Poison
_G['SC'].BARS['DP'] = {['color'] = {.27, .68, .23}}
end
if SC.BARS['ENV'] == nil then--Envenom
SC.BARS['ENV'] = {['color'] = {.27, .68, .23}}
if _G['SC'].BARS['ENV'] == nil then--Envenom
_G['SC'].BARS['ENV'] = {['color'] = {.27, .68, .23}}
end
if SC.BARS['ST'] == nil then--Surge of Toxins
SC.BARS['ST'] = {['color'] = {.27, .68, .23}}
if _G['SC'].BARS['ST'] == nil then--Surge of Toxins
_G['SC'].BARS['ST'] = {['color'] = {.27, .68, .23}}
end
if SC.BARS['KB'] == nil then--Kingsbane
SC.BARS['KB'] = {['color'] = {.27, .68, .23}}
if _G['SC'].BARS['KB'] == nil then--Kingsbane
_G['SC'].BARS['KB'] = {['color'] = {.27, .68, .23}}
end
if SC.BARS['KBCD'] == nil then--Kingsbane CD
SC.BARS['KBCD'] = {['color'] = {.27, .68, .23}}
if _G['SC'].BARS['KBCD'] == nil then--Kingsbane CD
_G['SC'].BARS['KBCD'] = {['color'] = {.27, .68, .23}}
end
if SC.BARS['EP'] == nil then--Elaborate Planning
SC.BARS['EP'] = {['color'] = {.83, .78, .27}}
if _G['SC'].BARS['EP'] == nil then--Elaborate Planning
_G['SC'].BARS['EP'] = {['color'] = {.83, .78, .27}}
end
if SC.BARS['VEN'] == nil then--Vendetta
SC.BARS['VEN'] = {['color'] = {.83, .53, .27}}
if _G['SC'].BARS['VEN'] == nil then--Vendetta
_G['SC'].BARS['VEN'] = {['color'] = {.83, .53, .27}}
end
if SC.BARS['VENCD'] == nil then--Vendetta CD
SC.BARS['VENCD'] = {['color'] = {.71, .4, .15}}
if _G['SC'].BARS['VENCD'] == nil then--Vendetta CD
_G['SC'].BARS['VENCD'] = {['color'] = {.71, .4, .15}}
end
if SC.BARS['BLS'] == nil then--Blindside
SC.BARS['BLS'] = {['color'] = {.52, .38, .75}}
if _G['SC'].BARS['BLS'] == nil then--Blindside
_G['SC'].BARS['BLS'] = {['color'] = {.52, .38, .75}}
end
if SC.BARS['MA'] == nil then--Master Assassin
SC.BARS['MA'] = {['color'] = {.42, .46, .51}}
if _G['SC'].BARS['MA'] == nil then--Master Assassin
_G['SC'].BARS['MA'] = {['color'] = {.42, .46, .51}}
end
if SC.BARS['CT'] == nil then--Crimson Tempest
SC.BARS['CT'] = {['color'] = {.71, .15, .15}}
if _G['SC'].BARS['CT'] == nil then--Crimson Tempest
_G['SC'].BARS['CT'] = {['color'] = {.71, .15, .15}}
end
SC.BARS['CT']['tick'] = {
_G['SC'].BARS['CT']['tick'] = {
['obj'] = {},
['value'] = 2
}
end
 
function SliceCommander:InitOutlawBarArray()--http://paletton.com/#uid=60s0u0klqqvbNEzh9uFpomItmi0
if SC.BARS['SND'] == nil then--Slice and Dice
SC.BARS['SND'] = {['color'] = {.83, .51, .27}}
if _G['SC'].BARS['SND'] == nil then--Slice and Dice
_G['SC'].BARS['SND'] = {['color'] = {.83, .51, .27}}
end
if SC.BARS['RB'] == nil then--Roll the Bones
SC.BARS['RB'] = {['color'] = {.83, .51, .27}}
if _G['SC'].BARS['RB'] == nil then--Roll the Bones
_G['SC'].BARS['RB'] = {['color'] = {.83, .51, .27}}
end
if SC.BARS['RBCD'] == nil then--Roll the Bones CD
SC.BARS['RBCD'] = {['color'] = {.83, .51, .27}}
if _G['SC'].BARS['RBCD'] == nil then--Roll the Bones CD
_G['SC'].BARS['RBCD'] = {['color'] = {.83, .51, .27}}
end
if SC.BARS['AR'] == nil then--Adrenaline Rush
SC.BARS['AR'] = {['color'] = {.83, .64, .27}}
if _G['SC'].BARS['AR'] == nil then--Adrenaline Rush
_G['SC'].BARS['AR'] = {['color'] = {.83, .64, .27}}
end
if SC.BARS['ARCD'] == nil then--Adrenaline Rush CD
SC.BARS['ARCD'] = {['color'] = {.71, .52, .15}}
if _G['SC'].BARS['ARCD'] == nil then--Adrenaline Rush CD
_G['SC'].BARS['ARCD'] = {['color'] = {.71, .52, .15}}
end
if SC.BARS['CDB'] == nil then--Curse of the Dreadblades
SC.BARS['CDB'] = {['color'] = {.2, .6, .36}}
if _G['SC'].BARS['CDB'] == nil then--Curse of the Dreadblades
_G['SC'].BARS['CDB'] = {['color'] = {.2, .6, .36}}
end
if SC.BARS['CDBCD'] == nil then--Curse of the Dreadblades CD
SC.BARS['CDBCD'] = {['color'] = {.2, .6, .36}}
if _G['SC'].BARS['CDBCD'] == nil then--Curse of the Dreadblades CD
_G['SC'].BARS['CDBCD'] = {['color'] = {.2, .6, .36}}
end
if SC.BARS['GS'] == nil then--Ghostly Strike
SC.BARS['GS'] = {['color'] = {.81, .27, .3}}
if _G['SC'].BARS['GS'] == nil then--Ghostly Strike
_G['SC'].BARS['GS'] = {['color'] = {.81, .27, .3}}
end
if SC.BARS['GSCD'] == nil then--Ghostly Strike CD
SC.BARS['GSCD'] = {['color'] = {.81, .27, .3}}
if _G['SC'].BARS['GSCD'] == nil then--Ghostly Strike CD
_G['SC'].BARS['GSCD'] = {['color'] = {.81, .27, .3}}
end
if SC.BARS['OP'] == nil then--Opportunity
SC.BARS['OP'] = {['color'] = {.83, .73, .27}}
if _G['SC'].BARS['OP'] == nil then--Opportunity
_G['SC'].BARS['OP'] = {['color'] = {.83, .73, .27}}
end
if SC.BARS['GSWW'] == nil then--Greenskin's Waterlogged Wristcuffs
SC.BARS['GSWW'] = {['color'] = {.81, .27, .3}}
if _G['SC'].BARS['GSWW'] == nil then--Greenskin's Waterlogged Wristcuffs
_G['SC'].BARS['GSWW'] = {['color'] = {.81, .27, .3}}
end
if SC.BARS['GHCD'] == nil then--Grappling Hook
SC.BARS['GHCD'] = {['color'] = {.83, .82, .27}}
if _G['SC'].BARS['GHCD'] == nil then--Grappling Hook
_G['SC'].BARS['GHCD'] = {['color'] = {.83, .82, .27}}
end
if SC.BARS['BE'] == nil then--Between the Eyes
SC.BARS['BE'] = {['color'] = {.62, .78, .26}}
if _G['SC'].BARS['BE'] == nil then--Between the Eyes
_G['SC'].BARS['BE'] = {['color'] = {.62, .78, .26}}
end
if SC.BARS['BECD'] == nil then--Between the Eyes CD
SC.BARS['BECD'] = {['color'] = {.62, .78, .26}}
if _G['SC'].BARS['BECD'] == nil then--Between the Eyes CD
_G['SC'].BARS['BECD'] = {['color'] = {.62, .78, .26}}
end
if SC.BARS['KSPCD'] == nil then--Killing Spree
SC.BARS['KSPCD'] = {['color'] = {.27, .68, .23}}
if _G['SC'].BARS['KSPCD'] == nil then--Killing Spree
_G['SC'].BARS['KSPCD'] = {['color'] = {.27, .68, .23}}
end
if SC.BARS['LD'] == nil then--Loaded Dice
SC.BARS['LD'] = {['color'] = {.63, .52, .38}}
if _G['SC'].BARS['LD'] == nil then--Loaded Dice
_G['SC'].BARS['LD'] = {['color'] = {.63, .52, .38}}
end
if SC.BARS['BF'] == nil then--Blade Flury
SC.BARS['BF'] = {['color'] = {.66, .22, .47}}
if _G['SC'].BARS['BF'] == nil then--Blade Flury
_G['SC'].BARS['BF'] = {['color'] = {.66, .22, .47}}
end
if SC.BARS['BFCD'] == nil then--Blade Flury CD
SC.BARS['BFCD'] = {['color'] = {.66, .22, .47}}
if _G['SC'].BARS['BFCD'] == nil then--Blade Flury CD
_G['SC'].BARS['BFCD'] = {['color'] = {.66, .22, .47}}
end
if SC.BARS['BRCD'] == nil then--Blade Rush
SC.BARS['BRCD'] = {['color'] = {.99, .99, .56}}
if _G['SC'].BARS['BRCD'] == nil then--Blade Rush
_G['SC'].BARS['BRCD'] = {['color'] = {.99, .99, .56}}
end
if SC.BARS['GG'] == nil then--Gouge
SC.BARS['GG'] = {['color'] = {.81, .27, .3}}
if _G['SC'].BARS['GG'] == nil then--Gouge
_G['SC'].BARS['GG'] = {['color'] = {.81, .27, .3}}
end
if SC.BARS['GGCD'] == nil then--Gouge CD
SC.BARS['GGCD'] = {['color'] = {.81, .27, .3}}
if _G['SC'].BARS['GGCD'] == nil then--Gouge CD
_G['SC'].BARS['GGCD'] = {['color'] = {.81, .27, .3}}
end
end
 
function SliceCommander:InitSubtletyBarArray()--http://paletton.com/#uid=64r0u0kleqtbzEKgVuIpcmGtdhZ
if SC.BARS['GB'] == nil then--Goremaw's Bite
SC.BARS['GB'] = {['color'] = {.52, .18, .54}}
if _G['SC'].BARS['GB'] == nil then--Goremaw's Bite
_G['SC'].BARS['GB'] = {['color'] = {.52, .18, .54}}
end
if SC.BARS['GBCD'] == nil then--Goremaw's Bite CD
SC.BARS['GBCD'] = {['color'] = {.52, .18, .54}}
if _G['SC'].BARS['GBCD'] == nil then--Goremaw's Bite CD
_G['SC'].BARS['GBCD'] = {['color'] = {.52, .18, .54}}
end
if SC.BARS['SOD'] == nil then--Symbols of Death
SC.BARS['SOD'] = {['color'] = {.25, .26, .58}}
if _G['SC'].BARS['SOD'] == nil then--Symbols of Death
_G['SC'].BARS['SOD'] = {['color'] = {.25, .26, .58}}
end
if SC.BARS['SODCD'] == nil then--Symbols of Death CD
SC.BARS['SODCD'] = {['color'] = {.25, .26, .58}}
if _G['SC'].BARS['SODCD'] == nil then--Symbols of Death CD
_G['SC'].BARS['SODCD'] = {['color'] = {.25, .26, .58}}
end
if SC.BARS['SB'] == nil then--Shadow Blades
SC.BARS['SB'] = {['color'] = {.19, .58, .39}}
if _G['SC'].BARS['SB'] == nil then--Shadow Blades
_G['SC'].BARS['SB'] = {['color'] = {.19, .58, .39}}
end
if SC.BARS['SBCD'] == nil then--Shadow Blades CD
SC.BARS['SBCD'] = {['color'] = {.1, .5, .31}}
if _G['SC'].BARS['SBCD'] == nil then--Shadow Blades CD
_G['SC'].BARS['SBCD'] = {['color'] = {.1, .5, .31}}
end
if SC.BARS['SD'] == nil then--Shadow Dance
SC.BARS['SD'] = {['color'] = {.2, .4, .53}}
if _G['SC'].BARS['SD'] == nil then--Shadow Dance
_G['SC'].BARS['SD'] = {['color'] = {.2, .4, .53}}
end
if SC.BARS['SDCD'] == nil then--Shadow Dance CD
SC.BARS['SDCD'] = {['color'] = {.12, .32, .45}}
if _G['SC'].BARS['SDCD'] == nil then--Shadow Dance CD
_G['SC'].BARS['SDCD'] = {['color'] = {.12, .32, .45}}
end
if SC.BARS['SHT'] == nil then--Shuriken Tornado
SC.BARS['SHT'] = {['color'] = {.6, .55, .17}}
if _G['SC'].BARS['SHT'] == nil then--Shuriken Tornado
_G['SC'].BARS['SHT'] = {['color'] = {.6, .55, .17}}
end
SC.BARS['SHT']['tick'] = {
_G['SC'].BARS['SHT']['tick'] = {
['obj'] = {},
['value'] = 1
}
if SC.BARS['SHTCD'] == nil then--Shuriken Tornado CD
SC.BARS['SHTCD'] = {['color'] = {.6, .55, .17}}
if _G['SC'].BARS['SHTCD'] == nil then--Shuriken Tornado CD
_G['SC'].BARS['SHTCD'] = {['color'] = {.6, .55, .17}}
end
if SC.BARS['STHCD'] == nil then--Secret Technique
SC.BARS['STHCD'] = {['color'] = {.52, .18, .54}}
if _G['SC'].BARS['STHCD'] == nil then--Secret Technique
_G['SC'].BARS['STHCD'] = {['color'] = {.52, .18, .54}}
end
if SC.BARS['FW'] == nil then--Find Weakness
SC.BARS['FW'] = {['color'] = {.28, .86, .47}}
if _G['SC'].BARS['FW'] == nil then--Find Weakness
_G['SC'].BARS['FW'] = {['color'] = {.28, .86, .47}}
end
end
 
function SliceCommander:InitBarArray()
if SC.BARS == nil then
SC.BARS = {}
if _G['SC'].BARS == nil then
_G['SC'].BARS = {}
end
 
SliceCommander:InitGlobalBarArray()
1223,50 → 1224,50
SliceCommander:InitOutlawBarArray()
SliceCommander:InitSubtletyBarArray()
 
for k, v in pairs(SC.BARS) do
SC.BARS[k]['obj'] = 0
SC.BARS[k]['pandemic'] = false
SC.BARS[k]['expire'] = 0
SC.BARS[k]['name'] = SC_SPELL[k]
SC.BARS[k]['id'] = SC_SPELLID[k]
for k, v in pairs(_G['SC'].BARS) do
_G['SC'].BARS[k]['obj'] = 0
_G['SC'].BARS[k]['pandemic'] = false
_G['SC'].BARS[k]['expire'] = 0
_G['SC'].BARS[k]['name'] = SC_SPELL[k]
_G['SC'].BARS[k]['id'] = SC_SPELLID[k]
end
 
local buff = {'AR', 'SUB', 'EP', 'CV', 'AC', 'FE', 'SND', 'SD', 'SOD', 'SB', 'OP', 'ENV', 'GB', 'GSWW', 'MAI', 'LD', 'BF', 'SHT', 'COS', 'EVA', 'SPR', 'BLS', 'MA', 'SS', 'ER'}
for i, v in ipairs(buff) do--BUFF
SC.BARS[v]['type'] = 1
_G['SC'].BARS[v]['type'] = 1
end
 
local debuff = {'GAR', 'RUP', 'DP', 'KS', 'CS', 'VEN', 'GS', 'KB', 'BA', 'ST', 'CT', 'BE', 'GG', 'FW', 'SP', 'FLA', 'SBS'}
for i, v in ipairs(debuff) do--DEBUFF
SC.BARS[v]['type'] = 2
_G['SC'].BARS[v]['type'] = 2
end
 
local selfdebuff = {'CDCD', 'CDB'}
for i, v in ipairs(selfdebuff) do--SELF DEBUF
SC.BARS[v]['type'] = 3
_G['SC'].BARS[v]['type'] = 3
end
 
local cd = {'VANCD', 'KSPCD', 'ARCD', 'CDBCD', 'CVCD', 'MDCD', 'GHCD', 'BECD', 'TOTCD', 'SDCD', 'SBCD', 'VENCD', 'GBCD', 'EXCD', 'GARCD', 'KBCD', 'KSCD', 'DFACD', 'KICD', 'SODCD', 'SHTCD', 'STHCD', 'COSCD', 'EVACD', 'SPRCD', 'FECD', 'GSCD', 'BRCD', 'GGCD', 'ESSECD', 'BFCD', 'RBCD', 'SUMSCD', 'FCCD', 'SOSCD', 'DOSCD', 'ERCD', 'SPCD', 'FLACD'}
for i, v in ipairs(cd) do--CD
SC.BARS[v]['type'] = 4
_G['SC'].BARS[v]['type'] = 4
end
 
--CHARGE CD
SC.BARS['SDCD']['type'] = 5
SC.BARS['SSCD']['type'] = 5
SC.BARS['SBSCD']['type'] = 5
_G['SC'].BARS['SDCD']['type'] = 5
_G['SC'].BARS['SSCD']['type'] = 5
_G['SC'].BARS['SBSCD']['type'] = 5
 
--MULTIPLE BUFF BAR
SC.BARS['RB']['type'] = 6
_G['SC'].BARS['RB']['type'] = 6
 
--[[local chargecd = {'SDCD'}
for i, v in ipairs(chargecd) do
SC.BARS[v]['type'] = 5
_G['SC'].BARS[v]['type'] = 5
end
 
local chargecd = {'RB'}
for i, v in ipairs(chargecd) do
SC.BARS[v]['type'] = 6
_G['SC'].BARS[v]['type'] = 6
end]]
 
local pandemic = {
1309,8 → 1310,8
}
}
for i, v in pairs(pandemic) do
SC.BARS[i]['pandemic'] = true
SC.BARS[i]['pandemictimer'] = v
SC.BARS[i]['pandemicobj'] = nil
_G['SC'].BARS[i]['pandemic'] = true
_G['SC'].BARS[i]['pandemictimer'] = v
_G['SC'].BARS[i]['pandemicobj'] = nil
end
end
\ No newline at end of file
trunk/Core/Object.lua
1,5 → 1,6
local Smoother = LibStub("LibSmoothStatusBar-1.0")
local Glower = LibStub("LibCustomGlow-1.0")
local _G = getfenv(0)
 
function SliceCommander:NewFrame(color, name)
local f = CreateFrame("StatusBar", 'SliceCommander_bar_' .. name, UIParent, BackdropTemplateMixin and "BackdropTemplate")
14,7 → 15,7
 
-- text on the right --
f.text = f:CreateFontString(nil, nil, 'GameFontNormal')
f.text:SetFontObject(SC.BarFont1)
f.text:SetFontObject(_G['SC'].BarFont1)
f.text:SCWidth(120)
f.text:SCPoint("TOPRIGHT", f, "TOPRIGHT", -5, 0)
f.text:SetJustifyH("RIGHT")
26,7 → 27,7
-- text on the center --
f.text2 = f:CreateFontString(nil, nil, 'GameFontNormal')
f.text2:SCPoint("CENTER", f, "CENTER", -8, 0)
f.text2:SetFontObject(SC.BarFont1)
f.text2:SetFontObject(_G['SC'].BarFont1)
f.text2:SCWidth(200)
f.text2:SetJustifyH("CENTER")
 
136,8 → 137,8
f:SetFrameStrata("MEDIUM")
f:Hide()
f:SetDefaultBackdrop()
local r,v,b = unpack(SC.V.bColor)
f:SetBackdropBorderColor(unpack(SC.V.wColor))
local r,v,b = unpack(_G['SC'].V.bColor)
f:SetBackdropBorderColor(unpack(_G['SC'].V.wColor))
f:SetBackdropColor(r,v,b,0)
f:SetPoint(point, VTimerEnergy, relativePoint, x, y)
return f
150,11 → 151,11
SliceCommanderFrame:SetMovable(true)
SliceCommanderFrame:SCSize(216, 36)
SliceCommanderFrame:SetPoint(
SC.OTHER['SliceCommanderFrame']['position'].point,
SC.OTHER['SliceCommanderFrame']['position'].relativeTo,
SC.OTHER['SliceCommanderFrame']['position'].relativePoint,
SC.OTHER['SliceCommanderFrame']['position'].xOfs,
SC.OTHER['SliceCommanderFrame']['position'].yOfs
_G['SC'].OTHER['SliceCommanderFrame']['position'].point,
_G['SC'].OTHER['SliceCommanderFrame']['position'].relativeTo,
_G['SC'].OTHER['SliceCommanderFrame']['position'].relativePoint,
_G['SC'].OTHER['SliceCommanderFrame']['position'].xOfs,
_G['SC'].OTHER['SliceCommanderFrame']['position'].yOfs
)
SliceCommanderFrame:SetDefaultBackdrop()
SliceCommanderFrame:SetBackdropColor(0.7,0.2,0.2,1)
172,14 → 173,14
f:SetFrameLevel(1)
f:SetMinMaxValues(0,UnitPowerMax("player", Enum.PowerType.Energy))
f:SetDefaultBackdrop()
f:SetBackdropBorderColor(unpack(SC.V.wColor))
f:SetBackdropBorderColor(unpack(_G['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:SetStatusBarColor(unpack(_G['SC'].SET.energyColor))
f.border = SliceCommander:tukSkin(f, false)
if SC.SET.HideEnergy then
if _G['SC'].SET.HideEnergy then
f:Hide()
else
f:Show()
205,10 → 206,10
 
function SliceCommander:CreateSpark()
for i = 1, 3 do
SC.Spark[i] = VTimerEnergy:CreateTexture(nil, 'OVERLAY', nil, 1)
SC.Spark[i]:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
SC.Spark[i]:SetBlendMode('ADD')
SC.Spark[i]:SCSize(5,20)
_G['SC'].Spark[i] = VTimerEnergy:CreateTexture(nil, 'OVERLAY', nil, 1)
_G['SC'].Spark[i]:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
_G['SC'].Spark[i]:SetBlendMode('ADD')
_G['SC'].Spark[i]:SCSize(5,20)
end
end
 
216,7 → 217,7
local tickObj = BAR['obj']:CreateTexture(nil, 'OVERLAY', nil, 1)
tickObj:SetTexture('Interface\\AddOns\\SliceCommander\\Images\\solid.tga')
tickObj:SCWidth(2)
tickObj:SCHeight(SC.SET.TimerHeight)
tickObj:SCHeight(_G['SC'].SET.TimerHeight)
tickObj:SetVertexColor(226/255, 226/255, 226/255, 0.75)
table.insert(_G['SCtick'], tickObj)
return tickObj
229,11 → 230,11
MoveFrame:SetMovable(true)
MoveFrame:SCSize(28, 28)
MoveFrame:SetPoint(
SC.OTHER[name]['position'].point,
SC.OTHER[name]['position'].relativeTo,
SC.OTHER[name]['position'].relativePoint,
SC.OTHER[name]['position'].xOfs,
SC.OTHER[name]['position'].yOfs
_G['SC'].OTHER[name]['position'].point,
_G['SC'].OTHER[name]['position'].relativeTo,
_G['SC'].OTHER[name]['position'].relativePoint,
_G['SC'].OTHER[name]['position'].xOfs,
_G['SC'].OTHER[name]['position'].yOfs
)
MoveFrame:SetDefaultBackdrop()
MoveFrame:SetBackdropColor(0.7,0.2,0.2,1)
272,9 → 273,9
f.iconTxt:SetJustifyH("CENTER")
f.iconTxt:SetJustifyV("MIDDLE")
f.iconTxt:SCPoint('CENTER', f, "CENTER", 2, 0)
f.iconTxt:SetFontObject(SC.FontIcon)
f.iconTxt:SetFontObject(_G['SC'].FontIcon)
f.iconTxt:SetShadowColor(0,0,0,1)
f.iconTxt:SetShadowOffset(2*SC.V.pxW, -2*SC.V.pxH)
f.iconTxt:SetShadowOffset(2*_G['SC'].V.pxW, -2*_G['SC'].V.pxH)
 
return f
end
307,8 → 308,8
 
function SliceCommander:tukSkin(frame, texture)
return {
[1] = SliceCommander:CreateTextureSkin(frame, SC.V.bColor, 1, texture),
[2] = SliceCommander:CreateTextureSkin(frame, SC.V.wColor, 2, texture),
[3] = SliceCommander:CreateTextureSkin(frame, SC.V.bColor, 3, texture)
[1] = SliceCommander:CreateTextureSkin(frame, _G['SC'].V.bColor, 1, texture),
[2] = SliceCommander:CreateTextureSkin(frame, _G['SC'].V.wColor, 2, texture),
[3] = SliceCommander:CreateTextureSkin(frame, _G['SC'].V.bColor, 3, texture)
}
end
\ No newline at end of file
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
168,7 → 168,7
text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-8,0)
self.text = text
 
local highlight = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local highlight = frame:CreateTexture(nil, "OVERLAY")
highlight:SetTexture(136810) -- Interface\\QuestFrame\\UI-QuestTitleHighlight
highlight:SetBlendMode("ADD")
highlight:SetHeight(14)
178,7 → 178,7
highlight:Hide()
self.highlight = highlight
 
local check = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local check = frame:CreateTexture(nil, "OVERLAY")
check:SetWidth(16)
check:SetHeight(16)
check:SetPoint("LEFT",frame,"LEFT",3,-1)
186,7 → 186,7
check:Hide()
self.check = check
 
local sub = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local sub = frame:CreateTexture(nil, "OVERLAY")
sub:SetWidth(16)
sub:SetHeight(16)
sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
453,7 → 453,7
 
self.SetDisabled = SetDisabled
 
local line = self.frame:CreateTexture(nil, "OVERLAY", nil, 1)
local line = self.frame:CreateTexture(nil, "OVERLAY")
line:SetHeight(1)
line:SetColorTexture(.5, .5, .5)
line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
trunk/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
320,7 → 320,7
local button = CreateFrame("Button", ("AceGUI30TreeButton%d"):format(num), self.treeframe, "OptionsListButtonTemplate")
button.obj = self
 
local icon = button:CreateTexture(nil, "OVERLAY", nil, 1)
local icon = button:CreateTexture(nil, "OVERLAY")
icon:SetWidth(14)
icon:SetHeight(14)
button.icon = icon
677,7 → 677,7
scrollbar:SetWidth(16)
scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
 
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND", nil, 1)
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
scrollbg:SetAllPoints(scrollbar)
scrollbg:SetColorTexture(0,0,0,0.4)
 
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
133,13 → 133,13
frame:SetScript("OnLeave", Control_OnLeave)
frame:SetScript("OnClick", ColorSwatch_OnClick)
 
local colorSwatch = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local colorSwatch = frame:CreateTexture(nil, "OVERLAY")
colorSwatch:SetWidth(19)
colorSwatch:SetHeight(19)
colorSwatch:SetTexture(130939) -- Interface\\ChatFrame\\ChatFrameColorSwatch
colorSwatch:SetPoint("LEFT")
 
local texture = frame:CreateTexture(nil, "BACKGROUND", nil, 1)
local texture = frame:CreateTexture(nil, "BACKGROUND")
colorSwatch.background = texture
texture:SetWidth(16)
texture:SetHeight(16)
147,7 → 147,7
texture:SetPoint("CENTER", colorSwatch)
texture:Show()
 
local checkers = frame:CreateTexture(nil, "BACKGROUND", nil, 1)
local checkers = frame:CreateTexture(nil, "BACKGROUND")
colorSwatch.checkers = checkers
checkers:SetWidth(14)
checkers:SetHeight(14)
165,7 → 165,7
text:SetPoint("LEFT", colorSwatch, "RIGHT", 2, 0)
text:SetPoint("RIGHT")
 
--local highlight = frame:CreateTexture(nil, "HIGHLIGHT", nil, 1)
--local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
--highlight:SetTexture(136810) -- Interface\\QuestFrame\\UI-QuestTitleHighlight
--highlight:SetBlendMode("ADD")
--highlight:SetAllPoints(frame)
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
75,7 → 75,7
frame:SetScript("OnLeave", Control_OnLeave)
frame:SetScript("OnMouseDown", Label_OnClick)
 
local highlight = frame:CreateTexture(nil, "HIGHLIGHT", nil, 1)
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
highlight:SetTexture(nil)
highlight:SetAllPoints()
highlight:SetBlendMode("ADD")
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
160,7 → 160,7
frame:Hide()
 
local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall")
local image = frame:CreateTexture(nil, "BACKGROUND", nil, 1)
local image = frame:CreateTexture(nil, "BACKGROUND")
 
-- create widget
local widget = {
trunk/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
241,37 → 241,37
tab.deselectedTextY = -3
tab.selectedTextY = -2
 
tab.LeftDisabled = tab:CreateTexture(tabname .. "LeftDisabled", "BORDER", nil, 1)
tab.LeftDisabled = tab:CreateTexture(tabname .. "LeftDisabled", "BORDER")
tab.LeftDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
tab.LeftDisabled:SetSize(20, 24)
tab.LeftDisabled:SetPoint("BOTTOMLEFT", 0, -3)
tab.LeftDisabled:SetTexCoord(0, 0.15625, 0, 1.0)
 
tab.MiddleDisabled = tab:CreateTexture(tabname .. "MiddleDisabled", "BORDER", nil, 1)
tab.MiddleDisabled = tab:CreateTexture(tabname .. "MiddleDisabled", "BORDER")
tab.MiddleDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
tab.MiddleDisabled:SetSize(88, 24)
tab.MiddleDisabled:SetPoint("LEFT", tab.LeftDisabled, "RIGHT")
tab.MiddleDisabled:SetTexCoord(0.15625, 0.84375, 0, 1.0)
 
tab.RightDisabled = tab:CreateTexture(tabname .. "RightDisabled", "BORDER", nil, 1)
tab.RightDisabled = tab:CreateTexture(tabname .. "RightDisabled", "BORDER")
tab.RightDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
tab.RightDisabled:SetSize(20, 24)
tab.RightDisabled:SetPoint("LEFT", tab.MiddleDisabled, "RIGHT")
tab.RightDisabled:SetTexCoord(0.84375, 1.0, 0, 1.0)
 
tab.Left = tab:CreateTexture(tabname .. "Left", "BORDER", nil, 1)
tab.Left = tab:CreateTexture(tabname .. "Left", "BORDER")
tab.Left:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
tab.Left:SetSize(20, 24)
tab.Left:SetPoint("TOPLEFT")
tab.Left:SetTexCoord(0, 0.15625, 0, 1.0)
 
tab.Middle = tab:CreateTexture(tabname .. "Middle", "BORDER", nil, 1)
tab.Middle = tab:CreateTexture(tabname .. "Middle", "BORDER")
tab.Middle:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
tab.Middle:SetSize(88, 24)
tab.Middle:SetPoint("LEFT", tab.Left, "RIGHT")
tab.Middle:SetTexCoord(0.15625, 0.84375, 0, 1.0)
 
tab.Right = tab:CreateTexture(tabname .. "Right", "BORDER", nil, 1)
tab.Right = tab:CreateTexture(tabname .. "Right", "BORDER")
tab.Right:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
tab.Right:SetSize(20, 24)
tab.Right:SetPoint("LEFT", tab.Middle, "RIGHT")
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
247,13 → 247,13
frame:SetScript("OnMouseDown", CheckBox_OnMouseDown)
frame:SetScript("OnMouseUp", CheckBox_OnMouseUp)
 
local checkbg = frame:CreateTexture(nil, "ARTWORK", nil, 1)
local checkbg = frame:CreateTexture(nil, "ARTWORK")
checkbg:SetWidth(24)
checkbg:SetHeight(24)
checkbg:SetPoint("TOPLEFT")
checkbg:SetTexture(130755) -- Interface\\Buttons\\UI-CheckBox-Up
 
local check = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local check = frame:CreateTexture(nil, "OVERLAY")
check:SetAllPoints(checkbg)
check:SetTexture(130751) -- Interface\\Buttons\\UI-CheckBox-Check
 
263,12 → 263,12
text:SetPoint("LEFT", checkbg, "RIGHT")
text:SetPoint("RIGHT")
 
local highlight = frame:CreateTexture(nil, "HIGHLIGHT", nil, 1)
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
highlight:SetTexture(130753) -- Interface\\Buttons\\UI-CheckBox-Highlight
highlight:SetBlendMode("ADD")
highlight:SetAllPoints(checkbg)
 
local image = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local image = frame:CreateTexture(nil, "OVERLAY")
image:SetHeight(16)
image:SetWidth(16)
image:SetPoint("LEFT", checkbg, "RIGHT", 1, 0)
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
111,12 → 111,12
label:SetJustifyV("TOP")
label:SetHeight(18)
 
local image = frame:CreateTexture(nil, "BACKGROUND", nil, 1)
local image = frame:CreateTexture(nil, "BACKGROUND")
image:SetWidth(64)
image:SetHeight(64)
image:SetPoint("TOP", 0, -5)
 
local highlight = frame:CreateTexture(nil, "HIGHLIGHT", nil, 1)
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
highlight:SetAllPoints(image)
highlight:SetTexture(136580) -- Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight
highlight:SetTexCoord(0, 1, 0.23, 0.77)
trunk/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
220,7 → 220,7
statustext:SetJustifyH("LEFT")
statustext:SetText("")
 
local titlebg = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local titlebg = frame:CreateTexture(nil, "OVERLAY")
titlebg:SetTexture(131080) -- Interface\\DialogFrame\\UI-DialogBox-Header
titlebg:SetTexCoord(0.31, 0.67, 0, 0.63)
titlebg:SetPoint("TOP", 0, 12)
236,14 → 236,14
local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
titletext:SetPoint("TOP", titlebg, "TOP", 0, -14)
 
local titlebg_l = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local titlebg_l = frame:CreateTexture(nil, "OVERLAY")
titlebg_l:SetTexture(131080) -- Interface\\DialogFrame\\UI-DialogBox-Header
titlebg_l:SetTexCoord(0.21, 0.31, 0, 0.63)
titlebg_l:SetPoint("RIGHT", titlebg, "LEFT")
titlebg_l:SetWidth(30)
titlebg_l:SetHeight(40)
 
local titlebg_r = frame:CreateTexture(nil, "OVERLAY", nil, 1)
local titlebg_r = frame:CreateTexture(nil, "OVERLAY")
titlebg_r:SetTexture(131080) -- Interface\\DialogFrame\\UI-DialogBox-Header
titlebg_r:SetTexCoord(0.67, 0.77, 0, 0.63)
titlebg_r:SetPoint("LEFT", titlebg, "RIGHT")
258,7 → 258,7
sizer_se:SetScript("OnMouseDown",SizerSE_OnMouseDown)
sizer_se:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
 
local line1 = sizer_se:CreateTexture(nil, "BACKGROUND", nil, 1)
local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
line1:SetWidth(14)
line1:SetHeight(14)
line1:SetPoint("BOTTOMRIGHT", -8, 8)
266,7 → 266,7
local x = 0.1 * 14/17
line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
 
local line2 = sizer_se:CreateTexture(nil, "BACKGROUND", nil, 1)
local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
line2:SetWidth(8)
line2:SetHeight(8)
line2:SetPoint("BOTTOMRIGHT", -8, 8)
trunk/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
47,14 → 47,14
label:SetPoint("BOTTOM")
label:SetJustifyH("CENTER")
 
local left = frame:CreateTexture(nil, "BACKGROUND", nil, 1)
local left = frame:CreateTexture(nil, "BACKGROUND")
left:SetHeight(8)
left:SetPoint("LEFT", 3, 0)
left:SetPoint("RIGHT", label, "LEFT", -5, 0)
left:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border
left:SetTexCoord(0.81, 0.94, 0.5, 1)
 
local right = frame:CreateTexture(nil, "BACKGROUND", nil, 1)
local right = frame:CreateTexture(nil, "BACKGROUND")
right:SetHeight(8)
right:SetPoint("RIGHT", -3, 0)
right:SetPoint("LEFT", label, "RIGHT", 5, 0)
trunk/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
189,67 → 189,67
end
frame:SetToplevel(true)
 
local titlebg = frame:CreateTexture(nil, "BACKGROUND", nil, 1)
local titlebg = frame:CreateTexture(nil, "BACKGROUND")
titlebg:SetTexture(251966) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Title-Background
titlebg:SetPoint("TOPLEFT", 9, -6)
titlebg:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", -28, -24)
 
local dialogbg = frame:CreateTexture(nil, "BACKGROUND", nil, 1)
local dialogbg = frame:CreateTexture(nil, "BACKGROUND")
dialogbg:SetTexture(137056) -- Interface\\Tooltips\\UI-Tooltip-Background
dialogbg:SetPoint("TOPLEFT", 8, -24)
dialogbg:SetPoint("BOTTOMRIGHT", -6, 8)
dialogbg:SetVertexColor(0, 0, 0, .75)
 
local topleft = frame:CreateTexture(nil, "BORDER", nil, 1)
local topleft = frame:CreateTexture(nil, "BORDER")
topleft:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
topleft:SetWidth(64)
topleft:SetHeight(64)
topleft:SetPoint("TOPLEFT")
topleft:SetTexCoord(0.501953125, 0.625, 0, 1)
 
local topright = frame:CreateTexture(nil, "BORDER", nil, 1)
local topright = frame:CreateTexture(nil, "BORDER")
topright:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
topright:SetWidth(64)
topright:SetHeight(64)
topright:SetPoint("TOPRIGHT")
topright:SetTexCoord(0.625, 0.75, 0, 1)
 
local top = frame:CreateTexture(nil, "BORDER", nil, 1)
local top = frame:CreateTexture(nil, "BORDER")
top:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
top:SetHeight(64)
top:SetPoint("TOPLEFT", topleft, "TOPRIGHT")
top:SetPoint("TOPRIGHT", topright, "TOPLEFT")
top:SetTexCoord(0.25, 0.369140625, 0, 1)
 
local bottomleft = frame:CreateTexture(nil, "BORDER", nil, 1)
local bottomleft = frame:CreateTexture(nil, "BORDER")
bottomleft:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
bottomleft:SetWidth(64)
bottomleft:SetHeight(64)
bottomleft:SetPoint("BOTTOMLEFT")
bottomleft:SetTexCoord(0.751953125, 0.875, 0, 1)
 
local bottomright = frame:CreateTexture(nil, "BORDER", nil, 1)
local bottomright = frame:CreateTexture(nil, "BORDER")
bottomright:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
bottomright:SetWidth(64)
bottomright:SetHeight(64)
bottomright:SetPoint("BOTTOMRIGHT")
bottomright:SetTexCoord(0.875, 1, 0, 1)
 
local bottom = frame:CreateTexture(nil, "BORDER", nil, 1)
local bottom = frame:CreateTexture(nil, "BORDER")
bottom:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
bottom:SetHeight(64)
bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT")
bottom:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMLEFT")
bottom:SetTexCoord(0.376953125, 0.498046875, 0, 1)
 
local left = frame:CreateTexture(nil, "BORDER", nil, 1)
local left = frame:CreateTexture(nil, "BORDER")
left:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
left:SetWidth(64)
left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT")
left:SetPoint("BOTTOMLEFT", bottomleft, "TOPLEFT")
left:SetTexCoord(0.001953125, 0.125, 0, 1)
 
local right = frame:CreateTexture(nil, "BORDER", nil, 1)
local right = frame:CreateTexture(nil, "BORDER")
right:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
right:SetWidth(64)
right:SetPoint("TOPRIGHT", topright, "BOTTOMRIGHT")
285,7 → 285,7
sizer_se:SetScript("OnMouseUp", sizerOnMouseUp)
self.sizer_se = sizer_se
 
local line1 = sizer_se:CreateTexture(nil, "BACKGROUND", nil, 1)
local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
self.line1 = line1
line1:SetWidth(14)
line1:SetHeight(14)
294,7 → 294,7
local x = 0.1 * 14/17
line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
 
local line2 = sizer_se:CreateTexture(nil, "BACKGROUND", nil, 1)
local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
self.line2 = line2
line2:SetWidth(8)
line2:SetHeight(8)
trunk/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
185,7 → 185,7
-- set the script as the last step, so it doesn't fire yet
scrollbar:SetScript("OnValueChanged", ScrollBar_OnScrollValueChanged)
 
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND", nil, 1)
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
scrollbg:SetAllPoints(scrollbar)
scrollbg:SetColorTexture(0, 0, 0, 0.4)
 
trunk/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
1,6 → 1,7
--@curseforge-project-slug: libsharedmedia-3-0@
--[[
Name: LibSharedMedia-3.0
Revision: $Revision: 114 $
Revision: $Revision: 128 $
Author: Elkano (elkano@gmx.de)
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
trunk/Libs/LibSharedMedia-3.0/lib.xml
1,5 → 1,4
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Include file="LibSharedMedia-3.0\lib.xml"/>
<Script file="LibSharedMedia-3.0.lua" />
</Ui>
 
trunk/SliceCommander.toc
1,6 → 1,6
## Interface: 100200
## Author: Tomate
## Version: 10.00
## Version: 10.01
## Title: |TInterface\Icons\ClassIcon_Rogue:0|t |cffd38245Slice|r|cff45ad3bCommander|r |TInterface\Icons\ClassIcon_Rogue:0|t
## Notes: Energy bar, Combo point bar and rogue timer bar.
## SavedVariables: SC