Short format on regen dt now also shorens the value (cause fuck those 7 digit values)
Darthpred [09-16-16 - 15:53]
Short format on regen dt now also shorens the value (cause fuck those 7 digit values)
diff --git a/ElvUI_SLE/modules/sledatatexts/regen.lua b/ElvUI_SLE/modules/sledatatexts/regen.lua
index 87f803b..0c03627 100644
--- a/ElvUI_SLE/modules/sledatatexts/regen.lua
+++ b/ElvUI_SLE/modules/sledatatexts/regen.lua
@@ -2,15 +2,16 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local DT = E:GetModule('DataTexts')
local MANA_REGEN = MANA_REGEN
local displayNumberString = ''
+local displayNumberStringShort = ''
local lastPanel;
local GetManaRegen = GetManaRegen
local function OnEvent(self, event, unit)
local baseMR, castingMR = GetManaRegen()
if T.InCombatLockdown() then
- self.text:SetFormattedText(displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, castingMR*5)
+ self.text:SetFormattedText(E.db.sle.dt.regen.short and displayNumberStringShort or displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, E.db.sle.dt.regen.short and E:ShortValue(castingMR*5) or castingMR*5)
else
- self.text:SetFormattedText(displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, baseMR*5)
+ self.text:SetFormattedText(E.db.sle.dt.regen.short and displayNumberStringShort or displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, E.db.sle.dt.regen.short and E:ShortValue(baseMR*5) or baseMR*5)
end
lastPanel = self
@@ -18,6 +19,7 @@ end
local function ValueColorUpdate(hex, r, g, b)
displayNumberString = T.join("", "%s: ", hex, "%.2f|r")
+ displayNumberStringShort = T.join("", "%s: ", hex, "%s|r")
if lastPanel ~= nil then
OnEvent(lastPanel)