WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Flashy name for nearby guild mates (https://www.wowinterface.com/forums/showthread.php?t=58713)

Xrystal 05-03-21 03:30 PM

Just put it before the if guildie line to include the others. But you will then have to move the line starting with local nameplate = to the same place so you can access the nameplate object.

So instead of ..
Lua Code:
  1. if guildie[guid] then
  2.             PlaySound(416)
  3.             local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
  4.             nameplate.UnitFrame.name:SetTextColor(1,1,1,1)
  5.             nameplate.UnitFrame.healthBar:Hide()
  6.             print(name)
  7.         end

It should look like this..
Lua Code:
  1. local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
  2.         nameplate.UnitFrame.healthBar:Hide()
  3.         if guildie[guid] then
  4.             PlaySound(416)
  5.             nameplate.UnitFrame.name:SetTextColor(1,1,1,1)
  6.             print(name)
  7.         end

This essentially hides the healthbar immediately when they first are shown ( but wow may show it again during its update routine ) and then does the guildie check before setting the text color and playing the sound if it is a guildie.

Yukka 05-03-21 06:38 PM

Thanks it works like a charm!

I think the addon is complete now. Hope people will see this and use it as well to hug their guildies :)

kisses to you Xrystal, Kanegasi and the others <3


All times are GMT -6. The time now is 05:04 PM.

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