WoWInterface SVN SliceCommander

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 251 to Rev 252
    Reverse comparison

Rev 251 → Rev 252

trunk/Core/Settings.lua
290,6 → 290,19
}
end
 
function SliceCommander:getIconSpellSound(spell)
return {
Tick3 = SliceCommander:getIconSoundSetting(L["Alert - 3 sec"], L["Alert 3 secondes before fade"], spell, 'alert3'),
Tick2 = SliceCommander:getIconSoundSetting(L["Alert - 2 sec"], L["Alert 2 secondes before fade"], spell, 'alert2'),
Tick1 = SliceCommander:getIconSoundSetting(L["Alert - 1 sec"], L["Alert 1 secondes before fade"], spell, 'alert1'),
Apply3 = SliceCommander:getIconSoundSetting(L["Refresh - 3 sec"], L["Refresh 3 secondes before fade"], spell, 'refresh3'),
Apply2 = SliceCommander:getIconSoundSetting(L["Refresh - 2 sec"], L["Refresh 2 secondes before fade"], spell, 'refresh2'),
Apply1 = SliceCommander:getIconSoundSetting(L["Refresh - 1 sec"], L["Refresh 1 secondes before fade"], spell, 'refresh1'),
Applied = SliceCommander:getIconSoundSetting(L["Applied"], string.format(L["%s is applied"], SC_SPELL[spell]), spell, 'applied'),
Expire = SliceCommander:getIconSoundSetting(L["Expired"], string.format(L["%s buff expire"], SC_SPELL[spell]), spell, 'expired')
}
end
 
function SliceCommander:getEnergyMarkerSetting(spec, id)
local maxi = 150
if spec == 1 then
344,6 → 357,25
}
end
 
function SliceCommander:getIconSoundSetting(name, description, spell, id)
return {
order = SliceCommander:getOrder(),
name = name,
desc = description,
type = "select",
dialogControl = 'LSM30_Sound',
values = LSM:HashTable("sound"),
set = function(info,val)
_G['SC'].ICONS[spell]['sound'][id] = val
end,
get = function(info)
if _G['SC'].ICONS[spell]['sound'] == nil then _G['SC'].ICONS[spell]['sound'] = {} end
if _G['SC'].ICONS[spell]['sound'][id] == nil then _G['SC'].ICONS[spell]['sound'][id] = 'None' end
return _G['SC'].ICONS[spell]['sound'][id]
end
}
end
 
function SliceCommander:getShortcutSetting(sc_categ, sub_categ, spell, label)
if label == nill then
label = SC_SPELL[spell]
1077,6 → 1109,8
Shortcut_AR = SliceCommander:getShortcutSetting("SliceCommander_Outlaw", "Talents", "AR"),
Shortcut_RB = SliceCommander:getShortcutSetting("SliceCommander_Outlaw", "Talents", "RB"),
Shortcut_KIRCD = SliceCommander:getShortcutSetting("SliceCommander_Outlaw", "Talents", "KIRCD"),
Shortcut_AUD = SliceCommander:getShortcutSetting("SliceCommander_Outlaw", "Talents", "AUD"),
EnergySetting = SliceCommander:getEnergyMarkerSettings(1),
GS = SliceCommander:getSpellCDSettings('GS'),
KSPCD = SliceCommander:getCDSettings('KSPCD'),
LD = SliceCommander:getSpellSettings('LD'),
1161,6 → 1195,29
)
},
KIRCD = SliceCommander:getCDSettings('KIRCD'),
AUD = {
name = SC_SPELL['AUD'],
type = "group",
order = SliceCommander:getOrder(),
args = SliceCommander_TableMerge(
{
toggleAUD = {
order = SliceCommander:getOrder(),
name = L["Show Audacity icon"],
desc = L["Show audacity icon when ambush utilisation without stealth is possible."],
type = "toggle",
set = function(info,val) _G['SC'].SET.display.AUD = val end,
get = function(info) return _G['SC'].SET.display.AUD end
},
AUD_soundHeader = {
order = SliceCommander:getOrder(),
name = L["Sound settings"],
type = "header"
}
},
SliceCommander:getIconSpellSound('AUD')
)
},
}
}
}
1407,18 → 1464,6
end,
get = function(info) return _G['SC'].SET.PixelPerfect end
},
skinEnable = {
order = SliceCommander:getOrder(),
name = L["Enable border"],
desc = L["Add a border like the one on Tukui."],
type = "toggle",
set = function(info,val)
_G['SC'].SET.skin = val
SliceCommander:ApplySkin(val)
SliceCommander:ShowHideBorder(val)
end,
get = function(info) return _G['SC'].SET.skin end
},
headerDisplaySetting = {--CDisplay Setting
order = SliceCommander:getOrder(),
name = L["Display Setting"],
trunk/Core/Event.lua
111,7 → 111,7
_G['SC'].order = 0
_G['SC'].maxPos = 0
_G['SC'].maxCDPos = 0
_G['SC'].previouKyrCount = 0
_G['SC'].previouKyrCount = {false, false, false, false, false}
SliceCommander:TestValueOptions()
SliceCommander:SetEssence()
SliceCommander:InitConfigurationTable()
174,31 → 174,34
end
 
function SliceCommander:TestKYRIAN()
local _, spellId
local count = 0
local _, spellId, count, displayKyrCP
local cpCounts = {}
local kyrBuff = {
[323558] = 2, -- 2nd CP
[323559] = 3, -- 3rd CP
[323560] = 4, -- 4th CP
[354838] = 5, -- 5th CP
[SC_SPELLID['ER2']] = 2, -- 2nd CP
[SC_SPELLID['ER3']] = 3, -- 3rd CP
[SC_SPELLID['ER4']] = 4, -- 4th CP
[SC_SPELLID['ER5']] = 5, -- 5th CP
}
 
for k, v in pairs(kyrBuff) do
_, _, _, _, _, _, _, _, _, spellId = SliceCommander:UnitAura("player", k, "HELPFUL PLAYER")
if spellId then
count = v
cpCounts[v] = true
else
cpCounts[v] = false
end
end
 
if count ~= _G['SC'].previouKyrCount then
if _G['SC'].previouKyrCount > 0 then
_G['SC'].BARS['CP']['obj'].combos[_G['SC'].previouKyrCount].anim:Stop()
for count,displayKyrCP in pairs(cpCounts) do
if displayKyrCP ~= _G['SC'].previouKyrCount[count] then
if _G['SC'].previouKyrCount[count] then
_G['SC'].BARS['CP']['obj'].combos[count].anim:Stop()
end
if displayKyrCP then
_G['SC'].BARS['CP']['obj'].combos[count].anim:Play()
end
_G['SC'].previouKyrCount[count] = displayKyrCP
end
if count > 0 then
print(count)
_G['SC'].BARS['CP']['obj'].combos[count].anim:Play()
end
_G['SC'].previouKyrCount = count
end
end
 
210,7 → 213,7
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)
SliceCommander:UpdateBar(k, 'BARS')
elseif _G['SC'].BARS[k]['type'] == 4 then--CD
SliceCommander:AbilityCDBar(k)
elseif _G['SC'].BARS[k]['type'] == 5 then--CHARGE CD
220,6 → 223,19
end
end
end
for k, v in pairs(_G['SC'].ICONS) do
if _G['SC'].ICONS[k]['type'] ~= nil then--1=BUFF 2=DEBUFF 3=SELF DEBUF
if _G['SC'].ICONS[k]['type'] == 1 or _G['SC'].ICONS[k]['type'] == 2 or _G['SC'].ICONS[k]['type'] == 3 then
SliceCommander:UpdateBar(k, 'ICONS')
elseif _G['SC'].ICONS[k]['type'] == 4 then--CD
--SliceCommander:AbilityCDIcon(k)
elseif _G['SC'].ICONS[k]['type'] == 5 then--CHARGE CD
--SliceCommander:ChargeAbilityCDBIcon(k)
elseif _G['SC'].ICONS[k]['type'] == 6 then--MULTIPLE BUFF BAR
--SliceCommander:MultipleAbilityIcon(k)
end
end
end
 
