Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function combustion.OnUpdate()
- local amount = GetCombustionTotal()
- if combustionConfig.combatHide and amount == 0 and not UnitAffectingCombat("player") then
- combustion.frame:Hide()
- combatHidden = true
- else
- if amount >= turnGreenDps then
- combustion.FontString:SetFont(combustionConfig.font, combustionConfig.fontSize, "THICKOUTLINE")
- combustion.FontString:SetTextColor(0,1,0)
- elseif amount >= turnYellowDps then
- combustion.FontString:SetFont(combustionConfig.font, combustionConfig.fontSize, "OUTLINE")
- combustion.FontString:SetTextColor(1,1,0)
- else
- combustion.FontString:SetFont(combustionConfig.font, combustionConfig.fontSize, "OUTLINE")
- combustion.FontString:SetTextColor(1,0,0)
- end
- function format_thousand(v)
- local s = string.format("%d", math.floor(v))
- local pos = string.len(s) % 3
- if pos == 0 then pos = 3 end
- return string.sub(s, 1, pos)
- .. string.gsub(string.sub(s, pos+1), "(...)", ",%1")
- end
- combustion.FontString:SetText(format_thousand(amount))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement