Skip to content

Commit

Permalink
add code from v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunshine committed Mar 1, 2021
1 parent d28a3fa commit 47d3111
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ShadowMeld/ShadowMeld.toc
Original file line number Diff line number Diff line change
@@ -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
42 changes: 42 additions & 0 deletions ShadowMeld/engine.lua
Original file line number Diff line number Diff line change
@@ -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")
Binary file added ShadowMeld/texture.tga
Binary file not shown.

0 comments on commit 47d3111

Please sign in to comment.