SliceCommander:TestKYRIAN()--DP Icon
SliceCommander:TestDP()--DP Icon
trunk/Core/Config.lua
32,11 → 32,17
if _G['SC'].SET.IsLocked == false then
frame:StopMovingOrSizing()
frame:SetUserPlaced(false)
_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();
local item
if frame.type == 'OTHER' then
item = _G['SC'].OTHER
else
item = _G['SC'].ICONS
end
item[frame:GetName()]['position'].point,
item[frame:GetName()]['position'].relativeTo,
item[frame:GetName()]['position'].relativePoint,
item[frame:GetName()]['position'].xOfs,
item[frame:GetName()]['position'].yOfs = frame:GetPoint();
end
end
 
96,7 → 102,7
end
 
function SliceCommander:InitIcon()
_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'] = SliceCommander:NewIcon("Interface\\Icons\\ability_rogue_dualweild", 'POISON', 'OTHER')--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")
113,6 → 119,9
_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)
 
_G['SC'].ICONS['AUD']['obj'] = SliceCommander:NewIcon("Interface\\Icons\\ability_rogue_ambush", 'AUD', 'ICONS')--Create poison icon warning when it left 5minute or less on the current timer
_G['SC'].ICONS['AUD']['obj']:Show()
end
 
function SliceCommander:InitGCDBar()
121,9 → 130,6
end
 
function SliceCommander:DisableIcon(obj, val)
for i,v in pairs(obj.iconBorder) do
v:Hide()
end
obj:SetMinMaxValues(0, val)--Threat value should be between 0 and val
end
 
133,7 → 139,6
 
for i = 1, maxCP do
_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(_G['SC'].BARS) do
216,52 → 221,6
_G['SC'].Spark = {}
end
 
function SliceCommander:ShowHideBorder(visible)
if visible then
for i,v in pairs(VTimerEnergy.border) do
v:Show()
end
for i,v in pairs(_G['SC'].BARS) do
if i ~= "CP" then
for j,w in pairs(v['obj'].border) do
w:Show()
end
if i ~= "THREAT" and i ~= "HEALTH" and i ~= "THEALTH" then
for j,w in pairs(v['obj'].iconBorder) do
w:Show()
end
end
end
end
for i,v in pairs(_G['SC'].BARS['CP']['obj'].combos) do
for j,w in pairs(v.border) do
w:Show()
end
end
else
for i,v in pairs(VTimerEnergy.border) do
v:Hide()
end
for i,v in pairs(_G['SC'].BARS) do
if i ~= "CP" then
for j,w in pairs(v['obj'].border) do
w:Hide()
end
if i ~= "THREAT" and i ~= "CP" and i ~= "HEALTH" and i ~= "THEALTH" then
for j,w in pairs(v['obj'].iconBorder) do
w:Hide()
end
end
end
end
for i,v in pairs(_G['SC'].BARS['CP']['obj'].combos) do
for j,w in pairs(v.border) do
w:Hide()
end
end
end
end
 
function SliceCommander:ApplyConf()
SliceCommander:LockCkecked(_G['SC'].SET.IsLocked)
SliceCommander:SetTimersHeight(_G['SC'].SET.TimerHeight)
272,7 → 231,6
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
 
291,6 → 249,10
SliceCommanderFrame:EnableMouse(false)
_G['SC'].OTHER['POISON']['obj']['moveframe']:SetAlpha(0)
_G['SC'].OTHER['POISON']['obj']['moveframe']:EnableMouse(false)
 
_G['SC'].ICONS['AUD']['obj']['moveframe']:SetAlpha(0)
_G['SC'].ICONS['AUD']['obj']['moveframe']:EnableMouse(false)
 
