View Single Post
03-19-14, 02:06 PM   #20
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
In your OnUpdate (lines 303-322 in the pastebin) you should create a local reference to self.healthBar and spare yourself 11 table look-ups. You also have an unnecessary call to GetStatusBarColor() in UpdatePlateColor. Line 46 could just read
Code:
newr, newg, newb = r, g, b
or you could just return from every if statement and even spare the 3 locals for the new color.
  Reply With Quote