Skip to content

Commit 2b2add0

Browse files
committed
Mark Alliance/Horde-only factions
1 parent 06aef16 commit 2b2add0

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

Icons/Alliance.tga

4.02 KB
Binary file not shown.

Icons/Horde.tga

4.02 KB
Binary file not shown.

RepHub.lua

+17-2
Original file line numberDiff line numberDiff line change
@@ -321,17 +321,32 @@ function RepHub:GetRepHubTableData()
321321
highestStandingCharacterNameTextColor = classesColor[self.db.global.characterClasses[highestStandingCharacterNameText]]
322322
end
323323

324+
local factionAdditionalInfo = RepHub:GetFactionAdditionalInfo(factionData.name)
325+
local factionNameText = factionData.name
326+
if factionAdditionalInfo then
327+
local sideIcon = ""
328+
if factionAdditionalInfo.side == "Alliance" then
329+
sideIcon = "Interface\\Addons\\RepHub\\Icons\\Alliance"
330+
elseif factionAdditionalInfo.side == "Horde" then
331+
sideIcon = "Interface\\Addons\\RepHub\\Icons\\Horde"
332+
end
333+
if sideIcon ~= "" then
334+
sideIcon = string.format("\124T%s:%d\124t", sideIcon, 15)
335+
factionNameText = sideIcon .. " " .. factionNameText
336+
end
337+
end
338+
324339
local currentGroupText = factionData.currentGroup
325340
local currentGroupIcon = groupsIcons[currentGroupText] or nil
326341

327342
if currentGroupIcon then
328-
local currentGroupIcon = string.format("\124T%s:%d\124t", currentGroupIcon, 25)
343+
currentGroupIcon = string.format("\124T%s:%d\124t", currentGroupIcon, 25)
329344
currentGroupText = currentGroupIcon .. " " .. currentGroupText
330345
end
331346

332347
table.insert(dataArr, {
333348
["cols"] = {
334-
{ ["value"] = factionData.name },
349+
{ ["value"] = factionNameText },
335350
{ ["value"] = currentGroupText },
336351
{ ["value"] = highestStandingText, ["color"] = highestStandingTextColor },
337352
{ ["value"] = highestStandingCharacterNameText, ["color"] = highestStandingCharacterNameTextColor },

0 commit comments

Comments
 (0)