Skip to content

Commit 642ce52

Browse files
committed
rep renown texts in dt/databar
1 parent b699b7e commit 642ce52

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Diff for: ElvUI/Core/Modules/DataBars/Reputation.lua

+2-3
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@ function DB:ReputationBar_Update()
7575
if not standing and factionID and E.Retail and C_Reputation_IsMajorFaction(factionID) then
7676
local majorFactionData = C_MajorFactions_GetMajorFactionData(factionID)
7777
local renownColor = DB.db.colors.factionColors[10]
78-
local renownHex = E:RGBToHex(renownColor.r, renownColor.g, renownColor.b)
7978

8079
reaction, currentReactionThreshold, nextReactionThreshold = 10, 0, majorFactionData.renownLevelThreshold
8180
currentStanding = C_MajorFactions_HasMaximumRenown(factionID) and majorFactionData.renownLevelThreshold or majorFactionData.renownReputationEarned or 0
82-
standing = format('%s%s|r', renownHex, RENOWN_LEVEL_LABEL:format(majorFactionData.renownLevel))
81+
standing = E:RGBToHex(renownColor.r, renownColor.g, renownColor.b, nil, format(RENOWN_LEVEL_LABEL..'|r', majorFactionData.renownLevel))
8382

8483
DB:ReputationBar_QuestRep(factionID)
8584
end
@@ -186,7 +185,7 @@ function DB:ReputationBar_OnEnter()
186185
local majorFactionData = C_MajorFactions_GetMajorFactionData(factionID)
187186
currentStanding = (C_MajorFactions_HasMaximumRenown(factionID) and majorFactionData.renownLevelThreshold) or majorFactionData.renownReputationEarned or 0
188187
nextReactionThreshold = majorFactionData.renownLevelThreshold
189-
GameTooltip:AddDoubleLine(RENOWN_LEVEL_LABEL:format(majorFactionData.renownLevel), format('%d / %d (%d%%)', GetValues(currentStanding, 0, nextReactionThreshold)), BLUE_FONT_COLOR.r, BLUE_FONT_COLOR.g, BLUE_FONT_COLOR.b, 1, 1, 1)
188+
GameTooltip:AddDoubleLine(format(RENOWN_LEVEL_LABEL, majorFactionData.renownLevel), format('%d / %d (%d%%)', GetValues(currentStanding, 0, nextReactionThreshold)), BLUE_FONT_COLOR.r, BLUE_FONT_COLOR.g, BLUE_FONT_COLOR.b, 1, 1, 1)
190189

191190
local current, _, percent = GetValues(QuestRep, 0, nextReactionThreshold)
192191
GameTooltip:AddDoubleLine('Reputation from Quests', format('%d (%d%%)', current, percent), nil, nil, nil, 1, 1, 1)

Diff for: ElvUI/Core/Modules/DataTexts/Reputation.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ local function OnEvent(self)
7070

7171
currentReactionThreshold, nextReactionThreshold = 0, majorFactionData.renownLevelThreshold
7272
currentStanding = C_MajorFactions_HasMaximumRenown(factionID) and majorFactionData.renownLevelThreshold or majorFactionData.renownReputationEarned or 0
73-
standing = E:RGBToHex(color.r, color.g, color.b, nil, RENOWN_LEVEL_LABEL..' '..majorFactionData.renownLevel..'|r')
73+
standing = E:RGBToHex(color.r, color.g, color.b, nil, format(RENOWN_LEVEL_LABEL..'|r', majorFactionData.renownLevel))
7474
end
7575

7676
if not standing then
@@ -141,7 +141,7 @@ local function OnEnter()
141141
local majorFactionData = C_MajorFactions_GetMajorFactionData(factionID)
142142
currentStanding = (C_MajorFactions_HasMaximumRenown(factionID) and majorFactionData.renownLevelThreshold) or majorFactionData.renownReputationEarned or 0
143143
nextReactionThreshold = majorFactionData.renownLevelThreshold
144-
DT.tooltip:AddDoubleLine(RENOWN_LEVEL_LABEL .. majorFactionData.renownLevel, format('%d / %d (%d%%)', GetValues(currentStanding, 0, nextReactionThreshold)), BLUE_FONT_COLOR.r, BLUE_FONT_COLOR.g, BLUE_FONT_COLOR.b, 1, 1, 1)
144+
DT.tooltip:AddDoubleLine(format(RENOWN_LEVEL_LABEL, majorFactionData.renownLevel), format('%d / %d (%d%%)', GetValues(currentStanding, 0, nextReactionThreshold)), BLUE_FONT_COLOR.r, BLUE_FONT_COLOR.g, BLUE_FONT_COLOR.b, 1, 1, 1)
145145
elseif (isParagon or (reaction ~= _G.MAX_REPUTATION_REACTION)) and nextReactionThreshold ~= huge then
146146
DT.tooltip:AddDoubleLine(REPUTATION..':', format('%d / %d (%d%%)', GetValues(currentStanding, currentReactionThreshold, nextReactionThreshold)), 1, 1, 1)
147147
end

0 commit comments

Comments
 (0)