Thread Tools Display Modes
07-22-16, 05:59 PM   #1
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
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?
  Reply With Quote
07-22-16, 07:39 PM   #2
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 308
Code:
hooksecurefunc("PlayerFrame_UpdateStatus", function()
   if IsResting("player") then
      PlayerStatusTexture:Hide()
      PlayerRestGlow:Hide()
      PlayerStatusGlow:Hide()
   end
end)
__________________
AddOns: Tim @ WoWInterface
Characters: Mage, Priest, Devoker, Pally
Battle Tag: Mysterio#11164
Current PC Setup: PCPartPicker List
  Reply With Quote
07-22-16, 08:34 PM   #3
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
Perfect, thank you, appreciate it.
  Reply With Quote
10-28-22, 01:56 PM   #4
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
What Tim provided no longer works in Dragonflight. Can I get a little help?
  Reply With Quote
10-28-22, 02:12 PM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,862
This might help.
https://www.townlong-yak.com/framexm...rFrame.lua#430
__________________
  Reply With Quote
10-28-22, 03:20 PM   #6
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
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
  Reply With Quote
10-29-22, 04:40 PM   #7
L3n1n
A Fallenroot Satyr
 
L3n1n's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 20
I don't recommend using this functions without hooksecurefunc or it it will cause problems in edit mode.
  Reply With Quote
10-29-22, 07:22 PM   #8
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
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)
  Reply With Quote
10-31-22, 01:22 PM   #9
L3n1n
A Fallenroot Satyr
 
L3n1n's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 20
Yeah, it's better now for my opinion.
  Reply With Quote
11-01-22, 04:28 AM   #10
sebte
A Kobold Labourer
Join Date: Nov 2022
Posts: 1
Is there a similar function to hide this red glow when I am in combat?

  Reply With Quote
11-04-22, 09:11 AM   #11
underbloez
A Defias Bandit
Join Date: Nov 2022
Posts: 2
Hi, how do you activate this function?
do you just copypate it with / in game?
thank you
  Reply With Quote
11-04-22, 02:31 PM   #12
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
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.
  Reply With Quote
11-04-22, 03:32 PM   #13
underbloez
A Defias Bandit
Join Date: Nov 2022
Posts: 2
Ok I got it
ty
I made a weak aura for it
does anyone have the code for the in combat flashing?

Last edited by underbloez : 11-04-22 at 03:38 PM.
  Reply With Quote
11-08-22, 04:03 PM   #14
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
New addon has options for the rest flashing and animation along with combat flashing.
https://www.curseforge.com/wow/addons/krioui
  Reply With Quote
11-09-22, 05:31 AM   #15
sirpucna
A Fallenroot Satyr
Join Date: Nov 2016
Posts: 29
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()
  Reply With Quote
11-09-22, 08:28 AM   #16
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
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?
  Reply With Quote
11-09-22, 09:03 PM   #17
sirpucna
A Fallenroot Satyr
Join Date: Nov 2016
Posts: 29
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()
  Reply With Quote
11-09-22, 09:59 PM   #18
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
Thanks, appreciate the help.
  Reply With Quote
12-09-23, 05:20 PM   #19
born2slip
A Defias Bandit
Join Date: Jul 2017
Posts: 3
Originally Posted by sirpucna View Post
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?
  Reply With Quote
12-12-23, 07:39 AM   #20
born2slip
A Defias Bandit
Join Date: Jul 2017
Posts: 3
Looks like PetAttackModeTexture:SetParent(hideRest) after TargetFrame line worked.
But please correct me if I'm wrong.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Unit Frame Resting Flashing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off