From: Aleksi Blinnikka Date: Tue, 5 May 2020 20:35:07 +0000 (+0300) Subject: Line for Xanesh football X-Git-Url: https://www.aleksib.fi/git/wowui.git/commitdiff_plain/c3dac76db8bab6b3d085072341bfdd118b042c89 Line for Xanesh football --- diff --git a/OmaTMW/OmaTMW.toc b/OmaTMW/OmaTMW.toc index b9ea864..1f9cb1b 100644 --- a/OmaTMW/OmaTMW.toc +++ b/OmaTMW/OmaTMW.toc @@ -5,4 +5,5 @@ ## Notes: My TellMeWhen Healthstone.lua +XaneshLine.lua TellMeWhen.lua diff --git a/OmaTMW/XaneshLine.lua b/OmaTMW/XaneshLine.lua new file mode 100644 index 0000000..7210eb4 --- /dev/null +++ b/OmaTMW/XaneshLine.lua @@ -0,0 +1,32 @@ +-- XaneshLine.lua +local _; +local line = CreateFrame("Frame", "OmaLine", UIParent); +local playerGuid = nil; + +local function clog(ts, event, _, _, _, _, _, dest, _, _, _, spellid, ...) + if event == "SPELL_AURA_APPLIED" and spellid == 312406 and dest == playerGuid then + line:Show(); + elseif event == "SPELL_AURA_REMOVED" and spellid == 312406 and dest == playerGuid then + line:Hide(); + end +end + +local function lineConf() + line:SetPoint("CENTER", UIParent, "CENTER", 0, 100); + line:SetHeight(350); + line:SetWidth(5); + line.base = line:CreateTexture(nil, "BACKGROUND"); + line.base:SetAllPoints(); + line.base:SetColorTexture(1, 1, 1, 0.85); + line:Hide(); + + playerGuid = UnitGUID("player"); + line:UnregisterAllEvents(); + line:SetScript("OnEvent", function() + return clog(CombatLogGetCurrentEventInfo()); + end); + line:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED"); +end + +line:SetScript("OnEvent", lineConf); +line:RegisterEvent("PLAYER_LOGIN");