mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-19 02:50:50 +00:00
easteregg: make xmas less intrusive
This commit is contained in:
+22
-3
@@ -2,10 +2,29 @@ pfUI:RegisterModule("easteregg", function ()
|
|||||||
if date("%m%d") == "1224" or date("%m%d") == "1225" then
|
if date("%m%d") == "1224" or date("%m%d") == "1225" then
|
||||||
-- merry x-mas!
|
-- merry x-mas!
|
||||||
local title = (UnitFactionGroup("player") == "Horde") and PVP_RANK_18_0 or PVP_RANK_18_1
|
local title = (UnitFactionGroup("player") == "Horde") and PVP_RANK_18_0 or PVP_RANK_18_1
|
||||||
|
local oldflag = _G.CHAT_FLAG_AFK
|
||||||
|
|
||||||
_G.CHAT_FLAG_AFK = title .. " "
|
local pvpking = CreateFrame("Frame", "pfPvPKing", UIParent)
|
||||||
_G.MARKED_AFK = "|cff33ffccpf|cffffffffUI|r wishes you a merry christmas, |cff33ffcc" .. title .. "|r."
|
pvpking:Hide()
|
||||||
_G.MARKED_AFK_MESSAGE = "|cff33ffccpf|cffffffffUI|r wishes you a merry christmas, |cff33ffcc" .. title .. "|r: %s"
|
|
||||||
|
pvpking:RegisterEvent("CHAT_MSG_SYSTEM")
|
||||||
|
pvpking:SetScript("OnEvent", function()
|
||||||
|
if strfind(arg1, _G.MARKED_AFK) or strfind(arg1, _G.MARKED_AFK_MESSAGE) then
|
||||||
|
_G.CHAT_FLAG_AFK = title .. " "
|
||||||
|
this.time = GetTime()
|
||||||
|
this:Show()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
pvpking:SetScript("OnUpdate", function()
|
||||||
|
if this.time + 1 < GetTime() then
|
||||||
|
_G.CHAT_FLAG_AFK = oldflag
|
||||||
|
this:Hide()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
_G.MARKED_AFK = "|cff33ffccShagu|cffffffff wishes you a merry christmas. You are now |cff33ffcc" .. title .. "|cffffffff. Thanks for using |cff33ffccpf|cffffffffUI|cffffffff!|r"
|
||||||
|
_G.MARKED_AFK_MESSAGE = "|cff33ffccShagu|cffffffff wishes you a merry christmas. You are now |cff33ffcc" .. title .. "|cffffffff. Thanks for using |cff33ffccpf|cffffffffUI|cffffffff!|r: %s"
|
||||||
_G.CLEARED_AFK = "You are no longer |cff33ffcc" .. title .. "|r."
|
_G.CLEARED_AFK = "You are no longer |cff33ffcc" .. title .. "|r."
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user