Quantcast
WoWInterface - View Single Post - PlayerHitIndicator and class color. Help
View Single Post
11-26-17, 09:23 PM   #8
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 565
Originally Posted by Kakjens View Post
For me it feels that
Lua Code:
  1. PlayerHitIndicator:SetText(nil)
  2. PlayerHitIndicator.SetText = function() end
is a wrong way to hide text due to tainting.
Correct. Altering any of Blizzard's functions is a good way to taint. Not all UI code is secure, but taints happen in weird ways.

A better way to hide the PlayerHitIndicator text:

Lua Code:
  1. PlayerFrame:UnregisterEvent('UNIT_COMBAT')

My addon NoCombatText can also hide the text, but it also allows you to configure what you want to show, for both Player and Pet. An addon of the same name here, No Combat Text, just hides the text by clearing the anchor points of the HitIndicator frames. The names are coincidental, as explained in my comment on that addon's page.
  Reply With Quote