이름표 관련해서 수정한 걸 공유합니다. 문제점이 있다면 댓글로 적어주세요.
아래 내용이 들어간 파일을 첨부하니 쓰실 분은 애드온 폴더에 압축 해제 하시면 됩니다.

던전 안에서 아군 이름표는 군단부터 수정이 안됩니다.


-- ■■  이름표 생명력바 & 시전바 크기 조정
hooksecurefunc("DefaultCompactNamePlateFrameSetup", function(frame)
if (frame:IsForbidden()) then return end
frame.healthBar:SetHeight(frame.healthBar:GetHeight() + 2)
frame.castBar:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 0, 0);
frame.castBar:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 0, 0);
frame.castBar:SetScale(1.5)
end)

-- ■■  이름표 이름 직업 색상
hooksecurefunc("CompactUnitFrame_UpdateName",function(frame)
if (UnitIsUnit("player", frame.unit) or frame:IsForbidden() or not strfind(frame.unit, "nameplate")) then return end;
local font, size = GameFontNormalSmall:GetFont()
if (UnitIsFriend("player", frame.unit) and UnitIsPlayer(frame.unit)) then
local cc = RAID_CLASS_COLORS[select(2, UnitClass(frame.unit))]
frame.name:SetVertexColor(cc.r, cc.g, cc.b)
frame.name:ClearAllPoints()
frame.name:SetPoint("CENTER",frame.healthBar,0,-3)
frame.name:SetFont(font, size+1.5, "THICKOUTLINE")
frame.healthBar:Hide()
--CastingBarFrame_SetUnit(frame.castBar, nil, nil, nil)
frame.name:Show()
if (not frame.guild) then -- 길드명 ↓
frame.guild = frame:CreateFontString(nil,"OVERLAY")
frame.guild:SetPoint("TOP",frame.name,"BOTTOM")
frame.guild:SetFont(STANDARD_TEXT_FONT,12,"THICKOUTLINE")
end
frame.guild:SetText(GetGuildInfo(frame.unit) or "")
frame.guild:Show() -- 길드명 ↑
else
frame.name:ClearAllPoints()
frame.name:SetPoint("CENTER",frame.healthBar,0,12)
frame.name:SetFont(font, size+1, "MONOCHROME")
frame.name:Show()
if (frame.guild) then frame.guild:Hide() end
end
end)

-- ■■  이름표 생명력 % 추가
hooksecurefunc("CompactUnitFrame_OnUpdate", function(frame)
if (frame.optionTable.colorNameBySelection and not frame:IsForbidden()) then
frame:SetScale((UnitGUID(frame.displayedUnit) == UnitGUID("target")) and 1.35 or 1)
if (not frame.healthBar.percent) then
frame.healthBar.percent = frame.healthBar:CreateFontString(nil,"OVERLAY")
frame.healthBar.percent:SetPoint("TOP",frame.healthBar,0,2)
frame.healthBar.percent:SetFont(STANDARD_TEXT_FONT,8,"THICKOUTLINE")
end
local percentcalc = ceil((UnitHealth(frame.displayedUnit) / UnitHealthMax(frame.displayedUnit)) * 100)
if (UnitGUID(frame.displayedUnit) == UnitGUID("player")) then
frame.healthBar.percent:SetFormattedText("%d%%n124cff55ffff%d",percentcalc,UnitPower(frame.displayedUnit))
else
frame.healthBar.percent:SetFormattedText("%d%%",percentcalc)
end
frame.healthBar.border:SetScale((UnitGUID(frame.displayedUnit) == UnitGUID("target")) and 2 or 1)
if (UnitGUID(frame.displayedUnit) == UnitGUID("target")) then
frame.healthBar.border:SetVertexColor(1,1,.7,1)
end
end
end)

-- ■■  이름표 개인자원 생명력에 따른 바 색상
hooksecurefunc("CompactUnitFrame_UpdateHealth", function(frame)
if (frame.optionTable.colorNameBySelection and not frame:IsForbidden()) then
local percentcalc = ceil((UnitHealth(frame.displayedUnit) / UnitHealthMax(frame.displayedUnit) * 100))
if C_NamePlate.GetNamePlateForUnit(frame.unit) == C_NamePlate.GetNamePlateForUnit("player") then
frame.healthBar:SetStatusBarColor((100 - percentcalc) / 100, percentcalc / 100, 0)
end
end
end)

-- ■■  이름표 디버프 크기, 위치, 중첩, 쿨다운 조정
NamePlateDriverFrame:HookScript("OnEvent", function()
for _,v in pairs(C_NamePlate.GetNamePlates()) do
local bf = v.UnitFrame.BuffFrame
bf:SetScale(1.2)-- SetScale(기본 값 1 크기 수정)
bf.baseYOffset = -5-- 디버프 위치 아래로 조정
bf:UpdateAnchor()
for i = 1, BUFF_MAX_DISPLAY do
local buff = bf.buffList[i]
if (buff) then
buff.Cooldown:SetHideCountdownNumbers(false);
buff.Cooldown:SetScale(.7)
buff.CountFrame.Count:ClearAllPoints()
buff.CountFrame.Count:SetPoint("BOTTOM",buff,"TOP")
buff.CountFrame.Count:SetVertexColor(1,1,0,1)
end
end
end
end)