Skip to content

Instantly share code, notes, and snippets.

@d87 d87/userconfig.lua Secret
Last active Aug 10, 2019

Embed
What would you like to do?
local helpers = Aptechka.helpers
local _, playerClass = UnitClass("player")
local isHealer = (playerClass == "PRIEST" or playerClass == "PALADIN" or playerClass == "SHAMAN" or playerClass == "DRUID")
local A = helpers.AddAura
local Trace = helpers.AddTrace
local config = AptechkaDefaultConfig
config.TargetStatus = { name = "Target", assignto = { "border" }, color = {1,0.7,0.7}, priority = 98 }
config.LeaderStatus = { name = "Leader", priority = 59, assignto = "LeaderIndicator", color = {1,.8,.2} }
config.AssistStatus = { name = "Assist", priority = 59, assignto = "AssistantIndicator", color = {1,.8,.2} }
A{ id = 77761, type = "HELPFUL", assignto = { "icon" }, pulse = true, priority = 70, showDuration = true } -- Roar
A{ id = 77764, type = "HELPFUL", assignto = { "icon" }, pulse = true, priority = 70, showDuration = true } -- Roar
A{ id = 97462, type = "HELPFUL", assignto = { "icon" }, pulse = true, priority = 70, showDuration = true } -- Rally
A{ id = 97463, type = "HELPFUL", assignto = { "icon" }, priority = 70, showDuration = true } -- Rally
if playerClass == "DRUID" then
--A{ id = 1126, type = "HELPFUL", assignto = { "bars" }, color = { 235/255 , 145/255, 199/255}, isMissing = true } --Mark of the Wild
A{ id = 33763, type = "HELPFUL", assignto = { "spell3", }, showDuration = true, isMine = true, color = { 0.5, 1, 0.5}, } --Lifebloom
A{ id = 102351, type = "HELPFUL", assignto = { "spell2" }, priority = 70, color = {38/255, 221/255, 163/255}, isMine = true } --Cenarion Ward
--A{ id = 774, type = "HELPFUL", assignto = { "spell1"}, pulse = true, color = { 1, 0.2, 1}, showDuration = true, isMine = true } --Rejuvenation
A{ id = 8936, type = "HELPFUL", assignto = { "spell3" }, priority = 82, color = { 198/255, 233/255, 80/255}, showDuration = true, isMine = true } --Regrowth
A{ id = 48438, type = "HELPFUL", assignto = { "spell5" }, pulse = true, color = { 0.4, 1, 0.4}, priority = 70, showDuration = true, isMine = true } --Wild Growth
--config.UnitInRangeFunc = function(unit) return (IsSpellInRange(GetSpellInfo(774),unit) == 1) end
--// Use Rejuvenation for range check. Usual UnitInRange is about 38yd, not 41, tho it's probably good to have that margin. Disabled by default.
end
config.OfflineStatus = { name = "OFFLINE", assignto = { "text2","text3","health","power" }, color = {.15,.15,.15}, textcolor = {1,1,0}, text = "OFFLINE", priority = 70}
config.AwayStatus = { name = "AFK", assignto = { "text2","text3" }, color = {.15,.15,.15}, textcolor = {0,128,0}, text = "AFK", priority = 60}
Aptechka.PostFrameUpdate = function(self)
--self.absorb:ClearAllPoints()
--self.absorb:SetPoint("TOPLEFT",self,"TOPLEFT",-3,0)
--self.absorb:SetWidth(5)
self.roleicon:ClearAllPoints()
self.roleicon:SetPoint("CENTER",self.health,"LEFT", 0, -5)
self.roleicon:SetWidth(12)
self.roleicon:SetHeight(12)
self.text1:SetPoint("CENTER",self,"CENTER",0,10)
self.icon:SetAlpha(0.9)
self.icon:ClearAllPoints()
self.icon:SetPoint("CENTER",self,"CENTER",0,-5)
--self.raidicon:SetWidth(12)
--self.raidicon:SetHeight(12)
self.raidicon:ClearAllPoints()
self.raidicon:SetPoint("CENTER",self.health,"TOP",0,0)
self.raidicon:SetAlpha(0.7)
self.health.bg:SetTexture(nil)
--self:SetBackdropColor(0,0,0,0.5)
--self.health.incoming:SetStatusBarColor(0, 1, 0, 0.5)
self.health.incoming:SetStatusBarColor(0.4, 1, 0.4, 1 )
self.LeaderIndicator = self.health:CreateTexture("$parentLeaderIcon", "OVERLAY", nil, 7)
self.LeaderIndicator:SetSize(12, 12)
self.LeaderIndicator:SetPoint("LEFT", self.health, "TOPLEFT", 1, 3)
self.LeaderIndicator:SetTexture([[Interface\GroupFrame\UI-Group-LeaderIcon]])
self.LeaderIndicator.SetJob = function() end
self.LeaderIndicator:Hide()
self.AssistantIndicator = self.health:CreateTexture("$parentAssistIcon", "OVERLAY", nil, 7)
self.AssistantIndicator:SetSize(12, 12)
self.AssistantIndicator:SetPoint("LEFT", self.health, "TOPLEFT", 1, 3)
self.AssistantIndicator:SetTexture([[Interface\GroupFrame\UI-Group-AssistantIcon]])
self.AssistantIndicator.SetJob = function() end
self.AssistantIndicator:Hide()
if self.spell3 then
self.spell3:SetWidth(10)
self.spell3:SetHeight(10)
end
if self.spell2 then
self.spell2:ClearAllPoints()
self.spell2:SetPoint("LEFT",self,"LEFT",0,0)
end
self.text3:ClearAllPoints()
self.text3:SetPoint("CENTER",self,"BOTTOM",0,0)
if not self.spell4 then
local newind = config.GridSkin_CreateIndicator(self,6,6,"TOPLEFT",self,"TOPLEFT",0,0)
self.spell4 = newind
end
if not self.spell5 then
local newind = config.GridSkin_CreateIndicator(self,6,6,"RIGHT",self,"RIGHT",0,0) -- w/h = 6
self.spell5 = newind
end
--[[
-- Inverted colors in GUI does that now
local SetJob_HealthBar = function(self, job)
local c
if job.classcolor then
c = self.parent.classcolor
elseif job.color then
c = job.color
end
if c then
self:SetStatusBarColor(unpack(c))
self.bg:SetVertexColor(c[1]/2,c[2]/2,c[3]/2)
end
end
self.health.SetJob = SetJob_HealthBar
self.power.SetJob = SetJob_HealthBar
]]
--[[
local DebuffTypeColor = DebuffTypeColor
local helpful_color = { r = 0, g = 1, b = 0}
local SetJob_Icon = self.icon.SetJob
local function MySetJob_DebuffIcon(self, job)
SetJob_Icon(self, job)
local color = job.color
if color then
self.debuffTypeTexture:SetVertexColor(color[1], color[2], color[3], color[4] or 0.6)
else
local debuffType = job.debuffType
if debuffType == "Helpful" then
color = helpful_color
else
color = debuffType and DebuffTypeColor[debuffType] or DebuffTypeColor["none"]
end
self.debuffTypeTexture:SetVertexColor(color.r, color.g, color.b, 0.6)
end
if job.isBossAura then
self:SetScale(1.8)
else
self:SetScale(1)
end
end
self.dicon1.SetJob = MySetJob_DebuffIcon
self.dicon2.SetJob = MySetJob_DebuffIcon
self.dicon3.SetJob = MySetJob_DebuffIcon
self.dicon4.SetJob = MySetJob_DebuffIcon
]]
end
-- Leader Icon
--self.LeaderIndicator = self.Health:CreateTexture("$parentLeaderIcon", "OVERLAY", nil, 7)
--self.LeaderIndicator:SetSize(12, 12)
--self.LeaderIndicator:SetPoint("LEFT", self.Health, "TOPLEFT", 1, 2)
-- Assist Icon
--self.AssistantIndicator = self.Health:CreateTexture("$parentAssistIcon", "OVERLAY", nil, 7)
--self.AssistantIndicator:SetSize(12, 12)
--self.AssistantIndicator:SetPoint("LEFT", self.Health, "TOPLEFT", 1, 2)
--self.LeaderIndicator:SetTexture([[Interface\GroupFrame\UI-Group-LeaderIcon]])
--self.LeaderIndicator.SetJob = function() end
--self.LeaderIndicator = self.health:CreateTexture("$parentLeaderIcon", "OVERLAY", nil, 7)
--self.LeaderIndicator:SetSize(12, 12)
--self.LeaderIndicator:SetPoint("LEFT", self.health, "TOPLEFT", 1, 2)
--self.LeaderIndicator:SetTexture([[Interface\GroupFrame\UI-Group-LeaderIcon]])
--self.LeaderIndicator.SetJob = function() end
--self.LeaderIndicator:Hide()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.