From 36cb3cdd04090d02c258963caa7b96e22a280555 Mon Sep 17 00:00:00 2001 From: Scott Sibley Date: Sun, 19 Jun 2011 20:29:00 +0000 Subject: [PATCH] Add arena ranking, colored gradually according to rank --- Modules/UnitTooltip/UnitTooltip.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Modules/UnitTooltip/UnitTooltip.lua b/Modules/UnitTooltip/UnitTooltip.lua index 4ed28b2..b4c98e9 100644 --- a/Modules/UnitTooltip/UnitTooltip.lua +++ b/Modules/UnitTooltip/UnitTooltip.lua @@ -723,7 +723,7 @@ if pvp then elseif fctn == L["Horde"] then fctn = L["Alliance"] end - return (pvp.text and Texture(pvp.texture, 12) .. pvp.text or Texture("Interface\\PvPRankBadges\\PvPRank"..fctn..".blp", 12) .. L["n00b (-1)"]) .. " - " .. pvp.lifetimeHK .. " HKs" + return (pvp.text and Texture(pvp.texture, 12) .. pvp.text or Texture("Interface\\PvPRankBadges\\PvPRank"..fctn..".blp", 12) .. L["n00b (-1)"]) .. " * " .. pvp.lifetimeHK .. " HKs" else return L["Fetching..."] end @@ -742,8 +742,9 @@ local team = pvp.teams[2] if not team then return "" end local text = "" if team and type(team.teamSize) == "number" and team.teamSize > 0 then - local points = CalculateArenaPoints(team.teamRating or 0, team.teamSize) - text = format("2v2 %s %s (%d pts)", Texture("Interface\\PVPFrame\\PVP-Banner-2.blp", 12), team.teamName or "Error", points) + local points = CalculateArenaPoints(team.teamRating, team.teamSize) + local perc = team.teamRating / 3500 + text = format("2v2 %s %s %s (%.1f pts)", Texture("Interface\\PVPFrame\\PVP-Banner-2.blp", 12), team.teamName or "Name?", Colorize(team.teamRating, perc, 0.5, 1), points) end return text ]], @@ -762,7 +763,8 @@ if not team then return "" end local text = "" if team and type(team.teamSize) == "number" and team.teamSize > 0 then local points = CalculateArenaPoints(team.teamRating, team.teamSize) - text = format("3v3 %s %s (%d pts)", Texture("Interface\\PVPFrame\\PVP-Banner-3.blp", 12), team.teamName or "Error", points) + local perc = team.teamRating / 3500 + text = format("3v3 %s %s %s (%.1f pts)", Texture("Interface\\PVPFrame\\PVP-Banner-3.blp", 12), team.teamName or "Name?", Colorize(team.teamRating, perc, 0.5, 1), points) end return text ]], @@ -781,7 +783,8 @@ if not team then return "" end local text = "" if team and type(team.teamSize) == "number" and team.teamSize > 0 then local points = CalculateArenaPoints(team.teamRating, team.teamSize) or 0 - text = format("5v5 %s %s (%d pts)", Texture("Interface\\PVPFrame\\PVP-Banner-5.blp", 12), team.teamName or "Error", points) + local perc = team.teamRating / 3500 + text = format("5v5 %s %s %s (%.1f pts)", Texture("Interface\\PVPFrame\\PVP-Banner-5.blp", 12), team.teamName or "Name?", Colorize(team.teamRating, perc, 0.5, 1), points) end return text ]], -- 1.7.9.5