From 88b9029534c0ac5a07baf9bf301dc20922aecc77 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 29 Aug 2025 06:43:09 -0300 Subject: [PATCH] Sync player setting when capping XP rate When the XP rate exceeds the configured maximum, the player's setting is now updated to reflect the capped value. This ensures consistency between the applied rate and the stored player setting. --- src/mod-double-xp-weekend.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod-double-xp-weekend.cpp b/src/mod-double-xp-weekend.cpp index c95f542..157917e 100644 --- a/src/mod-double-xp-weekend.cpp +++ b/src/mod-double-xp-weekend.cpp @@ -243,7 +243,10 @@ class DoubleXpWeekend // If config changed, cap it to max allowed if (rate > ConfigMaxAllowedRate()) + { rate = ConfigMaxAllowedRate(); + player->UpdatePlayerSetting("mod-double-xp-weekend", SETTING_WEEKEND_XP_RATE, ConfigMaxAllowedRate()); + } } if (IsJoyousJourneysActive() && !player->GetPlayerSetting("mod-double-xp-weekend", SETTING_WEEKEND_XP_JOYOUS_JOURNEYS).IsEnabled())