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