Durability Status as a Data Text in TUKUI v20.20?

hi again
In case anyone has the same question, have Just found that the Durability info is now shown under the Character Data text.
However would still be awesome to have it shown as a seperate datatext imo, as it did in previous versions of TukUI :)

Durability Status as a Data Text in TUKUI v20.20?

If you have an external edit addon you could drop this into it to have the character datatext show durability instead name on the bar while everything else in the tooltip remains.

Code: Select all

-- make character datatext show durability by default
T.DataTexts:GetDataText("Character"):HookScript("OnUpdate", function(self)
	local durability = floor(L.DataText.Slots[1][3] * 100)
	local r, g, b = T.ColorGradient(durability, 100, 0.8, 0, 0, 0.8, 0.8, 0, 0, 0.8, 0)
	self.Text:SetFormattedText("Durability: |cff%02x%02x%02x%s%%|r", r * 255, g * 255, b * 255, durability)