_G['SC'].SET.IsLocked = true
else
SliceCommander:SetTransparency(100)
300,6 → 262,12
_G['SC'].OTHER['POISON']['obj']['moveframe']:EnableMouse(true)
_G['SC'].OTHER['POISON']['obj']:SetAlpha(1)
_G['SC'].OTHER['POISON']['obj']:Show()
 
_G['SC'].ICONS['AUD']['obj']['moveframe']:SetAlpha(.5)
_G['SC'].ICONS['AUD']['obj']['moveframe']:EnableMouse(true)
--_G['SC'].ICONS['AUD']['obj']:SetAlpha(1)
--_G['SC'].ICONS['AUD']['obj']:Show()
 
_G['SC'].SET.IsLocked = false
SliceCommander:StaticPopup_Show('CONFIG_UNLOCK')
end
335,24 → 303,19
end
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)
end
end
 
VTimerEnergy:SCWidth(w)
SliceCommander:SetSizeBorder(w, 0, VTimerEnergy.border)
SliceCommanderFrame:SCWidth(w+16)
 
_G['SC'].OTHER['AS']['obj']:SCWidth(w)
_G['SC'].BARS['CP']['obj']:SCWidth(w)
 
_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
360,25 → 323,11
_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()
end
 
function SliceCommander:SetSizeBorder(w, h, border)
local k = 6
for i,v in pairs(border) do
if h ~= 0 then
v:SCHeight(h+k)
end
if w ~= 0 then
v:SCWidth(w+k)
end
k = k-2
end
end
 
function SliceCommander:SetEnergyHeight(h)
VTimerEnergy:SCHeight(h)
SliceCommanderFrame:SCHeight(h+16)
387,22 → 336,21
_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(_G['SC'].OTHER['POISON']['obj'], w)
SliceCommander:SetIconSizeObj(_G['SC'].ICONS['AUD']['obj'], w)
end
 
function SliceCommander:SetIconSizeObj(obj, w)
obj:SCSize(w, w)
obj.overlay:SCSize(w, w)
obj.overlay:SCSize(w-3, w-3)
obj.iconTxt:SCSize(w, w-5)
obj.icon:SCSize(w, w)
obj.moveframe:SCSize(w+16, w+16)
SliceCommander:SetSizeBorder(w, w, obj.border)
end
 
function SliceCommander:SetTimersHeight(h)
412,10 → 360,8
v['obj'].text:SCHeight(h)
v['obj'].text2:SCHeight(h)
 
SliceCommander:SetSizeBorder(0, h, v['obj'].border)
if i ~= 'THREAT' and i ~= 'HEALTH' and i ~= 'THEALTH' then
v['obj'].icon:SCSize(h, h)
SliceCommander:SetSizeBorder(h, h, v['obj'].iconBorder)
end
end
end
430,7 → 376,6
local maxCP = UnitPowerMax("player", Enum.PowerType.ComboPoints)
for i = 1, maxCP do
_G['SC'].BARS['CP']['obj'].combos[i]:SCHeight(h)
SliceCommander:SetSizeBorder(0, h, _G['SC'].BARS['CP']['obj'].combos[i].border)
end
 
_G['SC'].BarFont1:SetFont(SliceCommander:GetFont(), (h-2)*_G['SC'].V.pxH, "")
622,7 → 567,6
 
SliceCommander:OrderSpells({'GB', 'SOD', 'SD', 'SB', 'SHT', 'FW'})
SliceCommander:OrderCDs({'GBCD', 'SDCD', 'SBCD', 'SODCD', 'SHTCD', 'STHCD'})
 
end
 
function SliceCommander:SetEssence()
897,8 → 841,29
}
}
end
SliceCommander:InitIconsArray()
end
 
function SliceCommander:InitIconsArray()
if _G['SC'].ICONS == nil then
_G['SC'].ICONS = {}
end
if _G['SC'].ICONS['AUD'] == nil then
_G['SC'].ICONS['AUD'] = {
['obj'] = 0,
['expire'] = 0,
['color'] = 0,
['position'] = {
['xOfs'] = -50,
['yOfs'] = 150,
['relativePoint'] = "CENTER",
['point'] = "CENTER",
['relativeTo'] = "UIParent"
}
}
end
end
 
function SliceCommander:InitGlobalBarArray()
if _G['SC'].BARS['HEALTH'] == nil then
_G['SC'].BARS['HEALTH'] = {['color'] = {0, 0, 0}}
1264,6 → 1229,13
--MULTIPLE BUFF BAR
_G['SC'].BARS['RB']['type'] = 6
 
--ICONS
_G['SC'].ICONS['AUD']['type'] = 1
_G['SC'].ICONS['AUD']['id'] = SC_SPELLID['AUD']
 
--SPECIAL Echoing reprimand
_G['SC'].BARS['ER']['id'] = {SC_SPELLID['ER2'], SC_SPELLID['ER3'], SC_SPELLID['ER4'], SC_SPELLID['ER5']}
 
