3 local GetTime = GetTime;
4 local frame = CreateFrame("Cooldown", "OmaGiftCD", UIParent, "CooldownFrameTemplate");
5 local line = CreateFrame("Frame", "OmaLine", UIParent);
6 local playerGuid = nil;
8 local function clog(ts, event, _, source, _, _, _, dest, _, _, _, spellid, ...)
9 if event == "SPELL_AURA_APPLIED" and spellid == 312406 and dest == playerGuid then
11 elseif event == "SPELL_AURA_REMOVED" and spellid == 312406 and dest == playerGuid then
17 frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 500, -400);
18 frame:SetPoint("BOTTOMRIGHT", UIParent, "TOPLEFT", 580, -480);
19 frame.base = frame:CreateTexture(nil, "BACKGROUND");
20 frame.base:SetAllPoints();
21 frame.base:SetColorTexture(0, 0, 0, 0.5);
22 frame.stone = frame:CreateTexture(nil, "BORDER");
23 frame.stone:SetPoint("TOPLEFT", frame.base, "TOPLEFT", 1, -1);
24 frame.stone:SetPoint("BOTTOMRIGHT", frame.base, "BOTTOMRIGHT", -1, 1);
25 frame.stone:SetTexCoord(0.07, 0.93, 0.07, 0.93);
26 frame.stone:SetTexture(2000853); -- Gift Texture
29 playerGuid = UnitGUID("player");
30 frame:UnregisterAllEvents();
31 frame:SetScript("OnEvent", function()
32 return clog(CombatLogGetCurrentEventInfo());
34 frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
37 frame:SetScript("OnEvent", gift);
38 frame:RegisterEvent("PLAYER_LOGIN");
40 local function lineConf()
41 line:SetPoint("CENTER", UIParent, "CENTER", 0, 100);
44 line.base = line:CreateTexture(nil, "BACKGROUND");
45 line.base:SetAllPoints();
46 line.base:SetColorTexture(1, 1, 1, 0.85);
48 line:UnregisterAllEvents();
49 line:SetScript("OnEvent", function()
50 return clog(CombatLogGetCurrentEventInfo());
52 line:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
55 line:SetScript("OnEvent", lineConf);
56 line:RegisterEvent("PLAYER_LOGIN");