Skip to content

Commit 491900c

Browse files
committed
Update reputation colors
1 parent 1505f03 commit 491900c

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [6.2.1] - Unreleased
9+
10+
### Changed
11+
- Updated some reputation colors (mainly friendships that don't stick by the normal reputation namings).
12+
813
## [6.2.0] - 2024-09-07
914

1015
### Added

modules/reputation.lua

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -593,15 +593,16 @@ function module:GetRecentReputationsMenu()
593593
for _, rep in ipairs(recentRepsList) do
594594
local name = rep.name;
595595
local data = rep.data;
596+
local factionID = data.factionID;
596597

597598
if name then
598-
local factionData = C_Reputation.GetFactionDataByID(data.factionID);
599+
local factionData = C_Reputation.GetFactionDataByID(factionID);
599600
local standing, isHeader, hasRep, isWatched = factionData.reaction, factionData.isHeader, factionData.isHeaderWithRep, factionData.isWatched;
600601

601602
if not isHeader or hasRep then
602603
local standing_text = "";
603-
local majorFactionData = C_MajorFactions.GetMajorFactionData(data.factionID);
604-
local reputationInfo = C_GossipInfo.GetFriendshipReputation(data.factionID);
604+
local majorFactionData = C_MajorFactions.GetMajorFactionData(factionID);
605+
local reputationInfo = C_GossipInfo.GetFriendshipReputation(factionID);
605606

606607
if (majorFactionData) then
607608
standing_text = string.format("|cnHEIRLOOM_BLUE_COLOR:Renown %s|r", majorFactionData.renownLevel);
@@ -614,7 +615,7 @@ function module:GetRecentReputationsMenu()
614615
tinsert(factions, {
615616
name = string.format("%s (%s) +%s rep this session", name, standing_text, BreakUpLargeNumbers(data.amount)),
616617
isRecentFaction = true,
617-
factionID = data.factionID,
618+
factionID = factionID,
618619
isWatched = isWatched,
619620
})
620621
end
@@ -768,9 +769,9 @@ function module:GetReputationsMenu(currentMenu)
768769
if (majorFactionData and standing ~= 9) then
769770
standingText = string.format("|cnHEIRLOOM_BLUE_COLOR:Renown %s|r", majorFactionData.renownLevel);
770771
elseif (reputationInfo and reputationInfo.friendshipFactionID > 0) then
771-
standingText, _ = module:GetFriendShipColorText(reputationInfo.friendshipFactionID, reputationInfo.reaction);
772+
standingText = module:GetFriendShipColorText(reputationInfo.friendshipFactionID, reputationInfo.reaction);
772773
else
773-
standingText, _ = module:GetStandingColorText(standing);
774+
standingText = module:GetStandingColorText(standing);
774775
end
775776
end
776777

@@ -968,24 +969,18 @@ function module:GetFriendShipColorText(friendshipFactionID, standing)
968969
[5] = colors[7], -- Journeyman
969970
[6] = colors[8], -- Expert
970971
}
971-
elseif friendshipFactionID == 2517 or friendshipFactionID == 2518 then -- Wrathion/Sabellian TO-DO: Confirm colors
972-
friendshipColors = {
973-
[1] = colors[4], -- Acquaintance
974-
[2] = colors[4], -- Cohort
975-
[3] = colors[5], -- Ally
976-
[4] = colors[6], -- Fang
977-
[5] = colors[7], -- Friend
978-
[6] = colors[8], -- True Friend
979-
[9] = colors[9], -- Paragon
980-
}
981-
elseif friendshipFactionID == 2544 or friendshipFactionID == 2568 or friendshipFactionID == 2553 or friendshipFactionID == 2550 or friendshipFactionID == 2615 then -- Artisan's Consortium - Dragon Isles Branch / Glimmerogg Racer / Soridormi / Cobalt Assembly / Azerothian Archives
982-
friendshipColors = {
983-
[1] = colors[4], -- Neutral -- Aspirational -- Anomaly -- Empty -- Junior
984-
[2] = colors[5], -- Preferred -- Amateur -- Future Friend -- Low -- Capable
985-
[3] = colors[6], -- Respected -- Competent -- Rift Mender -- Medium -- Learned
986-
[4] = colors[7], -- Valued -- Skilled -- Timewalker -- High -- Resident
987-
[5] = colors[8], -- Esteemed -- Professional -- Legend of the Multiverse -- Maximum -- Tenured
988-
}
972+
elseif friendshipFactionID == 2640 or friendshipFactionID == 2605 or friendshipFactionID == 2607 or friendshipFactionID == 2601 or friendshipFactionID == 2517 or friendshipFactionID == 2518 or friendshipFactionID == 2544 or friendshipFactionID == 2568 or friendshipFactionID == 2553 or friendshipFactionID == 2550 or friendshipFactionID == 2615 then
973+
-- Brann Bronzebeard
974+
-- The General / The Vizier / The Weaver
975+
-- Wrathion/Sabellian
976+
-- Artisan's Consortium - Dragon Isles Branch / Glimmerogg Racer / Soridormi / Cobalt Assembly / Azerothian Archives
977+
-- Always friendly green
978+
return string.format('|cff%02x%02x%02x%s|r',
979+
colors[5].r * 255,
980+
colors[5].g * 255,
981+
colors[5].b * 255,
982+
standing
983+
), colors[5];
989984
end
990985

991986
if friendshipColors[standingLevel] == nil then

0 commit comments

Comments
 (0)