mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update #26
This commit is contained in:
@@ -10,10 +10,17 @@ local upper = string.upper
|
|||||||
local GetWhoInfo = GetWhoInfo
|
local GetWhoInfo = GetWhoInfo
|
||||||
local GetGuildRosterInfo = GetGuildRosterInfo
|
local GetGuildRosterInfo = GetGuildRosterInfo
|
||||||
local GUILDMEMBERS_TO_DISPLAY = GUILDMEMBERS_TO_DISPLAY
|
local GUILDMEMBERS_TO_DISPLAY = GUILDMEMBERS_TO_DISPLAY
|
||||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
|
||||||
local CUSTOM_CLASS_COLORS = CUSTOM_CLASS_COLORS
|
|
||||||
local hooksecurefunc = hooksecurefunc
|
local hooksecurefunc = hooksecurefunc
|
||||||
|
|
||||||
|
local localizedTable = {}
|
||||||
|
for k, v in pairs(LOCALIZED_CLASS_NAMES_MALE) do
|
||||||
|
localizedTable[v] = k
|
||||||
|
end
|
||||||
|
|
||||||
|
for k, v in pairs(LOCALIZED_CLASS_NAMES_FEMALE) do
|
||||||
|
localizedTable[v] = k
|
||||||
|
end
|
||||||
|
|
||||||
function LoadSkin()
|
function LoadSkin()
|
||||||
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.friends ~= true then return end
|
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.friends ~= true then return end
|
||||||
|
|
||||||
@@ -153,22 +160,17 @@ function LoadSkin()
|
|||||||
local button = _G["WhoFrameButton"..i]
|
local button = _G["WhoFrameButton"..i]
|
||||||
local nameText = _G["WhoFrameButton"..i.."Name"]
|
local nameText = _G["WhoFrameButton"..i.."Name"]
|
||||||
local levelText = _G["WhoFrameButton"..i.."Level"]
|
local levelText = _G["WhoFrameButton"..i.."Level"]
|
||||||
local classText = _G["WhoFrameButton"..i.."Class"]
|
|
||||||
local variableText = _G["WhoFrameButton"..i.."Variable"]
|
local variableText = _G["WhoFrameButton"..i.."Variable"]
|
||||||
|
|
||||||
local _, guild, level, race, class, zone = GetWhoInfo(index)
|
local _, guild, _, race, class, zone = GetWhoInfo(index)
|
||||||
if class == UNKNOWN then return end
|
|
||||||
|
|
||||||
if class then
|
local classFileName = localizedTable[class]
|
||||||
class = strupper(class)
|
if classFileName then
|
||||||
end
|
local classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[classFileName] or RAID_CLASS_COLORS[classFileName]
|
||||||
|
local levelTextColor = GetQuestDifficultyColor(level)
|
||||||
|
|
||||||
local classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
|
|
||||||
local levelTextColor = GetQuestDifficultyColor(level)
|
|
||||||
|
|
||||||
if class then
|
|
||||||
button.icon:Show()
|
button.icon:Show()
|
||||||
button.icon:SetTexCoord(unpack(CLASS_ICON_TCOORDS[class]))
|
button.icon:SetTexCoord(unpack(CLASS_ICON_TCOORDS[classFileName]))
|
||||||
|
|
||||||
nameText:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
nameText:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
||||||
levelText:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b)
|
levelText:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b)
|
||||||
@@ -233,42 +235,37 @@ function LoadSkin()
|
|||||||
end
|
end
|
||||||
|
|
||||||
hooksecurefunc("GuildStatus_Update", function()
|
hooksecurefunc("GuildStatus_Update", function()
|
||||||
|
local _, level, class, online, classFileName
|
||||||
|
local levelTextColor, classTextColor
|
||||||
|
local button, buttonText
|
||||||
|
|
||||||
if FriendsFrame.playerStatusFrame then
|
if FriendsFrame.playerStatusFrame then
|
||||||
for i = 1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
for i = 1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
||||||
local button = _G["GuildFrameButton"..i]
|
button = _G["GuildFrameButton"..i]
|
||||||
local _, _, _, level, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex)
|
_, _, _, level, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex)
|
||||||
if class == UNKNOWN then return end
|
|
||||||
|
classFileName = localizedTable[class]
|
||||||
if class then
|
if classFileName then
|
||||||
class = upper(class)
|
|
||||||
end
|
|
||||||
|
|
||||||
if class then
|
|
||||||
if online then
|
if online then
|
||||||
classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
|
classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[classFileName] or RAID_CLASS_COLORS[classFileName]
|
||||||
levelTextColor = GetQuestDifficultyColor(level)
|
levelTextColor = GetQuestDifficultyColor(level)
|
||||||
buttonText = _G["GuildFrameButton"..i.."Name"]
|
buttonText = _G["GuildFrameButton"..i.."Name"]
|
||||||
buttonText:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
buttonText:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
||||||
buttonText = _G["GuildFrameButton"..i.."Level"]
|
buttonText = _G["GuildFrameButton"..i.."Level"]
|
||||||
buttonText:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b)
|
buttonText:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b)
|
||||||
end
|
end
|
||||||
button.icon:SetTexCoord(unpack(CLASS_ICON_TCOORDS[class]))
|
button.icon:SetTexCoord(unpack(CLASS_ICON_TCOORDS[classFileName]))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local classFileName
|
|
||||||
for i = 1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
for i = 1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
||||||
button = _G["GuildFrameGuildStatusButton"..i]
|
button = _G["GuildFrameGuildStatusButton"..i]
|
||||||
_, _, _, _, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex)
|
_, _, _, _, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex)
|
||||||
if class == UNKNOWN then return end
|
|
||||||
|
|
||||||
if class then
|
classFileName = localizedTable[class]
|
||||||
class = upper(class)
|
if classFileName then
|
||||||
end
|
|
||||||
|
|
||||||
if class then
|
|
||||||
if online then
|
if online then
|
||||||
classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
|
classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[classFileName] or RAID_CLASS_COLORS[classFileName]
|
||||||
_G["GuildFrameGuildStatusButton"..i.."Name"]:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
_G["GuildFrameGuildStatusButton"..i.."Name"]:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
||||||
_G["GuildFrameGuildStatusButton"..i.."Online"]:SetTextColor(1.0, 1.0, 1.0)
|
_G["GuildFrameGuildStatusButton"..i.."Online"]:SetTextColor(1.0, 1.0, 1.0)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user