WoWInterface - View Single Post - Nameplate threat texture
View Single Post
02-17-13, 01:41 AM   #3
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Aanson View Post
What are you passing to 'GetThreatRegion()'?
That seems pretty obvious just from looking at the snippet he posted and you quoted... Plate is a reference to the nameplate object itself. Am I misinterpreting your question?

Anyway, the whole GetThreatRegion() function is extremely inefficient. You should identify all of the nameplate's children and regions once -- the first time you see the nameplate -- and attach them to the nameplate as table key/value pairs, eg. nameplate.threatRegion = x so you can get a reference to each region from a simple table lookup, instead of needing to do a whole chain of function lookups every time.

See http://www.wowinterface.com/forums/s...ad.php?t=44971 for an example.
Author/maintainer of Grid, PhanxChat, oUF_Phanx, 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!
  Reply With Quote