WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Unit Frame Resting Flashing (https://www.wowinterface.com/forums/showthread.php?t=53989)

Vranx 07-22-16 05:59 PM

Unit Frame Resting Flashing
 
Is there an addon that will stop the unit frame from flashing when resting? Or a simple command I can put into an addon?

Tim 07-22-16 07:39 PM

Code:

hooksecurefunc("PlayerFrame_UpdateStatus", function()
  if IsResting("player") then
      PlayerStatusTexture:Hide()
      PlayerRestGlow:Hide()
      PlayerStatusGlow:Hide()
  end
end)


Vranx 07-22-16 08:34 PM

Perfect, thank you, appreciate it.

Vranx 10-28-22 01:56 PM

What Tim provided no longer works in Dragonflight. Can I get a little help?

Xrystal 10-28-22 02:12 PM

This might help.
https://www.townlong-yak.com/framexm...rFrame.lua#430

Vranx 10-28-22 03:20 PM

Thanks! I came up with the following which did what I wanted.

Code:

function PlayerFrame_UpdateStatus()
        local statusTexture = PlayerFrame.PlayerFrameContent.PlayerFrameContentMain.StatusTexture;
        if (IsResting()) then
                statusTexture:Hide();
                PlayerFrame_UpdatePlayerRestLoop(true);
        end
end

function PlayerFrame_UpdatePlayerRestLoop(state)
        local playerRestLoop = PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerRestLoop;
        if(state) then
                playerRestLoop:Hide();
                playerRestLoop.PlayerRestLoopAnim:Stop();
        end
end


L3n1n 10-29-22 04:40 PM

I don't recommend using this functions without hooksecurefunc or it it will cause problems in edit mode.

Vranx 10-29-22 07:22 PM

Like this?
Code:

hooksecurefunc("PlayerFrame_UpdateStatus", function(self)
        local statusTexture = PlayerFrame.PlayerFrameContent.PlayerFrameContentMain.StatusTexture;
        if (IsResting()) then
                statusTexture:Hide();
                PlayerFrame_UpdatePlayerRestLoop(true);
        end
end)

hooksecurefunc("PlayerFrame_UpdatePlayerRestLoop", function(state)
        local playerRestLoop = PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerRestLoop;
        if(state) then
                playerRestLoop:Hide();
                playerRestLoop.PlayerRestLoopAnim:Stop();
        end
end)


L3n1n 10-31-22 01:22 PM

Yeah, it's better now for my opinion.

sebte 11-01-22 04:28 AM

Is there a similar function to hide this red glow when I am in combat?


underbloez 11-04-22 09:11 AM

Hi, how do you activate this function?
do you just copypate it with / in game?
thank you

Vranx 11-04-22 02:31 PM

You have to copy the code into the window at https://addon.bool.no/ to make an addon out of it. Download the result and put it in your addons folder.

I would also be interested in stopping the red flashing on the unit frames in combat. I don't know how to do it after looking through the code.

underbloez 11-04-22 03:32 PM

Ok I got it
ty
I made a weak aura for it
does anyone have the code for the in combat flashing?

Vranx 11-08-22 04:03 PM

New addon has options for the rest flashing and animation along with combat flashing.
https://www.curseforge.com/wow/addons/krioui

sirpucna 11-09-22 05:31 AM

heres my way:
Code:

local hideRest = CreateFrame("Frame")
PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerRestLoop:SetParent(hideRest) --hide flash
PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerPortraitCornerIcon:SetParent(hideRest) --hide arrow
PlayerFrame.PlayerFrameContent.PlayerFrameContentMain.StatusTexture:SetParent(hideRest)--hide zzz
PlayerFrame.PlayerFrameContainer.FrameFlash:SetParent(hideRest) --hide combat red frame
hideRest:Hide()


Vranx 11-09-22 08:28 AM

Nice, that got rid of all the red on the unit frame in combat. Is it a simple add to also get rid of it on the target frame?

sirpucna 11-09-22 09:03 PM

line added in bold
Code:

local hideRest = CreateFrame("Frame")
PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerRestLoop:SetParent(hideRest) --hide flash
PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerPortraitCornerIcon:SetParent(hideRest) --hide arrow
PlayerFrame.PlayerFrameContent.PlayerFrameContentMain.StatusTexture:SetParent(hideRest)--hide zzz
PlayerFrame.PlayerFrameContainer.FrameFlash:SetParent(hideRest) --hide combat red frame
TargetFrame.TargetFrameContainer.Flash:SetParent(hideRest)
hideRest:Hide()


Vranx 11-09-22 09:59 PM

Thanks, appreciate the help.

born2slip 12-09-23 05:20 PM

Quote:

Originally Posted by sirpucna (Post 341540)
line added in bold
Code:

local hideRest = CreateFrame("Frame")
PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerRestLoop:SetParent(hideRest) --hide flash
PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerPortraitCornerIcon:SetParent(hideRest) --hide arrow
PlayerFrame.PlayerFrameContent.PlayerFrameContentMain.StatusTexture:SetParent(hideRest)--hide zzz
PlayerFrame.PlayerFrameContainer.FrameFlash:SetParent(hideRest) --hide combat red frame
TargetFrame.TargetFrameContainer.Flash:SetParent(hideRest)
hideRest:Hide()


Can you help with line for hide hunter pet combat red frame too?

born2slip 12-12-23 07:39 AM

Looks like PetAttackModeTexture:SetParent(hideRest) after TargetFrame line worked.
But please correct me if I'm wrong.


All times are GMT -6. The time now is 09:51 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI