Reply
Thread Tools Display Modes
Unread 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.
fostic_popcorn is offline   Reply With Quote
Unread 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: 764
I feel your pain, at the moment tagged mobs appear basically like Warlocks, annoying. :P
__________________
Profile: Curse | Wowhead
Vlad is offline   Reply With Quote
Unread 12-03-12, 01:09 PM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,171
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).
Haleth is online now   Reply With Quote
Unread 12-03-12, 03:35 PM   #4
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,409
The nameplate health bar is just a statusbar like any other; just hook its SetStatusBarColor method, or the SetVertexColor method on its texture.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 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: 764
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
Vlad is offline   Reply With Quote
Unread 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.
Magicalhats27 is offline   Reply With Quote
Unread 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
fostic_popcorn is offline   Reply With Quote
Unread 12-03-12, 11:49 PM   #8
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,409
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.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 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: 764
Thanks for the suggestions, Phanx. But I tried to see if this hook fired properly, it didn't fire at all.
__________________
Profile: Curse | Wowhead
Vlad is offline   Reply With Quote
Unread 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,367
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.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"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.
zork is online now   Reply With Quote
Unread 12-05-12, 01:53 PM   #11
devilArt
A Fallenroot Satyr
 
devilArt's Avatar
Join Date: Aug 2009
Posts: 26
It's really annoying
hope you guys can make a small simple addon to change it back
devilArt is offline   Reply With Quote
Unread 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?
__________________
ape47 is offline   Reply With Quote
Unread 12-05-12, 09:59 PM   #13
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 601
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.
semlar is online now   Reply With Quote
Reply

Go BackWoWInterface » 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