--[[local chargecd = {'SDCD'}
for i, v in ipairs(chargecd) do
_G['SC'].BARS[v]['type'] = 5
trunk/Core/Object.lua
32,8 → 32,6
f.text2:SetJustifyH("CENTER")
 
f:SetStatusBarColor(unpack(color))
f.border = SliceCommander:tukSkin(f, false)
f.iconBorder = SliceCommander:tukSkin(f, f.icon)
 
local animPlaying = false
 
87,7 → 85,6
combo.bg = combo:CreateTexture(nil, "BACKGROUND", nil, 1)
combo.bg:SetAllPoints(combo)
combo.bg:SetTexture("Interface\\AddOns\\SliceCommander\\Images\\solid.tga")
combo.border = SliceCommander:tukSkin(combo, false)
combo.bg:Hide()
 
local animPlaying = false
138,7 → 135,6
f:Hide()
f:SetDefaultBackdrop()
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
146,6 → 142,8
 
function SliceCommander:CreateMoveFrame()
CreateFrame('Frame', 'SliceCommanderFrame', UIParent, BackdropTemplateMixin and "BackdropTemplate")
 
SliceCommanderFrame.type = 'OTHER'
SliceCommanderFrame:SetToplevel(true)
SliceCommanderFrame:EnableMouse(false)
SliceCommanderFrame:SetMovable(true)
173,13 → 171,11
f:SetFrameLevel(1)
f:SetMinMaxValues(0,UnitPowerMax("player", Enum.PowerType.Energy))
f:SetDefaultBackdrop()
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(_G['SC'].SET.energyColor))
f.border = SliceCommander:tukSkin(f, false)
if _G['SC'].SET.HideEnergy then
f:Hide()
else
223,18 → 219,26
return tickObj
end
 
function SliceCommander:NewMoveFrameIcon(name)
function SliceCommander:NewMoveFrameIcon(name, icontype)
local MoveFrame = CreateFrame('Button', name, UIParent, BackdropTemplateMixin and "BackdropTemplate")
MoveFrame:SetToplevel(true)
MoveFrame:EnableMouse(false)
MoveFrame:SetMovable(true)
MoveFrame:SCSize(28, 28)
 
local obj = _G['SC'].OTHER
if icontype == 'OTHER' then
obj = _G['SC'].OTHER
elseif icontype == 'ICONS' then
obj = _G['SC'].ICONS
end
 
MoveFrame:SetPoint(
_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
obj[name]['position'].point,
obj[name]['position'].relativeTo,
obj[name]['position'].relativePoint,
obj[name]['position'].xOfs,
obj[name]['position'].yOfs
)
MoveFrame:SetDefaultBackdrop()
MoveFrame:SetBackdropColor(0.7,0.2,0.2,1)
244,14 → 248,15
return MoveFrame
end
 
function SliceCommander:NewIcon(icon, name)
local MoveFrame = SliceCommander:NewMoveFrameIcon(name)
function SliceCommander:NewIcon(icon, name, icontype)
local MoveFrame = SliceCommander:NewMoveFrameIcon(name, icontype)
 
local f = CreateFrame("Frame", name..'button', UIParent, BackdropTemplateMixin and "BackdropTemplate")
f:SCPoint('CENTER', name, 'CENTER', 0, 0)
f:SetFrameStrata("MEDIUM")
f:SetFrameLevel(1)
f.moveframe = MoveFrame
f.type = icontype
 
local fIcon = f:CreateTexture(nil, "OVERLAY", nil, 1)
fIcon:SCPoint("CENTER", f, "CENTER", 0, 0)
259,7 → 264,6
fIcon:SetTexCoord(.08, .92, .08, .92)
fIcon:SetTexture(icon)
f.icon = fIcon
f.border = SliceCommander:tukSkin(f, fIcon)
 
f.overlay = CreateFrame('Frame', nil, f, BackdropTemplateMixin and "BackdropTemplate")
f.overlay:SetFrameStrata("HIGH")
272,11 → 276,33
f.iconTxt = f.overlay:CreateFontString(nil, 'OVERLAY', 'GameFontNormal')
f.iconTxt:SetJustifyH("CENTER")
f.iconTxt:SetJustifyV("MIDDLE")
f.iconTxt:SCPoint('CENTER', f, "CENTER", 2, 0)
f.iconTxt:SCPoint('CENTER', f, "CENTER", 0, 0)
f.iconTxt:SetFontObject(_G['SC'].FontIcon)
f.iconTxt:SetShadowColor(0,0,0,1)
f.iconTxt:SetShadowOffset(2*_G['SC'].V.pxW, -2*_G['SC'].V.pxH)
 
f.text = f.iconTxt--ALIAS
 
--Animation (Blink)
f.animFade = f:CreateAnimationGroup()
f.animFade:SetLooping('BOUNCE')
 
f.anim = {
Play = function()
animPlaying = true
Glower.PixelGlow_Start(f, {1, 0.15, 0.15, 1}, 8, .25, false, 2)
f.animFade:Play()
end,
Stop = function()
animPlaying = false
Glower.PixelGlow_Stop(f)
f.animFade:Stop()
end,
IsPlaying = function()
return animPlaying
end
}
 
return f
end
 
trunk/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua
6,18 → 6,25
-- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool
 
local MAJOR_VERSION = "LibCustomGlow-1.0"
local MINOR_VERSION = 15
local MINOR_VERSION = 16
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then return end
local Masque = LibStub("Masque", true)
 
local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local textureList = {
["empty"] = [[Interface\AdventureMap\BrokenIsles\AM_29]],
["white"] = [[Interface\BUTTONS\WHITE8X8]],
["shine"] = [[Interface\Artifacts\Artifacts]]
empty = [[Interface\AdventureMap\BrokenIsles\AM_29]],
white = [[Interface\BUTTONS\WHITE8X8]],
shine = [[Interface\ItemSocketingFrame\UI-ItemSockets]]
}
 
local shineCoords = {0.3984375, 0.4453125, 0.40234375, 0.44921875}
if isRetail then
textureList.shine = [[Interface\Artifacts\Artifacts]]
shineCoords = {0.8115234375,0.9169921875,0.8798828125,0.9853515625}
end
 
function lib.RegisterTextures(texture,id)
textureList[id] = texture
end
44,11 → 51,11
 
local TexPoolResetter = function(pool,tex)
local maskNum = tex:GetNumMaskTextures()
for i = maskNum,1 do
local curMask = tex:GetMaskTexture(i)
if curMask then
tex:RemoveMaskTexture(curMask)
end
for i = maskNum, 1, -1 do
tex:RemoveMaskTexture(tex:GetMaskTexture(i))
 
 
 
end
tex:Hide()
tex:ClearAllPoints()
89,14 → 96,14
 
local function addFrameAndTex(r,color,name,key,N,xOffset,yOffset,texture,texCoord,desaturated,frameLevel)
key = key or ""
frameLevel = frameLevel or 8
frameLevel = frameLevel or 8
if not r[name..key] then
r[name..key] = GlowFramePool:Acquire()
r[name..key]:SetParent(r)
r[name..key].name = name..key
end
local f = r[name..key]
f:SetFrameLevel(r:GetFrameLevel()+frameLevel)
f:SetFrameLevel(r:GetFrameLevel()+frameLevel)
f:SetPoint("TOPLEFT",r,"TOPLEFT",-xOffset+0.05,yOffset+0.05)
f:SetPoint("BOTTOMRIGHT",r,"BOTTOMRIGHT",xOffset,-yOffset+0.05)
f:Show()
108,11 → 115,14
for i=1,N do
if not f.textures[i] then
f.textures[i] = GlowTexPool:Acquire()
f.textures[i]: SetTexture(texture)
f.textures[i]: SetTexCoord(texCoord[1],texCoord[2],texCoord[3],texCoord[4])
f.textures[i]: SetDesaturated(desaturated)
f.textures[i]: SetParent(f)
f.textures[i]: SetDrawLayer("ARTWORK",7)
f.textures[i]:SetTexture(texture)
f.textures[i]:SetTexCoord(texCoord[1],texCoord[2],texCoord[3],texCoord[4])
f.textures[i]:SetDesaturated(desaturated)
f.textures[i]:SetParent(f)
f.textures[i]:SetDrawLayer("ARTWORK",7)
if not isRetail and name == "_AutoCastGlow" then
f.textures[i]:SetBlendMode("ADD")
end
end
f.textures[i]:SetVertexColor(color[1],color[2],color[3],color[4])
f.textures[i]:Show()
323,6 → 333,7
local function acUpdate(self,elapsed)
local width,height = self:GetSize()
if width ~= self.info.width or height ~= self.info.height then
if width*height == 0 then return end -- Avoid division by zero
self.info.width = width
self.info.height = height
self.info.perimeter = 2*(width+height)
381,7 → 392,7
yOffset = yOffset or 0
key = key or ""
 
addFrameAndTex(r,color,"_AutoCastGlow",key,N*4,xOffset,yOffset,textureList.shine,{0.8115234375,0.9169921875,0.8798828125,0.9853515625},true, frameLevel)
addFrameAndTex(r,color,"_AutoCastGlow",key,N*4,xOffset,yOffset,textureList.shine,shineCoords, true, frameLevel)
local f = r["_AutoCastGlow"..key]
local sizes = {7,6,5,4}
for k,size in pairs(sizes) do
511,21 → 522,21
end
 
local function configureButtonGlow(f,alpha)
f.spark = f:CreateTexture(nil, "BACKGROUND", nil, 1)
f.spark = f:CreateTexture(nil, "BACKGROUND")
f.spark:SetPoint("CENTER")
f.spark:SetAlpha(0)
f.spark:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
f.spark:SetTexCoord(0.00781250, 0.61718750, 0.00390625, 0.26953125)
 
-- inner glow
f.innerGlow = f:CreateTexture(nil, "ARTWORK", nil, 1)
f.innerGlow = f:CreateTexture(nil, "ARTWORK")
f.innerGlow:SetPoint("CENTER")
f.innerGlow:SetAlpha(0)
f.innerGlow:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
f.innerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375)
 
