/
isrunning = false |
end |
end |
local UnitPrestige = UnitPrestige or function() return 0 end |
local function UpdatePVP(unit, uf, f, _, _, config) |
uf = uf or su[unit] |
f = f or (uf and not uf.hidden and uf.pvpicon) |
icon:SetVertexColor(1, 1, 1) |
return f:Show() |
end |
local prestige = UnitPrestige(unit) |
if cache.pvpffa then -- free for all pvp (Arena) |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-FFA") |
icon:SetVertexColor(1, 1, 1) |
f:Show() |
f:Show() |
elseif cache.pvp then |
if cache.faction ~= "" then -- faction pvp (Alliance, Horde) |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-"..(cache.faction or "FFA")) |
if prestige > 0 then |
icon:SetTexture(GetPrestigeInfo(prestige)) |
icon:SetVertexColor(1, 1, 1) |
f:Show() |
else -- nonfaction pvp |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-FFA") |
icon:SetVertexColor(Stuf:GetColorFromMethod("reaction", uf)) |
f:Show() |
else |
if cache.faction ~= "" then -- faction pvp (Alliance, Horde) |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-"..(cache.faction or "FFA")) |
icon:SetVertexColor(1, 1, 1) |
f:Show() |
else -- nonfaction pvp |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-FFA") |
icon:SetVertexColor(Stuf:GetColorFromMethod("reaction", uf)) |
f:Show() |
end |
if UnitIsMercenary(unit) then |
if cache.faction == "Horde" then |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-Alliance") |
elseif cache.faction == "Alliance" then |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-Horde") |
end |
end |
end |
else -- not pvp |
f:Hide() |
## Title: Stuf Unit Frames |
## Author: TotalPackage |
## Notes: Main unitframes replacement. Assembly optional. |
## Version: 7.0.001a |
## Version: 7.0.002 |
## SavedVariables: StufDB |
## SavedVariablesPerCharacter: StufCharDB |
-- spell range setup |
if CLS == "PALADIN" then |
Stuf.supportspell = GetSpellInfo(635) |
Stuf.supportspell = GetSpellInfo(4987) |
elseif CLS == "PRIEST" then |
Stuf.supportspell = GetSpellInfo(2061) |
elseif CLS == "DRUID" then |
Stuf.supportspell = GetSpellInfo(774) |
Stuf.supportspell = GetSpellInfo(8936) |
elseif CLS == "MAGE" then |
Stuf.supportspell = GetSpellInfo(475) |
elseif CLS == "SHAMAN" then |
Stuf.supportspell = GetSpellInfo(331) |
Stuf.supportspell = GetSpellInfo(1064) |
elseif CLS == "MONK" then |
Stuf.supportspell = GetSpellInfo(209525) |
end |
for _, func in ipairs(Stuf.inits) do -- let other sections know variables are loaded |
## Title: Stuf Raid Frames |
## Author: TotalPackage |
## Notes: Raid unit frames. Assembly optional. (Does not require Stuf) |
## Version: 7.0.001a |
## Version: 7.0.002 |
## SavedVariables: StufRaidDB |
## SavedVariablesPerCharacter: StufRaidCharLayoutDB, StufRaidCharDB |
SlashCmdList.STUFRAID = ShowOptions |
SLASH_STUFRAID1 = "/stufraid" |
local _, cls = UnitClass("player") |
local _, CLS = UnitClass("player") |
if CLS == "PALADIN" then |
a.s40 = GetSpellInfo(635) |
a.s40 = GetSpellInfo(4987) |
elseif CLS == "PRIEST" then |
a.s40 = GetSpellInfo(2061) |
elseif CLS == "DRUID" then |
a.s40 = GetSpellInfo(774) |
a.s40 = GetSpellInfo(8936) |
elseif CLS == "MAGE" then |
a.s40 = GetSpellInfo(475) |
elseif CLS == "SHAMAN" then |
a.s40 = GetSpellInfo(331) |
a.s40 = GetSpellInfo(1064) |
elseif CLS == "MONK" then |
a.s40 = GetSpellInfo(209525) |
end |
-- Class Colors support |