Thread Tools Display Modes
08-07-16, 07:26 AM   #1
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Fixing nameplate addon for Legion

I know Legion brought ALOT of changes to how nameplates work, but I've been out of the coding area since basically WoD first released, and am rather rusty at it.

With this addon, i get the following errors:
rNamePlates.lua:116: attempt to index field 'nameFrame' (a nil value)
rNamePlates.lua:314: attempt to call method 'GetVertexColor' (a nil value)
rNamePlates.lua:338: attempt to index field 'healthBar' (a nil value)


https://github.com/galaxy119/rNamePl...NamePlates.lua
  Reply With Quote
08-07-16, 07:45 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You no longer need to scan anonymous children/regions and make assumptions; everything is available through named keys now, eg:

<nameplate>.UnitFrame.healthBar
<nameplate>.UnitFrame.castBar

See Blizzard_NamePlates.xml to find the rest of the elements.

You also don't need to scan WorldFrame children anymore; events are fired when a nameplate is created, or its unit changes. See Blizzard_NamePlates.lua for details.
__________________
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
08-07-16, 08:42 AM   #3
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
So what would be the best way to go about updating it?
There's no features of the old one i need (now that auras are included on default nameplates) but I very much want to keep my diablo3 style skin for the nameplates.

Would it be easier to just rewrite the addon to reskin the default frames?
  Reply With Quote
08-07-16, 12:35 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
It's quite possible that zork is working on it. /shrug
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-07-16, 01:36 PM   #5
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Originally Posted by Seerah View Post
It's quite possible that zork is working on it. /shrug
I can already confirm he is NOT.
He has no intentions of updating Roth UI for Legion, hence why he let me take over Roth UI and oUF_Diablo.

This includes rNamePlates
  Reply With Quote
08-07-16, 02:23 PM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Galaxy119 View Post
I can already confirm he is NOT.
He has no intentions of updating Roth UI for Legion, hence why he let me take over Roth UI and oUF_Diablo.

This includes rNamePlates
Oh noes, but why?
  Reply With Quote
08-07-16, 03:09 PM   #7
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Originally Posted by Resike View Post
Oh noes, but why?
He simply has no desire to continue Roth UI.
He's working on another more simplistic one, and only keeping up new versions of the addons needed for that, rNamePlates aswell as a number of others are officially abandoned by him and he let me pick them up as my own to maintain them.
  Reply With Quote
08-07-16, 03:21 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
If zork messages Cairenn or Dolby, those addons and their pages can be transferred to you then.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-07-16, 04:12 PM   #9
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Galaxy119 View Post
So what would be the best way to go about updating it?
There's no features of the old one i need (now that auras are included on default nameplates) but I very much want to keep my diablo3 style skin for the nameplates.

Would it be easier to just rewrite the addon to reskin the default frames?
You probably just need to change how you find the nameplates (replace that OnUpdate script scanning all the WorldFrame's children with an OnEvent script listening for the new events to detect when a nameplate is created) and how you refer to the elements (instead of "frame.healthBar = frame:GetChildren()" and then referring to "frame.healthBar", just refer to "frame.UnitFrame.healthBar").

Everything else you're doing as a style mod (changing textures/fonts, and moving stuff around) shouldn't really need many/any changes.
__________________
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
08-07-16, 05:53 PM   #10
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Originally Posted by Phanx View Post
You probably just need to change how you find the nameplates (replace that OnUpdate script scanning all the WorldFrame's children with an OnEvent script listening for the new events to detect when a nameplate is created) and how you refer to the elements (instead of "frame.healthBar = frame:GetChildren()" and then referring to "frame.healthBar", just refer to "frame.UnitFrame.healthBar").

Everything else you're doing as a style mod (changing textures/fonts, and moving stuff around) shouldn't really need many/any changes.
I actually found it significantly easier to re-write the entire thing than try and sift through zork's code and fix it.

Thanks very much for the help, I had no idea about the nameplate changes, so thanks.


I'll be able to re-include rNamePlates with me next update to Roth UI
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Fixing nameplate addon for Legion


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