-- inner glow over
f.innerGlowOver = f:CreateTexture(nil, "ARTWORK", nil, 1)
f.innerGlowOver = f:CreateTexture(nil, "ARTWORK")
f.innerGlowOver:SetPoint("TOPLEFT", f.innerGlow, "TOPLEFT")
f.innerGlowOver:SetPoint("BOTTOMRIGHT", f.innerGlow, "BOTTOMRIGHT")
f.innerGlowOver:SetAlpha(0)
533,14 → 544,14
f.innerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625)
 
-- outer glow
f.outerGlow = f:CreateTexture(nil, "ARTWORK", nil, 1)
f.outerGlow = f:CreateTexture(nil, "ARTWORK")
f.outerGlow:SetPoint("CENTER")
f.outerGlow:SetAlpha(0)
f.outerGlow:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
f.outerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375)
 
-- outer glow over
f.outerGlowOver = f:CreateTexture(nil, "ARTWORK", nil, 1)
f.outerGlowOver = f:CreateTexture(nil, "ARTWORK")
f.outerGlowOver:SetPoint("TOPLEFT", f.outerGlow, "TOPLEFT")
f.outerGlowOver:SetPoint("BOTTOMRIGHT", f.outerGlow, "BOTTOMRIGHT")
f.outerGlowOver:SetAlpha(0)
548,7 → 559,7
f.outerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625)
 
