From f75201172f76c6538be9b1b9c2b62b8b953fc5c7 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Wed, 26 Aug 2026 15:23:19 +0200 Subject: [PATCH] Fix Turtle 1.18.1 rested XP percentage --- mods/xpbar-text.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/xpbar-text.lua b/mods/xpbar-text.lua index 4bb4d15..203046b 100644 --- a/mods/xpbar-text.lua +++ b/mods/xpbar-text.lua @@ -40,8 +40,10 @@ module.enable = function(self) local text if rest > 0 then - -- Preserve the existing Turtle/Vanilla rested display calculation. - local restPct = math.floor(math.min(rest / (max * 1.5) * 100, 100)) + -- Turtle WoW 1.18.1 reduced rested creature XP from +100% to +50%. + -- The effective GetXPExhaustion full-rest threshold is about 112.5% of + -- the current level XP, so normalize that pool to a 0-100% display. + local restPct = math.floor(math.min(rest / (max * 1.125) * 100, 100)) text = "|cffffffff" .. xpPct .. "%|r |cffaaaaaa(|cffa78aca" .. restPct .. "%|cffaaaaaa)|r" else text = "|cffffffff" .. xpPct .. "%|r"