From b99f650694a9cd2dba3153442cccd0120520b5a9 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed, 27 May 2026 22:19:20 -0500 Subject: [PATCH] Cap rested xp at 113% on turtle wow --- api/api.lua | 8 ++++++++ modules/xpbar.lua | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/api/api.lua b/api/api.lua index 34a6221b..31193ab3 100644 --- a/api/api.lua +++ b/api/api.lua @@ -28,6 +28,14 @@ function pfUI.api.HasNampower() return GetNampowerVersion and true or false end +local isTurtleWoW +function pfUI.api.IsTurtleWoW() + if isTurtleWoW == nil then + isTurtleWoW = C_Spell.GetSpellTexture(46050) == "Interface\\Icons\\Trade_Survival" + end + return isTurtleWoW +end + -- [ GetUnitDistance ] -- Returns distance to unit using best available method -- 'unit1' [string] first unit (default: "player") diff --git a/modules/xpbar.lua b/modules/xpbar.lua index 012c32bb..ff822756 100644 --- a/modules/xpbar.lua +++ b/modules/xpbar.lua @@ -4,7 +4,11 @@ pfUI:RegisterModule("xpbar", function () -- Rested-XP gain tracking constants local REST_WINDOW = 300 -- seconds of sliding-window samples for rate calc + local REST_CAP_MUL = 1.5 -- target rested cap = UnitXPMax * 1.5 + if IsTurtleWoW() then + REST_CAP_MUL = 1.13 + end local data = CreateFrame("Frame", "pfExperienceBarData", UIParent) data.rest_samples = {}