-- ants
f.ants = f:CreateTexture(nil, "OVERLAY", nil, 1)
f.ants = f:CreateTexture(nil, "OVERLAY")
f.ants:SetPoint("CENTER")
f.ants:SetAlpha(0)
f.ants:SetTexture([[Interface\SpellActivationOverlay\IconAlertAnts]])
605,7 → 616,7
if not r then
return
end
frameLevel = frameLevel or 8;
frameLevel = frameLevel or 8;
local throttle
if frequency and frequency > 0 then
throttle = 0.25/frequency*0.01
620,8 → 631,8
f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2)
f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2)
f.ants:SetSize(width*1.4*0.85, height*1.4*0.85)
AnimIn_OnFinished(f.animIn)
if f.animOut:IsPlaying() then
AnimIn_OnFinished(f.animIn)
if f.animOut:IsPlaying() then
f.animOut:Stop()
f.animIn:Play()
end
trunk/SliceCommander.toc
1,6 → 1,6
## Interface: 100200
## Author: Tomate
## Version: 10.03
## Version: 10.04
## 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
trunk/Locale/deDE.lua
77,8 → 77,6
L["If enable, a warning message will be display when you succeed to interrupts spellcasting."] = "Wenn aktiviert, wird eine Warnungsmeldung angezeigt, wenn du erfolgreich Zauber unterbrichst."
L["Warning message"] = "Warnungsmeldung"
L["The warning message which will be display when you kick is successful."] = "Die Warnungsmeldung die angezeigt wird, wenn dein Tritt erfolgreich war."
L["Border Feature"] = "Rahmen Feature"
L["Add a border like the one on Tukui."] = "F\195\188ge einen Rahmen (\195\164hnlich wie bei TukUI) hinzu"
L["Health bar Settings"] = "Einstellungen der Lebenspunkteleiste"
L["Show Health player bar"] = "Zeige Lebenspunkteleiste des Spielers"
L["Health bar position"] = "Position der Lebenspunkteleiste"
130,7 → 128,7
L["Lethal poison"] = "Lethal poison"
L["Utility poison"] = "Utility poison"
L["Poisons"] = "Poisons"
L["Enable border"] = "Enable border"
 
L["Threat"] = "Threat"
L["Your health"] = "Your health"
L["Color"] = "Color"
200,4 → 198,6
L['Kyrian'] = "Kyrian"
L['Necrolord'] = "Necrolord"
L['Night Fae'] = "Night Fae"
L['Venthyr'] = "Venthyr"
\ No newline at end of file +L['Venthyr'] = "Venthyr" +L['Show Audacity icon'] = "Show Audacity icon" +L['Show audacity icon when ambush utilisation without stealth is possible.'] = "Show audacity icon when ambush utilisation without stealth is possible." \ No newline at end of file
trunk/Locale/zhCN.lua
77,8 → 77,6
L["If enable, a warning message will be display when you succeed to interrupts spellcasting."] = "当你成功打断法术时发送打断消息."
L["Warning message"] = "打断消息"
L["The warning message which will be display when you kick is successful."] = "当你成功打断法术时发送的打断消息."
L["Border Feature"] = "边框功能"
L["Add a border like the one on Tukui."] = "增加边框"
L["Health bar Settings"] = "生命条设置"
L["Show Health player bar"] = "显示生命玩家条"
L["Health bar position"] = "生命条位置"
130,7 → 128,6
L["Lethal poison"] = "Lethal poison"
L["Utility poison"] = "Utility poison"
L["Poisons"] = "Poisons"
L["Enable border"] = "Enable border"
L["Threat"] = "Threat"
L["Your health"] = "Your health"
L["Color"] = "Color"
200,4 → 197,6
L['Kyrian'] = "Kyrian"
L['Necrolord'] = "Necrolord"
L['Night Fae'] = "Night Fae"
L['Venthyr'] = "Venthyr"
\ No newline at end of file +L['Venthyr'] = "Venthyr" +L['Show Audacity icon'] = "Show Audacity icon" +L['Show audacity icon when ambush utilisation without stealth is possible.'] = "Show audacity icon when ambush utilisation without stealth is possible." \ No newline at end of file
trunk/Locale/enUS.lua
77,8 → 77,6
L["If enable, a warning message will be display when you succeed to interrupts spellcasting."] = true
L["Warning message"] = true
L["The warning message which will be display when you kick is successful."] = true
L["Border Feature"] = true
L["Add a border like the one on Tukui."] = true
L["Health bar Settings"] = true
L["Show Health player bar"] = true
L["Health bar position"] = true
130,7 → 128,6
L["Lethal poison"] = true
L["Utility poison"] = true
L["Poisons"] = true
L["Enable border"] = true
L["Threat"] = true
L["Your health"] = true
L["Color"] = true
trunk/Locale/ruRU.lua
77,8 → 77,6
L["If enable, a warning message will be display when you succeed to interrupts spellcasting."] = "Если включить, то будет отображаться предупреждающее сообщение, при удачном прерывании заклинания."
L["Warning message"] = "Предупредительное сообщение"
L["The warning message which will be display when you kick is successful."] = "Сообщение при удачном пинке"
L["Border Feature"] = "Настройка рамки"
L["Add a border like the one on Tukui."] = "Добавить рамку как в аддоне Tukui"
L["Health bar Settings"] = "Настройка полосы здоровья"
L["Show Health player bar"] = "Показывать полосу здоровья игрока"
L["Health bar position"] = "Позиция полосы здоровья"
130,7 → 128,6
L["Lethal poison"] = "Lethal poison"
L["Utility poison"] = "Utility poison"
L["Poisons"] = "Poisons"
L["Enable border"] = "Enable border"
L["Threat"] = "Threat"
L["Your health"] = "Your health"
L["Color"] = "Color"
200,4 → 197,6
L['Kyrian'] = "Kyrian"
L['Necrolord'] = "Necrolord"
L['Night Fae'] = "Night Fae"
L['Venthyr'] = "Venthyr"
\ No newline at end of file +L['Venthyr'] = "Venthyr" +L['Show Audacity icon'] = "Show Audacity icon" +L['Show audacity icon when ambush utilisation without stealth is possible.'] = "Show audacity icon when ambush utilisation without stealth is possible." \ No newline at end of file
trunk/Locale/esES.lua
77,8 → 77,6
L["If enable, a warning message will be display when you succeed to interrupts spellcasting."] = true
L["Warning message"] = true
L["The warning message which will be display when you kick is successful."] = true
L["Border Feature"] = true
L["Add a border like the one on Tukui."] = true
L["Health bar Settings"] = true
L["Show Health player bar"] = true
L["Health bar position"] = true
130,7 → 128,6
L["Lethal poison"] = true
L["Utility poison"] = true
L["Poisons"] = true
L["Enable border"] = true
L["Threat"] = true
L["Your health"] = true
L["Color"] = true
200,4 → 197,6
L['Kyrian'] = true
L['Necrolord'] = true
L['Night Fae'] = true
L['Venthyr'] = true
\ No newline at end of file +L['Venthyr'] = true +L['Show Audacity icon'] = true +L['Show audacity icon when ambush utilisation without stealth is possible.'] = true \ No newline at end of file
trunk/Locale/frFR.lua
77,8 → 77,6
L["If enable, a warning message will be display when you succeed to interrupts spellcasting."] = "Si l'option est activée, un message d'alerte sera affiché lorsque le joueur anti-castera réellement un sort"
L["Warning message"] = "Message d'alerte"
L["The warning message which will be display when you kick is successful."] = "Le message d'alerte affiché lorsque le joueur a réellement anti-cast"
L["Border Feature"] = "Options de bordure"
L["Add a border like the one on Tukui."] = "Ajouter une bordure comme celle de Tukui"
L["Health bar Settings"] = "Options de la barre de vie"
L["Show Health player bar"] = "Afficher votre barre de vie"
L["Health bar position"] = "Position de la barre de vie"
130,7 → 128,6
L["Lethal poison"] = "Poison létal"
L["Utility poison"] = "Poison utilitaire"
L["Poisons"] = "Poisons"
L["Enable border"] = "Activer la bordure"
L["Threat"] = "Menace"
L["Your health"] = "Votre vie"
L["Color"] = "Couleur"
200,4 → 197,6
L['Kyrian'] = "Kyrians"
L['Necrolord'] = "Nécro-seigneurs"
L['Night Fae'] = "Faë nocturnes"
L['Venthyr'] = "Venthyrs"
\ No newline at end of file +L['Venthyr'] = "Venthyrs" +L['Show Audacity icon'] = "Afficher l'icôn d'Audace" +L['Show audacity icon when ambush utilisation without stealth is possible.'] = "Afficher l'icôn d'Audace lorsque l'utilisation de l'Embuscade est possible hors Camouflage." \ No newline at end of file
trunk/Locale/spell.lua
118,16 → 118,21
 
 
 
