확장팩 팁과 노하우 게시판

전체보기

모바일 상단 메뉴

본문 페이지

[매크로] 기본 유닛프레임 생명력바에 직업 색상 추가하기

아이콘 날아라몬스터
댓글: 16 개
조회: 23335
추천: 9
2018-07-21 17:33:25

기존 매크로를 아무 애드온 lua파일에 붙여쓰시던분들중에 소격아 되고나서부터 저처럼 안되는 분들도 계신거같아서

애드온을 추가로 설치하기 싫으시고


기본 유닛프레임에 생명력바에만 직업색상 넣으시려는 분들은


아무거나 소격아버전 애드온 폴더 들어가셔서 lua파일 메모장으로 여신다음

맨밑에 요 문자열만 복사후 붙여넣기 해주시면 됩니다.





local UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS =
UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS
local _, class, c
 
local function colour(statusbar, unit)
if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
_, class = UnitClass(unit)
c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
statusbar:SetStatusBarColor(c.r, c.g, c.b)
end
end
 
hooksecurefunc("UnitFrameHealthBar_Update", colour)
hooksecurefunc("HealthBar_OnValueChanged", function(self)
colour(self, self.unit)
end)
 
local sb = _G.GameTooltipStatusBar
local addon = CreateFrame("Frame", "StatusColour")
addon:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
addon:SetScript("OnEvent", function()
colour(sb, "mouseover")
end)







위이미지는 예시입니다.

Lv77 날아라몬스터

모바일 게시판 하단버튼

댓글

새로고침
새로고침

모바일 게시판 하단버튼

지금 뜨는 인벤

더보기+

모바일 게시판 리스트

모바일 게시판 하단버튼

글쓰기

모바일 게시판 페이징

최근 HOT한 콘텐츠

  • 와우
  • 게임
  • IT
  • 유머
  • 연예
AD