배틀리
2020-01-27 21:11
조회: 3,483
추천: 1
클래식 미러바 타이머 (피로,호흡,죽척)-- ■■ 미러바 시간 표시 local function SecondsToClock(seconds) local sec = tonumber(seconds) if (sec <= 0) then return "00:00"; else local mins = format("%02.f", math.floor(sec / 60)); local secs = format("%02.f", math.floor(sec - mins * 60)); return "|cffffff00"..mins..":"..secs; end end MirrorTimer1.Timer = MirrorTimer1:CreateFontString(nil, "OVERLAY", "GameFontHighlight") MirrorTimer1.Timer:SetFont(STANDARD_TEXT_FONT, 13, "OUTLINE") MirrorTimer1.Timer:SetPoint("LEFT", MirrorTimer1, "LEFT", 8, 7) MirrorTimer1.Timer.maxValue = MirrorTimer1:CreateFontString(nil, "OVERLAY", "GameFontHighlight") MirrorTimer1.Timer.maxValue:SetFont(STANDARD_TEXT_FONT, 13, "OUTLINE") MirrorTimer1.Timer.maxValue:SetPoint("RIGHT", MirrorTimer1, "RIGHT", -3, 7) MirrorTimer1.maxValue = 0; local function MirrorTimer1_OnUpdate_Hook(self, elapsed) if (not self.Timer) then return end if (self.value and self.value < self.maxValue/1000) then self.Timer:SetText(SecondsToClock(self.value)) self.Timer.maxValue:SetText(SecondsToClock(self.maxValue / 1000)) else self.Timer:SetText("") self.Timer.maxValue:SetText("") end end MirrorTimer1:HookScript("OnUpdate", MirrorTimer1_OnUpdate_Hook) -- ■■ 미러바 이동 (1피로, 2호흡, 3죽척) hooksecurefunc("MirrorTimer_Show", function(timer, value, maxvalue, ...) for index = 1, MIRRORTIMER_NUMTIMERS do local frame = _G["MirrorTimer"..index]; if (frame:IsShown()) then frame:ClearAllPoints() frame:SetPoint("CENTER", UIParent, 0, 300) end end MirrorTimer1.maxValue = maxvalue;-- 미러바 맥스 밸류 end) |
인벤 공식 앱
댓글 알람 기능 장착! 최신 게임뉴스를 한 눈에 보자