end
end
NamePlateDriverFrame:HookScript("OnEvent",fn)
■ 툴팁 표시 마우스 포인트로(네모 칸)위치
function GameTooltip_SetDefaultAnchor(tooltip, parent, ...)
tooltip:SetScale(1)
tooltip:SetOwner(parent, "ANCHOR_CURSOR_RIGHT", 25, -70) -- (X위치 값, Y위치 값)
end
■ 툴팁 표시(네모 칸)위치 고정
function GameTooltip_SetDefaultAnchor(tooltip, parent, ...)
tooltip:SetScale(1)
tooltip:SetOwner(UIParent, "ANCHOR_BottomRight", 0, 0) -- (X위치 값, Y위치 값)
end
■ 전투 중 툴팁 표시(네모 칸)숨김
GameTooltip:HookScript("OnShow", function(self)
if InCombatLockdown() then
self:Hide()
end
end)
■ 전투 중 미니맵 / 퀘스트 추적 창 / 채팅 창 숨김
do
local frame, events = CreateFrame("Frame"), {};
function events:PLAYER_REGEN_DISABLED(...)
hide_world(self, ...)
end
function events:PLAYER_REGEN_ENABLED(...)
show_world(self, ...)
end
frame:SetScript("OnEvent", function(self, event, ...)
events[event](self, ...);
end);
for k, v in pairs(events) do
frame:RegisterEvent(k);
end
end
function hide_world(self, ...)
MinimapCluster:Hide();
ObjectiveTrackerFrame:Hide()
GeneralDockManager:Hide()
ChatFrameMenuButton:Hide()
ChatFrame1ButtonFrame:Hide()
ChatFrame2ButtonFrame:Hide()
ChatFrame3ButtonFrame:Hide()
ChatFrame4ButtonFrame:Hide()
ChatFrame6ButtonFrame:Hide()
ChatFrame1:Hide()
ChatFrame2:Hide()
ChatFrame3:Hide()
ChatFrame4:Hide()
ChatFrame5:Hide()
QuickJoinToastButton:Hide()
end
function show_world(self, ...)
MinimapCluster:Show();
ObjectiveTrackerFrame:Show()
GeneralDockManager:Show()
ChatFrameMenuButton:Show()
ChatFrame1ButtonFrame:Show()
ChatFrame1:Show()
QuickJoinToastButton:Show()
end
■ 유닛 프레임의 이름색깔을 모두 하얀색으로 표시
for i, f in pairs({TargetFrame, PlayerFrame, FocusFrame}) do f.name:SetVertexColor(1,10,10)end
■ 캐릭터 하단 자원표시 체력=%, 자원=최대값/현재값 표시
healthNumbers = nil
powerNumbers = nil
function round(num, idp)
return tonumber(string.format("%." .. (idp or 0) .. "f", num))
end
function formatPlayerNumbers(amount)
local formatted = amount
while true do
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
if (k==0) then
break
end
end
if string.len(formatted) >= 7 and string.len(formatted) < 11 then
formatted = string.sub(formatted, 0, (string.len(formatted) - 4)) .. "k"
elseif string.len(formatted) >= 11 then
formatted = string.sub(formatted, 0, (string.len(formatted) - 8)) .. "m"
end
return formatted
end
hooksecurefunc("CompactUnitFrame_OnUpdate", function(frame)
if frame.optionTable.colorNameBySelection then
if InterfaceOptionsNamesPanelUnitNameplatesMakeLarger:GetValue() == "0" or "1"then
local healthPercentage = round((UnitHealth("player") / UnitHealthMax("player") * 100), 0)
local powerPercentage = round((UnitPower("player") / UnitPowerMax("player") * 100), 0)
if healthNumbers == nil and UnitGUID(frame.unit) == UnitGUID("player") then
healthNumbers = CreateFrame("Frame", nil, C_NamePlate.GetNamePlateForUnit("player"))
healthNumbers:SetSize(170,16)
healthNumbers.text = healthNumbers.text or healthNumbers:CreateFontString(nil, "OVERLAY", "QuestFont_Shadow_Huge")
healthNumbers.text:SetAllPoints(true)
healthNumbers:SetFrameStrata("HIGH")
healthNumbers:SetPoint("CENTER", C_NamePlate.GetNamePlateForUnit("player").UnitFrame.healthBar)
healthNumbers.text:SetFont(STANDARD_TEXT_FONT , 12, "OUTLINE")
healthNumbers.text:SetVertexColor(1, 1, 1)
elseif healthNumbers ~= nil then
if C_NamePlate.GetNamePlateForUnit("player") ~= nil then
healthNumbers:SetParent(C_NamePlate.GetNamePlateForUnit("player"))
healthNumbers:SetPoint("CENTER", C_NamePlate.GetNamePlateForUnit("player").UnitFrame.healthBar)
end
if healthNumbers:GetParent() ~= C_NamePlate.GetNamePlateForUnit("player") then
healthNumbers:Hide()
else
healthNumbers:Show()
end
healthNumbers.text:SetText(healthPercentage .. "%")
end
if powerNumbers == nil and UnitGUID(frame.unit) == UnitGUID("player") then
powerNumbers = CreateFrame("Frame", nil, NamePlatePlayerResourceFrame)
powerNumbers:SetSize(170,16)
powerNumbers.text = powerNumbers.text or powerNumbers:CreateFontString(nil, "OVERLAY", "QuestFont_Shadow_Huge")
powerNumbers.text:SetAllPoints(true)
powerNumbers:SetFrameStrata("HIGH")
powerNumbers:SetPoint("CENTER", ClassNameplateManaBarFrame)
powerNumbers.text:SetFont(STANDARD_TEXT_FONT , 12, "OUTLINE")
powerNumbers.text:SetVertexColor(1, 1, 1)
elseif powerNumbers ~= nil then
powerNumbers.text:SetText(formatPlayerNumbers(UnitPower("player")) .. "/" .. formatPlayerNumbers(UnitPowerMax("player")))
end
end
end
end)
■ 채팅 창 각종 설정 버튼을 숨김
QuickJoinToastButton:SetAlpha(0)
ChatFrameMenuButton:SetAlpha(0)
ChatFrame1ButtonFrame:SetAlpha(0)
ChatFrame2ButtonFrame:SetAlpha(0)
ChatFrame3ButtonFrame:SetAlpha(0)
ChatFrame4ButtonFrame:SetAlpha(0)
ChatFrame5ButtonFrame:SetAlpha(0)
■ 채팅 창 화면 밖으로 이동 가능
ChatFrame1:SetClampedToScreen(nil)
ChatFrame2:SetClampedToScreen(nil)
ChatFrame3:SetClampedToScreen(nil)
ChatFrame4:SetClampedToScreen(nil)
ChatFrame5:SetClampedToScreen(nil)
■ 각종 숫자의 , 콤마 표시를 숨김(데미지, 골드보유량 등)
LARGE_NUMBER_SEPERATOR = ""
■ 초상화(얼굴)의 데미지량 과 치유량 표시 숨김
PlayerHitIndicator:SetText(nil)
PlayerHitIndicator.SetText = function() end
PetHitIndicator:SetText(nil)
PetHitIndicator.SetText = function() end
■ 유닛프레임 크기 조정
PlayerFrame:SetScale(1.1) -- 나 -- SetScale (기본 값 1 크기 수정)
TargetFrame:SetScale(1.1) -- 너
FocusFrame:SetScale(1.1) -- 주시
PetFrame:SetScale(1.1) -- 소환수
PartyMemberFrame1:SetScale(1.1) -- 파티 맴버 1
PartyMemberFrame2:SetScale(1.1) -- 파티 맴버 2
PartyMemberFrame3:SetScale(1.1) -- 파티 맴버 3
PartyMemberFrame4:SetScale(1.1) -- 파티 맴버 4
Boss1TargetFrame:SetScale(1.1) -- 보스 1
Boss2TargetFrame:SetScale(1.1) -- 보스 2
Boss3TargetFrame:SetScale(1.1) -- 보스 3
ArenaEnemyFrame1:SetScale(1.1) -- 투기장 적
ArenaEnemyFrame2:SetScale(1.1) -- 투기장 적
ArenaEnemyFrame3:SetScale(1.1) -- 투기장 적
■ 플레이어 / 대상 / 주시 시전 바 크기 및 위치 조정
CastingBarFrame:ClearAllPoints() -- 플레이어
CastingBarFrame:SetScale(1.0) -- SetScale (기본 값 1 크기 수정)
CastingBarFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -250) -- ("CENTER", X위치 값, Y위치 값)
CastingBarFrame.SetPoint = function() end
TargetFrameSpellBar:ClearAllPoints() -- 대상
TargetFrameSpellBar:SetScale(1.0)
TargetFrameSpellBar:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
TargetFrameSpellBar.SetPoint = function() end
FocusFrameSpellBar:ClearAllPoints() -- 주시
FocusFrameSpellBar:SetScale(1.0)
FocusFrameSpellBar:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
FocusFrameSpellBar.SetPoint = function() end
■ 플레이어 / 대상 / 주시 시전바의 시전 시간 표시
- 배틀리 - 님 공유 (추가 보완)
CastingBarFrame.timer = CastingBarFrame:CreateFontString(nil); -- 플레이어
CastingBarFrame.timer:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
CastingBarFrame.timer:SetPoint("LEFT", CastingBarFrame, "LEFT", 3, 3);
CastingBarFrame.timer.maxValue = CastingBarFrame:CreateFontString(nil);
CastingBarFrame.timer.maxValue:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
CastingBarFrame.timer.maxValue:SetPoint("RIGHT", CastingBarFrame, "RIGHT", -1, 3);
TargetFrameSpellBar.timer = TargetFrameSpellBar:CreateFontString(nil); -- 대상
TargetFrameSpellBar.timer:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
TargetFrameSpellBar.timer:SetPoint("LEFT", TargetFrameSpellBar, "LEFT", 3, 0);
TargetFrameSpellBar.timer.maxValue = TargetFrameSpellBar:CreateFontString(nil);
TargetFrameSpellBar.timer.maxValue:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
TargetFrameSpellBar.timer.maxValue:SetPoint("RIGHT", TargetFrameSpellBar, "RIGHT", -1, 0);
FocusFrameSpellBar.timer = FocusFrameSpellBar:CreateFontString(nil); -- 주시
FocusFrameSpellBar.timer:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
FocusFrameSpellBar.timer:SetPoint("LEFT", FocusFrameSpellBar, "LEFT", 3, 0);
FocusFrameSpellBar.timer.maxValue = FocusFrameSpellBar:CreateFontString(nil);
FocusFrameSpellBar.timer.maxValue:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
FocusFrameSpellBar.timer.maxValue:SetPoint("RIGHT", FocusFrameSpellBar, "RIGHT", -1, 0);
CastingBarFrame.update = .1;
TargetFrameSpellBar.update = .1;
FocusFrameSpellBar.update = .1;
CastingBarFrame.Icon:Show()
CastingBarFrame.Icon:SetSize(19, 19)
CastingBarFrame.Border:SetTexture("Interface/CastingBar/UI-CastingBar-Border-Small")
CastingBarFrame.Flash:SetTexture("Interface/CastingBar/UI-CastingBar-Flash-Small")
local function CastingBarFrame_OnUpdate_Hook(self, elapsed)
if not self.timer then return end
if self.update and self.update < elapsed then
if self.casting then
self.timer:SetText(format("|cffffff00%1.1f", max(self.maxValue - self.value, 0)))
if self.timer.maxValue then self.timer.maxValue:SetText(format("|cffffff00%1.1f", self.maxValue)) end
elseif self.channeling then
self.timer:SetText(format("|cffffff00%.1f", max(self.value, 0)))
else
self.timer:SetText("")
if self.timer.maxValue then self.timer.maxValue:SetText("") end
end
self.update = .1
else
self.update = self.update - elapsed
end
end
CastingBarFrame:HookScript("OnUpdate", CastingBarFrame_OnUpdate_Hook)
TargetFrameSpellBar:HookScript("OnUpdate", CastingBarFrame_OnUpdate_Hook)
FocusFrameSpellBar:HookScript("OnUpdate", CastingBarFrame_OnUpdate_Hook)
- 불필요한 부분 삭제 하는 방법
플레이어 / 대상 / 주시 시전 남은 시간 3줄 삭제 후 저장
CastingBarFrame.timer = CastingBarFrame:CreateFontString(nil);
CastingBarFrame.timer:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
CastingBarFrame.timer:SetPoint("LEFT", CastingBarFrame, "LEFT", 3, 3);
플레이어 / 대상 / 주시 시전 총 시간 3줄 삭제 후 저장
CastingBarFrame.timer.maxValue = CastingBarFrame:CreateFontString(nil);
CastingBarFrame.timer.maxValue:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
CastingBarFrame.timer.maxValue:SetPoint("RIGHT", CastingBarFrame, "RIGHT", -1, 3);
-- 플레이어 시전 바 왼쪽 스킬 아이콘 미사용 및 오류로 인한 삭제 방법
해당 부분 총 4줄 스크립트를 삭제 후 저장
CastingBarFrame.Icon:Show()
CastingBarFrame.Icon:SetSize(19, 19)
CastingBarFrame.Border:SetTexture("Interface/CastingBar/UI-CastingBar-Border-Small")
CastingBarFrame.Flash:SetTexture("Interface/CastingBar/UI-CastingBar-Flash-Small")
■ 채팅 창 글들의 채널명을 숨기고 해당 채널 숫자만 표시
- Sinsun - 님 공유
local gsub = _G.string.gsub
for i = 1, NUM_CHAT_WINDOWS do
if ( i ~= 2 ) then
local f = _G["ChatFrame"..i]
local am = f.AddMessage
f.AddMessage = function(frame, text, ...)
return am(frame, text:gsub('|h%[(%d+)%. .-%]|h', '|h[%1]|h'), ...)
end
end
end
■ 화면 시야 최대로 확장
- 토륨주괴 - 님 공유
local CZ = CreateFrame("FRAME")
CZ:RegisterEvent("PLAYER_ENTERING_WORLD")
CZ:SetScript("OnEvent", function()
SetCVar("cameraDistanceMaxZoomFactor", 2.6)
CZ:UnregisterEvent("PLAYER_ENTERING_WORLD")
end)