From 92211a4d80c2a342d74bd83d6ec0b24b0f83275f Mon Sep 17 00:00:00 2001 From: Scott Sibley Date: Mon, 20 Jun 2011 02:00:54 +0000 Subject: [PATCH] Bug fix. Arena lines should show the actual brightest emblem color now. Could probably use further improvements. --- Modules/UnitTooltip/UnitTooltip.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Modules/UnitTooltip/UnitTooltip.lua b/Modules/UnitTooltip/UnitTooltip.lua index a555967..8558d7f 100644 --- a/Modules/UnitTooltip/UnitTooltip.lua +++ b/Modules/UnitTooltip/UnitTooltip.lua @@ -753,9 +753,10 @@ if team and type(team.teamSize) == "number" and team.teamSize > 0 then local emblem = Texture("Interface\\PVPFrame\\Icons\\PVP-Banner-Emblem-"..team.emblem, 12) local embcol = RGBA2Color(team.emblemR, team.emblemG, team.emblemB) local bkgcol = RGBA2Color(team.backR, team.backG, team.backB) - local r, g, b = Color2RGBA(max(embcol, bkgcol)) + local brighest = ColorBrightest(embcol, bkgcol) + local r, g, b = Color2RGBA(brightest) local tag = Colorize("2v2", max(r, .2), max(g, .2), max(b, .2)) - local wins, played = team.teamWins, team.playerPlayed + local wins, played = team.teamWins, team.teamPlayed local losses = played - wins local winlost = "" if wins >= losses then @@ -787,9 +788,10 @@ if team and type(team.teamSize) == "number" and team.teamSize > 0 then local emblem = Texture("Interface\\PVPFrame\\Icons\\PVP-Banner-Emblem-"..team.emblem, 12) local embcol = RGBA2Color(team.emblemR, team.emblemG, team.emblemB) local bkgcol = RGBA2Color(team.backR, team.backG, team.backB) - local r, g, b = Color2RGBA(max(embcol, bkgcol)) + local brighest = ColorBrightest(embcol, bkgcol) + local r, g, b = Color2RGBA(brightest) local tag = Colorize("3v3", max(r, .2), max(g, .2), max(b, .2)) - local wins, played = team.teamWins, team.playerPlayed + local wins, played = team.teamWins, team.teamPlayed local losses = played - wins local winlost = "" if wins >= losses then @@ -821,9 +823,10 @@ if team and type(team.teamSize) == "number" and team.teamSize > 0 then local emblem = Texture("Interface\\PVPFrame\\Icons\\PVP-Banner-Emblem-"..team.emblem, 12) local embcol = RGBA2Color(team.emblemR, team.emblemG, team.emblemB) local bkgcol = RGBA2Color(team.backR, team.backG, team.backB) - local r, g, b = Color2RGBA(max(embcol, bkgcol)) + local brighest = ColorBrightest(embcol, bkgcol) + local r, g, b = Color2RGBA(brightest) local tag = Colorize("5v5", max(r, .2), max(g, .2), max(b, .2)) - local wins, played = team.teamWins, team.playerPlayed + local wins, played = team.teamWins, team.teamPlayed local losses = played - wins local winlost = "" if wins >= losses then -- 1.7.9.5