View Single Post
03-08-14, 07:21 AM   #4
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Well, as far as I understand your code you are iterating over all the nameplates and recolor them here:

Code:
                       for _, plate in pairs(caelUI.plates) do
133.                                local status = UnitThreatSituation("player")
135.                                if (status and status > 0) then
136.                                        local r, g, b = unpack(aggroColors[playerIsTank][status])
137.                                        plate.healthBar.hpGlow:SetBackdropBorderColor(r, g, b)
138.                                else
139.                                        plate.healthBar.hpGlow:SetBackdropBorderColor(0, 0, 0)
140.                                end
141.                        end
The color values are based on
Code:
local status = UnitThreatSituation("player")
if (status and status > 0) then
The if clause has the same result for every single nameplate. Because you're requesting a general aggro value and not the value for the actual namplate unit (I'm not sure what UnitThreatSituation("player") does reaturn. But whatever it is ... it's the same value for ever single step in you loop.)
  Reply With Quote