From ff37e7abcb101aeb03f9c28bd8e3e72587b1cebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20H=C3=BCskes?= Date: Fri, 9 Dec 2022 17:04:08 +0100 Subject: [PATCH] Cleanup pvpColor function --- core.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/core.lua b/core.lua index 993a475..d4b64e0 100755 --- a/core.lua +++ b/core.lua @@ -35,17 +35,11 @@ local colorlist = { ['contested'] = "ffb200", } local function pvpColor(txt) - local col - local pvpType, isFFA, faction = GetZonePVPInfo() + local pvpType = GetZonePVPInfo() if(colorlist[pvpType]) then - col = colorlist[pvpType] - else - col = "ffd100" - --ffecc1 from ZoneText.lua, the one in the middle of the screen when changing areas - --ffd100 from MiniMap.lua, which uses NORMAL_FONT_COLOR - --Which one is "more correct"? + return child:colorize(txt, colorlist[pvpType]) end - return child:colorize(txt, col) + return txt end local function OnDataUpdate() setPlayerCoords()