Skip to content

Commit

Permalink
Unhealable & MC frame and textures
Browse files Browse the repository at this point in the history
  • Loading branch information
d87 committed Dec 27, 2019
1 parent 5e22184 commit f346f06
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Aptechka.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Aptechka:RegisterEvent("PLAYER_LOGOUT")
function Aptechka.PLAYER_LOGIN(self,event,arg1)
Aptechka:UpdateRangeChecker()
local uir2 = function(unit)
if UnitIsDeadOrGhost(unit) then --IsSpellInRange doesn't work with dead people
if UnitIsDeadOrGhost(unit) or UnitIsEnemy(unit, "player") then --IsSpellInRange doesn't work with dead people
return UnitInRange(unit)
else
return uir(unit)
Expand Down
4 changes: 4 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ config.SummonPending = { name = "SUMMON_PENDING", assignto = { "text2" }, color
config.SummonAccepted = { name = "SUMMON_ACCEPTED", assignto = { "text2" }, color = {0,1,0}, text = "ACCEPTED", priority = 51 }
config.SummonDeclined = { name = "SUMMON_DECLINED", assignto = { "text2" }, color = {1,0,0}, text = "DECLINED", priority = 52 }

-- config.MindControl = { name = "MIND_CONTROL", assignto = { "mindcontrol" }, color = {1,0,0}, priority = 52 }
config.MindControlStatus = { name = "MIND_CONTROL", assignto = { "border", "unhealable", "mindcontrol" }, color = {0.5,0,1}, priority = 52 }
config.UnhealableStatus = { name = "UNHEALABLE", assignto = { "unhealable" }, color = {0.5,0,1}, priority = 50 }

-- default priority is 80

local IsSpellInRange = _G.IsSpellInRange
Expand Down
76 changes: 75 additions & 1 deletion frame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ local LSM = LibStub("LibSharedMedia-3.0")
LSM:Register("statusbar", "Gradient", [[Interface\AddOns\Aptechka\gradient.tga]])
LSM:Register("font", "ClearFont", [[Interface\AddOns\Aptechka\ClearFont.ttf]], GetLocale() ~= "enUS" and 15)

local isClassic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC

--[[
2 shield icon border
0 shield icon texture
Expand Down Expand Up @@ -1147,6 +1149,73 @@ local CreateTextTimer = function(parent,point,frame,to,x,y,hjustify,fontsize,fon
end
AptechkaDefaultConfig.GridSkin_CreateTextTimer = CreateTextTimer

local CreateUnhealableOverlay = function(parent)
local tex2 = parent.health:CreateTexture(nil, "ARTWORK", nil, -4)
tex2:SetHorizTile(true)
tex2:SetVertTile(true)
tex2:SetTexture("Interface\\AddOns\\Aptechka\\swirl", "REPEAT", "REPEAT")
tex2:SetVertexColor(0,0,0, 0.8)

tex2:SetBlendMode("BLEND")
tex2:SetAllPoints(parent)
return tex2
end

local CreateMindControlIcon = function(parent)
local f = CreateFrame("Frame", nil, parent)
-- f:SetFrameLevel(4)

-- local tex = parent.health:CreateTexture(nil, "ARTWORK", nil, -3)
-- tex:SetAtlas("Darklink-blackinside")
-- tex:SetVertexColor(1,0.6, 0.6)
-- local height = parent:GetHeight()*1.2
-- tex:SetSize(0.8*height, height)

-- tex:SetAtlas("Start-VersusSplash")
-- local height = parent:GetHeight()
-- tex:SetSize(height, height)
-- tex:SetVertexColor(0,0,0)

-- tex:SetAtlas("BattleBar-SwapPetFrame-DeadIcon")
-- local height = parent:GetHeight()
-- tex:SetSize(height, height)
-- tex:SetAlpha(0.7)

local tex = f:CreateTexture(nil, "ARTWORK", nil, -4)
tex:SetTexture("Interface\\AddOns\\Aptechka\\")
-- local height = parent:GetHeight()
-- local width = parent:GetWidth()
-- local len = math.min(height, width)
-- tex:SetSize(len, len)
tex:SetAlpha(0.6)
tex:SetVertexColor(0.5,0,1)
-- tex:SetAlpha(0.9)
tex:SetAllPoints(parent)
-- tex:SetPoint("TOPLEFT",parent,"TOPLEFT",0,0)

if not isClassic then
local tex = f:CreateTexture(nil, "ARTWORK", nil, -3)
tex:SetTexture("Interface/CorruptedItems/CorruptedInventoryIcon")
tex:SetTexCoord(0.02, 0.5, 0.02, 0.5)
local height = parent:GetHeight()
local width = parent:GetWidth()
local len = math.min(height, width)
tex:SetSize(len, len)
-- tex:SetAlpha(0.9)
tex:SetPoint("TOPLEFT",parent,"TOPLEFT",0,0)
end


-- tex:SetAtlas("bfa-threats-cornereye")
-- local height = parent:GetHeight()*1.1
-- tex:SetSize(height, height)
-- -- tex:SetAlpha(0.9)
-- tex:SetPoint("CENTER",15,26)

-- tex:SetPoint("CENTER",0,0)
return f
end


local border_backdrop = {
edgeFile = "Interface\\Addons\\Aptechka\\border", tileEdge = true, edgeSize = 14,
Expand Down Expand Up @@ -1256,6 +1325,9 @@ local optional_widgets = {

bars = CreateBars,

mindcontrol = CreateMindControlIcon,
unhealable = CreateUnhealableOverlay,

vbar1 = function(self) return CreateStatusBar(self, 4, 20, "TOPRIGHT", self, "TOPRIGHT",-9,2, nil, true) end,

smist = function(self) return CreateIndicator(self,7,7,"TOPRIGHT",self.vbar1,"TOPLEFT",-1,0) end,
Expand All @@ -1274,7 +1346,7 @@ local function Reconf(self)

local texpath2 = LSM:Fetch("statusbar", db.powerTexture)
self.power:SetStatusBarTexture(texpath2)
self.power:GetStatusBarTexture():SetDrawLayer("ARTWORK",-2)
self.power:GetStatusBarTexture():SetDrawLayer("ARTWORK",-6)
self.power.bg:SetTexture(texpath2)

if not db.fgShowMissing then
Expand Down Expand Up @@ -1701,6 +1773,8 @@ AptechkaDefaultConfig.GridSkin = function(self)
list["bar1"] = nil
list["bar2"] = nil
list["bar3"] = nil
list["mindcontrol"] = nil
list["unhealable"] = nil
Aptechka.widget_list = list
end

Expand Down
Binary file added innerglow.tga
Binary file not shown.
Binary file added swirl.tga
Binary file not shown.

0 comments on commit f346f06

Please sign in to comment.