Add files via upload

This commit is contained in:
Dusk-92
2026-07-28 14:26:42 +02:00
committed by GitHub
commit d2ae117132
87 changed files with 36309 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
local _G = ShaguTweaks.GetGlobalEnv()
local T = ShaguTweaks.T
local GetUnitData = ShaguTweaks.GetUnitData
local module = ShaguTweaks:register({
title = T["Nameplate Class Colors"],
description = T["Changes the nameplate health bar color to the class color."],
expansions = { ["vanilla"] = true, ["tbc"] = true },
category = T["Nameplates"],
enabled = true,
})
module.enable = function(self)
if ShaguPlates then return end
table.insert(ShaguTweaks.libnameplate.OnUpdate, function()
local name = this.name:GetText()
local class, _, elite, player = GetUnitData(name, true)
if class and player then
local color = RAID_CLASS_COLORS[class] or { r = .5, g = .5, b = .5, a = 1 }
this.healthbar:SetStatusBarColor(color.r, color.g, color.b, 1)
end
end)
end