Thread Tools Display Modes
08-21-15, 11:55 AM   #1
Blazeflack
A Deviate Faerie Dragon
Join Date: Sep 2006
Posts: 12
PTR 6.2.2 Nameplate changes

The nameplates have received some updates on the PTR recently.

From this thread you had the following code:
Code:
    --full nameplate objects
        local f = NamePlate1 --nameplateframe
        f.barFrame, f.nameFrame = f:GetChildren()
        f.barFrame.threat, f.barFrame.border, f.barFrame.highlight, f.barFrame.level, f.barFrame.boss, f.barFrame.raid, f.barFrame.dragon = f.barFrame:GetRegions()
        f.nameFrame.name = f.nameFrame:GetRegions()
        f.barFrame.healthbar, f.barFrame.castbar = f.barFrame:GetChildren()
        f.barFrame.healthbar.texture =  f.barFrame.healthbar:GetRegions()
        f.barFrame.castbar.texture, f.barFrame.castbar.border, f.barFrame.castbar.shield, f.barFrame.castbar.icon =  f.barFrame.castbar:GetRegions()
The folllowing line will need to be changed if you want to stick with this code:
Code:
f.barFrame.healthbar, f.barFrame.castbar = f.barFrame:GetChildren()
to this:
Code:
f.barFrame.healthbar, f.barFrame.absorbBar, f.barFrame.castbar = f.barFrame:GetChildren()

In addition to the above change, almost all elements have received parentKeys.
You can now use the following code instead:
Code:
local frame = NamePlate1

frame.name = frame.NameContainer.NameText
frame.border = frame.ArtContainer.Border
frame.highlight = frame.ArtContainer.Highlight
frame.level = frame.ArtContainer.LevelText
frame.raidIcon = frame.ArtContainer.RaidTargetIcon
frame.eliteIcon = frame.ArtContainer.EliteIcon
frame.threat = frame.ArtContainer.AggroWarningTexture
frame.bossIcon = frame.ArtContainer.HighLevelIcon

frame.healthBar = frame.ArtContainer.HealthBar
frame.healthBar.texture = frame.healthBar:GetRegions() --No parentKey, yet?
--Available child element (texture): frame.healthBar.OverAbsorb

frame.absorbBar = frame.ArtContainer.AbsorbBar
frame.absorbBar.region1 = frame.absorbBar:GetRegions() --No parentKey, yet? Not sure what region1 is, probably texture like the others.
frame.absorbBar.overlay = frame.absorbBar.Overlay

frame.castBar = frame.ArtContainer.CastBar
frame.castBar.texture = frame.castBar:GetRegions() --No parentKey, yet?
frame.castBar.border = frame.ArtContainer.CastBarBorder
frame.castBar.icon = frame.ArtContainer.CastBarSpellIcon
frame.castBar.shield = frame.ArtContainer.CastBarFrameShield
frame.castBar.name = frame.ArtContainer.CastBarText
frame.castBar.shadow = frame.ArtContainer.CastBarTextBG
Edit: "OnValueChangd" for healthbars now returns values between 0 and 1. Hopefully this is unintended, as it will make it hard to get exact values for nameplates.

Last edited by Blazeflack : 09-01-15 at 12:29 PM.
 
08-21-15, 03:53 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Interesting, this should make it simpler to identify the various nameplate regions.
 
09-01-15, 11:43 AM   #3
Blazeflack
A Deviate Faerie Dragon
Join Date: Sep 2006
Posts: 12
It would appear the "OnValueChanged" script on the nameplate healthbars has been changed as well.

It now returns values between 0 and 1, both included.
 
09-01-15, 08:27 PM   #4
Supernex
A Defias Bandit
 
Supernex's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jul 2009
Posts: 2
Which file is this in?
__________________
 
09-02-15, 05:12 AM   #5
Blazeflack
A Deviate Faerie Dragon
Join Date: Sep 2006
Posts: 12
Originally Posted by Supernex View Post
Which file is this in?
There is no file. It was manually discovered on the PTR.
 
09-02-15, 07:34 AM   #6
Taet
A Deviate Faerie Dragon
Join Date: Jan 2010
Posts: 17
I please you , anyone who knows how , he could update infinityplate ?
 
09-02-15, 09:03 AM   #7
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Taet View Post
I please you , anyone who knows how , he could update infinityplate ?
You can download a fan update here:

http://www.wowinterface.com/download...19881#comments
 
09-02-15, 11:08 AM   #8
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Anyone figured out how to porperly show health values and health max values with nameplates now?