SC_SPELLID['ERCD'] = 385616 --Echoing Reprimand (Kyrian)
SC_SPELLID['ER'] = 323559 --Echoing Reprimand (Kyrian)
SC_SPELLID['ERCD'] = 385616 --Echoing Reprimand
SC_SPELLID['ER'] = 323559 --Echoing Reprimand
SC_SPELLID['SBSCD'] = 385424 --Serrated Bone Spike
SC_SPELLID['SBS'] = 385424 --Serrated Bone Spike
SC_SPELLID['SBS'] = 394036 --Serrated Bone Spike
SC_SPELLID['SP'] = 385408 --Sepsis
SC_SPELLID['SPCD'] = 385408 --Sepsis
SC_SPELLID['FLA'] = 384631 --Flagellation
SC_SPELLID['FLACD'] = 384631 --Flagellation
 
SC_SPELLID['ER2'] = 323558 --Echoing Reprimand 2CP
SC_SPELLID['ER3'] = 323559 --Echoing Reprimand 3CP
SC_SPELLID['ER4'] = 323560 --Echoing Reprimand 4CP
SC_SPELLID['ER5'] = 354838 --Echoing Reprimand 4CP
 
 
--OUTLAW
SC_SPELLID['SND'] = 315496 --Slice and Dice
SC_SPELLID['AR'] = 13750 --Adrenaline Rush
159,6 → 164,7
SC_SPELLID['GG'] = 1776 --Gouge
SC_SPELLID['GGCD'] = 1776 --Gouge CD
SC_SPELLID['KIRCD'] = 381989 --Keep It Rolling
SC_SPELLID['AUD'] = 386270 --Audacity
 
--ASSASSINAT
SC_SPELLID['ENV'] = 32645 --Envenom
trunk/SliceCommander.lua
303,10 → 303,23
SliceCommander:ChangeAnchor()
end
 
function SliceCommander:UpdateBar(spell)
local BAR = _G['SC'].BARS[spell]
local name, expire, icon, count, duration, unitCaster, x, _, maxValue, widthSeconde, value1, value2, value3, spellId
function SliceCommander:HideIcon(BAR)
if BAR['obj'].anim:IsPlaying() then
BAR['obj'].anim:Stop()
end
BAR['expire'] = 0
BAR['obj']:Hide()
BAR['obj'].text:SetText("")
end
 
function SliceCommander:UpdateBar(spell, typespell)
local BAR, name, expire, icon, count, duration, unitCaster, x, _, maxValue, widthSeconde, value1, value2, value3, spellId, last, spellIds, currentId
if typespell == 'BARS' then
BAR = _G['SC'].BARS[spell]
elseif typespell == 'ICONS' then
BAR = _G['SC'].ICONS[spell]
end
 
if _G['SC'].SET.display[spell] ~= true then
BAR['expire'] = 0
if BAR['obj']:IsVisible() then
319,15 → 332,25
end
 
value1, value2, value3 = 0 , 0, 0
local last = BAR['expire']
if BAR['type'] == 1 then
_, icon, count, _, duration, expire, unitCaster, _, _, _, _, _, _, _, _, value1, value2, value3 = SliceCommander:UnitAura("player", BAR['id'], "HELPFUL PLAYER")
elseif BAR['type'] == 2 then
_, icon, count, _, duration, expire, unitCaster, _, _, spellId = SliceCommander:UnitAura("target", BAR['id'], "HARMFUL PLAYER")
elseif BAR['type'] == 3 then
_, icon, count, _, duration, expire, unitCaster = SliceCommander:UnitAura("player", BAR['id'], "HARMFUL")
last = BAR['expire']
local spellIds
if type(BAR['id']) == "table" then
spellIds = BAR['id']
else
spellIds = {BAR['id']}
end
 
 
for _,currentId in pairs(spellIds) do
if BAR['type'] == 1 then
_, icon, count, _, duration, expire, unitCaster, _, _, _, _, _, _, _, _, value1, value2, value3 = SliceCommander:UnitAura("player", currentId, "HELPFUL PLAYER")
elseif BAR['type'] == 2 then
_, icon, count, _, duration, expire, unitCaster, _, _, spellId = SliceCommander:UnitAura("target", currentId, "HARMFUL PLAYER")
elseif BAR['type'] == 3 then
_, icon, count, _, duration, expire, unitCaster = SliceCommander:UnitAura("player", currentId, "HARMFUL")
end
if expire then break end
end
 
