Skip to content

Commit

Permalink
Fix rep returning a nil value
Browse files Browse the repository at this point in the history
  • Loading branch information
Kkthnx committed Dec 17, 2022
1 parent f13dff9 commit 2c219ba
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 252 deletions.
13 changes: 13 additions & 0 deletions KkthnxUI/Core/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,17 @@ oUF.colors.class = {
["UNKNOWN"] = { 0.76, 0.79, 0.85 },
}

oUF.colors.faction = {
{ r = 0.8, g = 0.3, b = 0.22 }, -- 1
{ r = 0.8, g = 0.3, b = 0.22 }, -- 2
{ r = 0.75, g = 0.27, b = 0 }, -- 3
{ r = 0.9, g = 0.7, b = 0 }, -- 4
{ r = 0, g = 0.6, b = 0.1 }, -- 5
{ r = 0, g = 0.6, b = 0.1 }, -- 6
{ r = 0, g = 0.6, b = 0.1 }, -- 7
{ r = 0, g = 0.6, b = 0.1 }, -- 8
{ r = 0, g = 0.6, b = 0.1 }, -- 9 (Paragon)
{ r = 0, g = 0.74, b = 0.95 }, -- 10 (Renown)
}

K["Colors"] = oUF.colors
158 changes: 0 additions & 158 deletions KkthnxUI/Modules/ActionBars/Elements/MicroMenu copy.lua

This file was deleted.

80 changes: 0 additions & 80 deletions KkthnxUI/Modules/DataText/Elements/Covenants.lua

This file was deleted.

1 change: 0 additions & 1 deletion KkthnxUI/Modules/Load_Modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!-- DataText -->
<Script file="DataText\Core.lua" />
<Script file="DataText\Elements\Coords.lua" />
<Script file="DataText\Elements\Covenants.lua" />
<Script file="DataText\Elements\Durability.lua" />
<Script file="DataText\Elements\Friends.lua" />
<Script file="DataText\Elements\Gold.lua" />
Expand Down
3 changes: 1 addition & 2 deletions KkthnxUI/Modules/Miscellaneous/Elements/ExpRep.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ local C_AzeriteItem_FindActiveAzeriteItem = _G.C_AzeriteItem.FindActiveAzeriteIt
local C_AzeriteItem_GetAzeriteItemXPInfo = _G.C_AzeriteItem.GetAzeriteItemXPInfo
local C_AzeriteItem_GetPowerLevel = _G.C_AzeriteItem.GetPowerLevel
local C_AzeriteItem_IsAzeriteItemAtMaxLevel = _G.C_AzeriteItem.IsAzeriteItemAtMaxLevel
local FACTION_BAR_COLORS = _G.FACTION_BAR_COLORS
local GetFriendshipReputation = GetFriendshipReputation or C_GossipInfo.GetFriendshipReputation
local GetWatchedFactionInfo = _G.GetWatchedFactionInfo
local GetXPExhaustion = _G.GetXPExhaustion
Expand Down Expand Up @@ -137,7 +136,7 @@ function Module:ExpBar_Update(event, unit)
label = _G["FACTION_STANDING_LABEL" .. reaction] or UNKNOWN
end

local color = FACTION_BAR_COLORS[reaction] or reaction == 9 and FACTION_BAR_COLORS[9] or reaction == 10 and FACTION_BAR_COLORS[10]
local color = K.Colors.faction[reaction]
self:SetStatusBarColor(color.r or 1, color.g or 1, color.b or 1, 1)
self:SetMinMaxValues(minValue, maxValue)
self:SetValue(curValue)
Expand Down
11 changes: 0 additions & 11 deletions KkthnxUI/Modules/Skins/Blizzard/FrameXML/CharacterFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,6 @@ tinsert(C.defaultThemes, function()
CharacterStatsPane.ClassBackground:SetPoint("CENTER")
end

local function UpdateFactionSkins()
for i = 1, GetNumFactions() do
local statusbar = _G["ReputationBar" .. i .. "ReputationBar"]
if statusbar then
statusbar:SetStatusBarTexture(K.GetTexture(C["General"].Texture))
end
end
end
ReputationFrame:HookScript("OnShow", UpdateFactionSkins)
ReputationFrame:HookScript("OnEvent", UpdateFactionSkins)

local function updateReputationBars(self)
for i = 1, self.ScrollTarget:GetNumChildren() do
local child = select(i, self.ScrollTarget:GetChildren())
Expand Down

0 comments on commit 2c219ba

Please sign in to comment.