diff --git a/ShadowMeld/ShadowMeld.toc b/ShadowMeld/ShadowMeld.toc new file mode 100644 index 0000000..c82d3b6 --- /dev/null +++ b/ShadowMeld/ShadowMeld.toc @@ -0,0 +1,7 @@ +## Interface: 20400 +## Title: ShadowMeld +## Version: 1.0 +## Author: flatrose +## Notes: Provides a dark, fullscreen glowing effect while stealthed. Works with Stealth, Prowl and Shadowmeld. + +engine.lua diff --git a/ShadowMeld/engine.lua b/ShadowMeld/engine.lua new file mode 100644 index 0000000..d52aef9 --- /dev/null +++ b/ShadowMeld/engine.lua @@ -0,0 +1,42 @@ +if (GetLocale() == "deDE") then + SM_PROWL = "Schleichen"; + SM_SHADOWMELD = "Schattenhaftigkeit"; +elseif (GetLocale() == "frFR") then + SM_PROWL = "Rôder"; + SM_SHADOWMELD = "Camouflage dans l'ombre"; +elseif (GetLocale() == "esES") then + SM_PROWL = "Acechar"; + SM_SHADOWMELD = "Fusión de las Sombras"; +elseif (GetLocale() == "ruRU") then + SM_PROWL = "Крадущийся зверь"; + SM_SHADOWMELD = "Уход в тень"; +else + SM_PROWL = "Prowl"; + SM_SHADOWMELD = "Shadowmeld"; +end + +local f = CreateFrame("Frame", nil, WorldFrame); + +f:SetClampedToScreen(true); +f:SetFrameStrata("BACKGROUND"); +f:SetAllPoints(UIParent); + +local t = f:CreateTexture(nil,"BACKGROUND"); +t:SetTexture("Interface\\AddOns\\ShadowMeld\\texture.tga"); +t:SetAllPoints(f); + +f.texture = t; + +local function ShadowMeld_OnEvent(self, event, ...) + if event == "PLAYER_AURAS_CHANGED" then + if ( IsStealthed() or GetPlayerBuffTexture(SM_PROWL) or GetPlayerBuffTexture(SM_SHADOWMELD) ) then + f:Show(); + else + f:Hide(); + end + end +end + +local g = CreateFrame("Frame"); +g:SetScript("OnEvent", ShadowMeld_OnEvent); +g:RegisterEvent("PLAYER_AURAS_CHANGED") diff --git a/ShadowMeld/texture.tga b/ShadowMeld/texture.tga new file mode 100644 index 0000000..c34e5f9 Binary files /dev/null and b/ShadowMeld/texture.tga differ