Thread Tools Display Modes
01-25-23, 09:51 AM   #1
Imissmycatx
A Defias Bandit
Join Date: Jan 2023
Posts: 2
LF: Addon or Script to hide Prestige/PvP Icons. DF

Hello, i hope some1 here can be helpful, and somehow know a script or addon that works. Ever since DF, i been looking for a Addon or Script to hide the prestige icons for Player,Target and Focus frames. Since its so big, and ugly.

So i was wondering if any1 knows a addon or script, that can help me remove em.

The addons from SL does no longer work.

Best regards,
  Reply With Quote
01-25-23, 08:32 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
The PvP and Prestige icons are two different things, though the later replaces the former when applicable. Here's code for two different options.



Restore PVP Icon:
Lua Code:
  1. local OpposingFactions={Horde="Alliance",Alliance="Horde"};
  2. local function UpdatePVPIcon(icon,unit,showmercenary)
  3.     local faction=UnitFactionGroup(unit);
  4.     local opposite=faction and OpposingFactions[faction];
  5.  
  6.     if UnitIsPVPFreeForAll(unit) then
  7.         icon:SetAtlas("UI-HUD-UnitFrame-Player-PVP-FFAIcon",TextureKitConstants.UseAtlasSize);
  8.         icon:Show();
  9.     elseif UnitIsPVP(unit) and opposite then
  10.         icon:SetAtlas(("UI-HUD-UnitFrame-Player-PVP-%sIcon"):format((showmercenary and UnitIsMercenary(unit)) and opposite or faction),TextureKitConstants.UseAtlasSize);
  11.         icon:Show();
  12.     else icon:Hide(); end
  13. end
  14.  
  15. hooksecurefunc("PlayerFrame_UpdatePvPStatus",function()
  16.     local parent=PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual;
  17.  
  18.     UpdatePVPIcon(parent.PVPIcon,"player",true);
  19.     parent.PrestigePortrait:Hide();
  20.     parent.PrestigeBadge:Hide();
  21. end);
  22.  
  23. local function TargetFrame_CheckFaction(self)
  24.     local parent=self.TargetFrameContent.TargetFrameContentContextual;
  25.  
  26.     UpdatePVPIcon(parent.PvpIcon,self.unit,false);
  27.     parent.PrestigePortrait:Hide();
  28.     parent.PrestigeBadge:Hide();
  29. end
  30.  
  31. hooksecurefunc(TargetFrame,"CheckFaction",TargetFrame_CheckFaction);
  32. hooksecurefunc(FocusFrame,"CheckFaction",TargetFrame_CheckFaction);



Disable both:
Lua Code:
  1. hooksecurefunc("PlayerFrame_UpdatePvPStatus",function()
  2.     local parent=PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual;
  3.     parent.PrestigePortrait:Hide();
  4.     parent.PrestigeBadge:Hide();
  5.     parent.PVPIcon:Hide();
  6.     PlayerPVPTimerText:Hide();
  7.     PlayerPVPTimerText.timeLeft=nil;
  8. end);
  9.  
  10. local function TargetFrame_CheckFaction(self)
  11.     local parent=self.TargetFrameContent.TargetFrameContentContextual;
  12.     parent.PrestigePortrait:Hide();
  13.     parent.PrestigeBadge:Hide();
  14.     parent.PvpIcon:Hide();
  15. end
  16.  
  17. hooksecurefunc(TargetFrame,"CheckFaction",TargetFrame_CheckFaction);
  18. hooksecurefunc(FocusFrame,"CheckFaction",TargetFrame_CheckFaction);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
01-26-23, 12:09 AM   #3
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
I was looking for and trying to achive the same thing but, as usual, SDPhantom's code is perfect.

Thanks so much for this.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
01-26-23, 04:38 AM   #4
Imissmycatx
A Defias Bandit
Join Date: Jan 2023
Posts: 2
You are a fucking legend. Thank you so much for this script. Really appreiciate it. Cheers bro
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » LF: Addon or Script to hide Prestige/PvP Icons. DF

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