Originally Posted by Aanson
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.