if unitCaster ~= "player" and BAR['type'] ~= 3 and unitCaster ~= nil then
expire = last
end
336,7 → 359,9
if expire == nil then
if _G['SC'].SET.flash[spell] == true and UnitAffectingCombat("player") then
if not BAR['obj'].anim:IsPlaying() then
BAR['obj']:SetValue(500)
if typespell == 'BARS' then
BAR['obj']:SetValue(500)
end
BAR['obj'].text:SetText('')
if BAR['expire'] ~= -1 then
BAR['expire'] = -1
354,7 → 379,9
end
BAR['obj'].icon:SetTexture(SC_SPELL_ICON[spell])
BAR['obj']:Show()
SliceCommander:ChangeAnchor()
if typespell == 'BARS' then
SliceCommander:ChangeAnchor()
end
end
BAR['obj'].anim:Play()
end
366,7 → 393,11
elseif BAR['sound'] ~= nil then
SliceCommander:PlaySound(BAR['sound']['expired'])
end
SliceCommander:HideBar(BAR)
if typespell == 'BARS' then
SliceCommander:HideBar(BAR)
else
SliceCommander:HideIcon(BAR)
end
end
end
else
377,36 → 408,49
end
 
if x >= 0 then
local xlast = SliceCommander:ShowBar(BAR, duration, icon)
local xlast
if typespell == 'BARS' then
xlast = SliceCommander:ShowBar(BAR, duration, icon)
else
xlast = SliceCommander:ShowIcon(BAR, icon)
end
 
local textcount = ''
if count and count > 1 then
textcount = ' x'..count
end
if value1 == 162 and value2 == 0 and value3 == 19 then
textcount = textcount..' - '..L['Empowered']
count = value1..value2..value3
end
if not BAR['count'] or BAR['count'] ~= count then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name']..textcount))
else
BAR['obj'].text2:SetText(textcount)
if typespell == 'BARS' then
local textcount = ''
if count and count > 1 then
textcount = ' x'..count
end
if value1 == 162 and value2 == 0 and value3 == 19 then
textcount = textcount..' - '..L['Empowered']
count = value1..value2..value3
end
if not BAR['count'] or BAR['count'] ~= count then
if _G['SC'].SET.SpellText == true then
BAR['obj'].text2:SetText(string.format("%s", BAR['name']..textcount))
else
BAR['obj'].text2:SetText(textcount)
end
end
BAR['count'] = count
end
BAR['count'] = count
 
if x > 0 then
BAR['obj']:SetValue(x)
if typespell == 'BARS' then
BAR['obj']:SetValue(x)
end
BAR['obj'].text:SetText(string.format("%0.1f", x))
else
BAR['obj']:SetValue(6)
if typespell == 'BARS' then
BAR['obj']:SetValue(6)
end
BAR['obj'].text:SetText('')
end
 
SliceCommander:Tick(BAR, x)
SliceCommander:Pandemic(BAR, x)
SliceCommander:SoundBar(BAR, x, xlast)
if typespell == 'BARS' then
SliceCommander:Tick(BAR, x)
SliceCommander:Pandemic(BAR, x)
SliceCommander:SoundBar(BAR, x, xlast)
end
end
end
end
570,27 → 614,33
if _G['SC'].SET.IsLocked == true then
if _G['SC'].OTHER['POISON']['obj']:GetAlpha() == 1 then
_G['SC'].OTHER['POISON']['obj']:SetAlpha(0)
_G['SC'].OTHER['POISON']['obj'].anim:Stop()
end
if not combat and _G['SC'].OTHER['POISON']['obj'].button:IsMouseEnabled() then
--_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(false)
_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(false)
_G['SC'].OTHER['POISON']['obj'].anim:Stop()
end
end
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)
_G['SC'].OTHER['POISON']['obj'].anim:Play()
end
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)
_G['SC'].OTHER['POISON']['obj'].anim:Play()
end
end
else
if _G['SC'].SET.IsLocked == true then
if _G['SC'].OTHER['POISON']['obj']:GetAlpha() == 1 then
_G['SC'].OTHER['POISON']['obj']:SetAlpha(0)
_G['SC'].OTHER['POISON']['obj'].anim:Stop()
end
if not combat and _G['SC'].OTHER['POISON']['obj'].button:IsMouseEnabled() then
--_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(false)
_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(false)
_G['SC'].OTHER['POISON']['obj'].anim:Stop()
end
end
end
731,12 → 781,32
end
SliceCommander:EnableBar(BAR, duration, BAR['name'], BAR['expire'])
 
return 0;
return 0
else
return BAR['obj']:GetValue()
end
end
 
function SliceCommander:ShowIcon(ITEM, icon)
if not ITEM['obj']:IsVisible() then
if ITEM['obj'].anim:IsPlaying() then
ITEM['obj'].anim:Stop()
end
ITEM['obj'].anim:Play()
if ITEM['sound'] ~= nil then
SliceCommander:PlaySound(ITEM['sound']['applied'])
end
if icon then
ITEM['obj'].icon:SetTexture(icon)
end
ITEM['obj'].overlay:Show()
ITEM['obj']:Show()
 
return 0
end
return 1
end
 
function SliceCommander:MultipleAbilityBar(spell)
local BAR = _G['SC'].BARS[spell]
local expire, duration, tempDuration, x, _, expire