mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62e0d4eb07 | |||
| a4ceb8ba53 | |||
| 80b677a6f8 | |||
| f6683b31af |
+4
-5
@@ -1,5 +1,4 @@
|
||||
pfUI:RegisterModule("afkcam", function ()
|
||||
local MARKED_AFK_CAPTURE = SanitizePattern(MARKED_AFK_MESSAGE)
|
||||
local social_chats = {
|
||||
"CHAT_MSG_SAY",
|
||||
"CHAT_MSG_WHISPER",
|
||||
@@ -165,10 +164,10 @@ pfUI:RegisterModule("afkcam", function ()
|
||||
end)
|
||||
|
||||
afkcam:SetScript("OnEvent", function()
|
||||
if event == "CHAT_MSG_SYSTEM" then
|
||||
if (arg1 == _G.MARKED_AFK) or strfind(arg1, MARKED_AFK_CAPTURE) then
|
||||
if event == "PLAYER_FLAGS_CHANGED" then
|
||||
if UnitIsAFK('player') then
|
||||
delay:Show()
|
||||
elseif (arg1 == _G.CLEARED_AFK) then
|
||||
elseif delay:IsVisible() then
|
||||
delay:Hide()
|
||||
this:stop()
|
||||
end
|
||||
@@ -180,7 +179,7 @@ pfUI:RegisterModule("afkcam", function ()
|
||||
end
|
||||
end)
|
||||
|
||||
afkcam:RegisterEvent("CHAT_MSG_SYSTEM")
|
||||
afkcam:RegisterEvent("PLAYER_FLAGS_CHANGED")
|
||||
afkcam:RegisterEvent("PLAYER_REGEN_DISABLED")
|
||||
afkcam:RegisterEvent("PLAYER_LEAVING_WORLD") -- reseting cvars on PLAYER_LOGOUT crashes the client ¯\_(ツ)_/¯
|
||||
end)
|
||||
|
||||
+4
-1
@@ -241,7 +241,10 @@ pfUI:RegisterModule("castbar", function ()
|
||||
return
|
||||
end
|
||||
|
||||
if not this.endTime then return end
|
||||
if not this.endTime then
|
||||
if this:GetAlpha() ~= 0 then this:SetAlpha(0) end
|
||||
return
|
||||
end
|
||||
|
||||
-- Non-player bars: if the unit disappears (target died / detarget),
|
||||
-- drop the bar immediately.
|
||||
|
||||
@@ -8,9 +8,9 @@ pfUI:RegisterModule("easteregg", function ()
|
||||
local pvpking = CreateFrame("Frame", "pfPvPKing", UIParent)
|
||||
pvpking:Hide()
|
||||
|
||||
pvpking:RegisterEvent("CHAT_MSG_SYSTEM")
|
||||
pvpking:RegisterEvent("PLAYER_FLAGS_CHANGED")
|
||||
pvpking:SetScript("OnEvent", function()
|
||||
if strfind(arg1, "You are now", 1) and strfind(arg1, "(AFK)", 1) then
|
||||
if UnitIsAFK('player') then
|
||||
_G.CHAT_FLAG_AFK = title .. " "
|
||||
this.time = GetTime()
|
||||
this:Show()
|
||||
@@ -61,14 +61,13 @@ pfUI:RegisterModule("easteregg", function ()
|
||||
end)
|
||||
|
||||
-- trigger fireworks when being AFK
|
||||
fireworks:RegisterEvent("CHAT_MSG_SYSTEM")
|
||||
fireworks:RegisterEvent("PLAYER_FLAGS_CHANGED")
|
||||
fireworks:SetScript("OnEvent", function()
|
||||
if strfind(arg1, _G.MARKED_AFK) or strfind(arg1, _G.MARKED_AFK_MESSAGE) then
|
||||
local isAFK = UnitIsAFK('player')
|
||||
if isAFK then
|
||||
this:SetAlpha(0)
|
||||
this:Show()
|
||||
elseif strfind(arg1, _G.CLEARED_AFK) then
|
||||
this:Hide()
|
||||
end
|
||||
this:SetShown(isAFK)
|
||||
end)
|
||||
|
||||
-- basic explosion animation
|
||||
|
||||
+1
-1
@@ -532,7 +532,7 @@ pfUI:RegisterModule("panel", function()
|
||||
-- Hearthstone bind location
|
||||
local hearth = CreateFrame("Frame", "pfPanelBindLocation", UIParent)
|
||||
hearth:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
hearth:RegisterEvent("CHAT_MSG_SYSTEM")
|
||||
hearth:RegisterEvent("HEARTHSTONE_BOUND")
|
||||
hearth:SetScript("OnEvent", function()
|
||||
pfUI.panel:OutputPanel("bindlocation", T["Hearthstone"] .. ": " .. (GetBindLocation() or T["Not Set"]))
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user