Thread Tools Display Modes
12-01-12, 01:46 PM   #1
fostic_popcorn
A Murloc Raider
 
fostic_popcorn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 5
5.1 - The nameplates of mobs tagged to others are now purple. Any way to change it?

For reference, I use caelnameplates, but this happens on default name plates as well. To test it yourself you can go to any major city's target dummies, if it isn't right after a server restart you should see their HP bars as this light purple that means they have been tagged to someone else.

Theoretically, I like the idea of this. What I can't stand is the color choice. Light purple? I would much prefer to change it to a light gray.

I tried going into cael's LUA to see if I could affect it there. However, nothing seems to be able to touch the color.

Any help at all would be tremendously appreciated as I have no clue what to do.
  Reply With Quote
12-03-12, 07:54 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
I feel your pain, at the moment tagged mobs appear basically like Warlocks, annoying. :P
__________________
Profile: Curse | Wowhead
  Reply With Quote
12-03-12, 01:09 PM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Well, it's a little annoying. caelNamePlates uses an OnShow script (like most other nameplate addons, I imagine) then checks the colour of the healthbar and replaces it with an appropriate new colour. This worked because colours were only set each time the name plate was shown.

Now, though, the colour can update as soon as a mob is tagged. Since we don't have access to the name plate API, and I *think* there is no event for mobs being tagged -around- you, the only alternative might be to constantly run an OnUpdate script which isn't ideal (name plate addons already use an OnUpdate script to scan for plates in the first place).
  Reply With Quote
12-03-12, 03:35 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The nameplate health bar is just a statusbar like any other; just hook its SetStatusBarColor method, or the SetVertexColor method on its texture.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-03-12, 07:59 PM   #5
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Hmm, I hooked the SetStatusBarColor but the C-code doesn't seem to fire in a way that the hook also fires, meaning the color remains purple.

Damn..
__________________
Profile: Curse | Wowhead
  Reply With Quote
12-03-12, 08:26 PM   #6
Magicalhats27
A Fallenroot Satyr
 
Magicalhats27's Avatar
Join Date: Nov 2012
Posts: 24
Originally Posted by Vlad View Post
Hmm, I hooked the SetStatusBarColor but the C-code doesn't seem to fire in a way that the hook also fires, meaning the color remains purple.

Damn..
Feel your pain, every addon I try still show the purple name plates. I did have some success with X-perl unit frames though. But I hate that addon and rather not be bothered using it.
  Reply With Quote
12-03-12, 11:03 PM   #7
fostic_popcorn
A Murloc Raider
 
fostic_popcorn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 5
For the record I tried a new nameplate addon this week and to my enormous surprise the addon bNameplates appears to color the target dummies gray (after a small 'refresh' - they sometimes appear purple at first but when you move the plates off your camera and back on they will be gray).

I haven't dug into the code yet to figure out how it does it but if someone else wants to beat me to it by all means
  Reply With Quote
12-03-12, 11:49 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Vlad View Post
Hmm, I hooked the SetStatusBarColor but the C-code doesn't seem to fire in a way that the hook also fires, meaning the color remains purple.
Try hooking it this way:

Code:
hooksecurefunc(healthBar:GetStatusBarTexture(), "SetVertexColor", function(texture, r, g, b, a)
    print("statusbar texture vertex color changed to", r, g, b, a)
end)
I'm pretty sure healthBar:SetStatusBarColor() is really just a wrapper for healthBar:GetStatusBarTexture():SetVertexColor() in which case it would make sense for the internal API to just call that directly.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-04-12, 06:42 AM   #9
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Thanks for the suggestions, Phanx. But I tried to see if this hook fired properly, it didn't fire at all.
__________________
Profile: Curse | Wowhead
  Reply With Quote
12-04-12, 08:44 AM   #10
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Well you can do this:
  1. create a new statusbar on the nameplate object
  2. set the statusbartexture of the old statusbar to "" to keep it for value reference but have it invisible
  3. OnShow check the nameplate name color (if it is gray you have a tagged mob)
  4. if you find a tagged mob instead of using GetStatusBarColor of the old healthbar you apply the name color to your new healthbar

That's basically what I do in rDiabloPlates2 to fix the healthbar alpha bug. I have not yet implemented the tagging color change and I'm still unsure. If I turn around the camera 360° the nameplates return to default color (neutral for training dummies).
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 12-04-12 at 08:58 AM.
  Reply With Quote
12-05-12, 01:53 PM   #11
devilArt
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 51
It's really annoying
hope you guys can make a small simple addon to change it back
  Reply With Quote
12-05-12, 02:58 PM   #12
ape47
A Murloc Raider
 
ape47's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 9
Any suggestion for detecting nameplates after mind control?
__________________
  Reply With Quote
12-05-12, 09:59 PM   #13
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
I uploaded a small patch for this called Nameplate Tap Fix.

The purple color is set C side repeatedly onupdate and causes no trackable event as far as I can tell, so I just replace it onupdate. This is not extraordinarily efficient but it's not likely going to have any impact on your game.

edit: I should revise that, it could have an impact on your game if you had a lot of nameplates on your screen, but so would any nameplate addon.

I think it could at least be reduced down to only checking enemy plates but I'm not sure what the best way to detect that is.

Last edited by semlar : 12-06-12 at 05:17 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » 5.1 - The nameplates of mobs tagged to others are now purple. Any way to change it?

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