Last edited by Resike : 09-02-15 at 11:40 AM.
 
09-02-15, 12:27 PM   #9
Blazeflack
A Deviate Faerie Dragon
Join Date: Sep 2006
Posts: 12
Originally Posted by Resike View Post
Anyone figured out how to porperly show health values and health max values with nameplates now?
The only way is to use the UnitHealthMax API when you mouse over a nameplate, then cache that value so you can use it later. Multiply the return from healthBar:GetValue() with the cached MaxHealth to get a guesstimate of the current exact health value.

This will obviously lead to examples where the exact value isn't 100% correct, as a player could receive or lose a health buff right after you cached his MaxHealth. In that case you would need to mouse over that player once more to grab the new MaxHealth.

Suffice to say, the current implementation is not ideal. Hopefully Blizzard will correct it sooner rather than later (and preferrably sooner than Soon™)

Last edited by Blazeflack : 09-02-15 at 12:33 PM.
 
09-02-15, 12:49 PM   #10
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Blazeflack View Post
The only way is to use the UnitHealthMax API when you mouse over a nameplate, then cache that value so you can use it later. Multiply the return from healthBar:GetValue() with the cached MaxHealth to get a guesstimate of the current exact health value.

This will obviously lead to examples where the exact value isn't 100% correct, as a player could receive or lose a health buff right after you cached his MaxHealth. In that case you would need to mouse over that player once more to grab the new MaxHealth.

Suffice to say, the current implementation is not ideal. Hopefully Blizzard will correct it sooner rather than later (and preferrably sooner than Soon™)
This is retarded. Why the heck they had to do this? How hard is it to calculate the percentages by themselfs?
 
09-03-15, 10:58 AM   #11
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,711
Originally Posted by Resike View Post
This is retarded. Why the heck they had to do this? How hard is it to calculate the percentages by themselfs?
If all you're after is getting percentages, you can do this:
Code:
local perc = hpBar:GetValue() * 100
someHealthText:SetFormattedText('%.1f%%', perc)
And use HookScript on the health bar's OnValueChanged and OnShow to update it.
 
09-03-15, 01:51 PM   #12
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by p3lim View Post
If all you're after is getting percentages, you can do this:
Code:
local perc = hpBar:GetValue() * 100
someHealthText:SetFormattedText('%.1f%%', perc)
And use HookScript on the health bar's OnValueChanged and OnShow to update it.
Thats not really the issue, the old percentage functions should work fine even unchanged. The real issue here they probably made the change since the default name plates only show percentages, so better to remove any other usefull information about it.
 
09-11-15, 12:41 PM   #13
Blazeflack
A Deviate Faerie Dragon
Join Date: Sep 2006
Posts: 12
The health value issue will be fixed in a future update: https://twitter.com/WarcraftDevs/sta...20808857403392
 
09-12-15, 04:42 AM   #14
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Blazeflack View Post
The health value issue will be fixed in a future update: https://twitter.com/WarcraftDevs/sta...20808857403392
Nice, but i don't get it why can't they just hotfix it in a wednesday maintenance.
 
09-12-15, 06:25 AM   #15
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,711
Originally Posted by Resike View Post
Nice, but i don't get it why can't they just hotfix it in a wednesday maintenance.
All UI changes require a patch.
 
09-12-15, 09:23 AM   #16
Spyro
A Fallenroot Satyr
 
Spyro's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2011
Posts: 23
Can we catch nameplates now using if Frame.ArtContainer instead of if Frame:GetName() and Frame:GetName():find("NamePlate") ? Or are there any other children of the WorldFrame with also an "ArtContainer" member?

Last edited by Spyro : 09-12-15 at 10:18 AM.
 
09-12-15, 12:40 PM   #17
Blazeflack
A Deviate Faerie Dragon
Join Date: Sep 2006
Posts: 12
Originally Posted by Spyro View Post
Can we catch nameplates now using if Frame.ArtContainer instead of if Frame:GetName() and Frame:GetName():find("NamePlate") ? Or are there any other children of the WorldFrame with also an "ArtContainer" member?
I don't know if there are other children with that specific element. You would need to test it, but I suspect it might be possible to do it the way you suggest.

Edit: I did a test and only captured Nameplates with the .ArtContainer element.

Last edited by Blazeflack : 09-12-15 at 12:49 PM.
 
 

WoWInterface » Site Forums » Archived Beta Forums » WoD Beta archived threads » PTR 6.2.2 Nameplate changes

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