diff --git a/Aptechka.lua b/Aptechka.lua index bc4f1f5..ba03c59 100644 --- a/Aptechka.lua +++ b/Aptechka.lua @@ -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) diff --git a/config.lua b/config.lua index 9bfb7c6..0ef6a50 100644 --- a/config.lua +++ b/config.lua @@ -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 diff --git a/frame.lua b/frame.lua index 5b64460..897a50b 100644 --- a/frame.lua +++ b/frame.lua @@ -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 @@ -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, @@ -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, @@ -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 @@ -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 diff --git a/innerglow.tga b/innerglow.tga new file mode 100644 index 0000000..cf23f16 Binary files /dev/null and b/innerglow.tga differ diff --git a/swirl.tga b/swirl.tga new file mode 100644 index 0000000..2283089 Binary files /dev/null and b/swirl.tga differ