Skip to content

Commit

Permalink
Mark Alliance/Horde-only factions
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoRogai committed Dec 4, 2024
1 parent 06aef16 commit 2b2add0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Binary file added Icons/Alliance.tga
Binary file not shown.
Binary file added Icons/Horde.tga
Binary file not shown.
19 changes: 17 additions & 2 deletions RepHub.lua
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,32 @@ function RepHub:GetRepHubTableData()
highestStandingCharacterNameTextColor = classesColor[self.db.global.characterClasses[highestStandingCharacterNameText]]
end

local factionAdditionalInfo = RepHub:GetFactionAdditionalInfo(factionData.name)
local factionNameText = factionData.name
if factionAdditionalInfo then
local sideIcon = ""
if factionAdditionalInfo.side == "Alliance" then
sideIcon = "Interface\\Addons\\RepHub\\Icons\\Alliance"
elseif factionAdditionalInfo.side == "Horde" then
sideIcon = "Interface\\Addons\\RepHub\\Icons\\Horde"
end
if sideIcon ~= "" then
sideIcon = string.format("\124T%s:%d\124t", sideIcon, 15)
factionNameText = sideIcon .. " " .. factionNameText
end
end

local currentGroupText = factionData.currentGroup
local currentGroupIcon = groupsIcons[currentGroupText] or nil

if currentGroupIcon then
local currentGroupIcon = string.format("\124T%s:%d\124t", currentGroupIcon, 25)
currentGroupIcon = string.format("\124T%s:%d\124t", currentGroupIcon, 25)
currentGroupText = currentGroupIcon .. " " .. currentGroupText
end

table.insert(dataArr, {
["cols"] = {
{ ["value"] = factionData.name },
{ ["value"] = factionNameText },
{ ["value"] = currentGroupText },
{ ["value"] = highestStandingText, ["color"] = highestStandingTextColor },
{ ["value"] = highestStandingCharacterNameText, ["color"] = highestStandingCharacterNameTextColor },
Expand Down

0 comments on commit 2b2add0

Please sign in to comment.