--- /dev/null
+-- GiftTracker.lua
+local _;
+local GetTime = GetTime;
+local frame = CreateFrame("Cooldown", "OmaGiftCD", UIParent, "CooldownFrameTemplate");
+local line = CreateFrame("Frame", "OmaLine", UIParent);
+local playerGuid = nil;
+
+local function clog(ts, event, _, source, _, _, _, 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 gift()
+ frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 500, -400);
+ frame:SetPoint("BOTTOMRIGHT", UIParent, "TOPLEFT", 580, -480);
+ frame.base = frame:CreateTexture(nil, "BACKGROUND");
+ frame.base:SetAllPoints();
+ frame.base:SetColorTexture(0, 0, 0, 0.5);
+ frame.stone = frame:CreateTexture(nil, "BORDER");
+ frame.stone:SetPoint("TOPLEFT", frame.base, "TOPLEFT", 1, -1);
+ frame.stone:SetPoint("BOTTOMRIGHT", frame.base, "BOTTOMRIGHT", -1, 1);
+ frame.stone:SetTexCoord(0.07, 0.93, 0.07, 0.93);
+ frame.stone:SetTexture(2000853); -- Gift Texture
+ frame:Hide();
+
+ playerGuid = UnitGUID("player");
+ frame:UnregisterAllEvents();
+ frame:SetScript("OnEvent", function()
+ return clog(CombatLogGetCurrentEventInfo());
+ end);
+ frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
+end
+
+frame:SetScript("OnEvent", gift);
+frame:RegisterEvent("PLAYER_LOGIN");
+
+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();
+ 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");
--- /dev/null
+-- TirnaHelper.lua
+local _;
+local frame = CreateFrame("Frame", "OmaTirna", UIParent);
+
+local function init()
+ frame:UnregisterAllEvents();
+ frame:SetPoint("TOP", UIParent, "TOP", -300, -250);
+ frame:SetWidth(1);
+ frame:SetHeight(1);
+ for i = 0,2 do
+ for j = 0,3 do
+ local button = CreateFrame("CheckButton", "OmaTirna"..i..j, frame);
+ button:SetPoint("TOPLEFT", frame, "TOPLEFT", i*52, j*42);
+ button:SetWidth(50);
+ button:SetHeight(40);
+ button.normal = button:CreateTexture(nil, "BACKGROUND");
+ button.normal:SetAllPoints();
+ button.normal:SetColorTexture(0.4, 0.4, 0.4);
+ button:SetNormalTexture(button.normal);
+ button.check = button:CreateTexture(nil, "BACKGROUND");
+ button.check:SetAllPoints();
+ button.check:SetColorTexture(0.9, 0.9, 0.9);
+ button:SetCheckedTexture(button.check);
+ end
+ end
+ frame:Hide();
+end
+
+frame:SetScript("OnEvent", init);
+frame:RegisterEvent("PLAYER_LOGIN");
+
+SLASH_OMATIRNA1 = "/tirna";
+function SlashCmdList.OMATIRNA()
+ if frame:IsShown() then
+ frame:Hide();
+ else
+ frame:Show();
+ end
+end