/Tukui/modules/datatext/mastery.lua
Lua | 25 lines | 17 code | 5 blank | 3 comment | 3 complexity | 9bab8df04891f923d71f7802ccdbf9f5 MD5 | raw file
- local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
- --------------------------------------------------------------------
- -- Mastery
- ----------------------------------------------------------------
- if not C["datatext"].mastery == nil or C["datatext"].mastery > 0 then
- local Stat = CreateFrame("Frame")
- local Text = TukuiInfoLeft:CreateFontString(nil, "OVERLAY")
- Text:SetFont(C.media.pixelfont, C["datatext"].fontsize, "MONOCHROMEOUTLINE")
- T.PP(C["datatext"].mastery, Text)
- local int = 1
-
- local function Update(self, t)
- int = int - t
- if int < 0 then
- Text:SetText("Mastery: "..T.datacolor..GetCombatRating(26))
- int = 1
- end
- end
- Stat:SetScript("OnUpdate", Update)
- Update(Stat, 10)
- end