From 482d02b9dd680a22ccab67c19ee39f042b1606a8 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Fri, 14 Jul 2023 16:16:18 -0400 Subject: [PATCH 1/2] Update cpp. --- src/mod-double-xp-weekend.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mod-double-xp-weekend.cpp b/src/mod-double-xp-weekend.cpp index d2d3e2d..523e6b9 100644 --- a/src/mod-double-xp-weekend.cpp +++ b/src/mod-double-xp-weekend.cpp @@ -63,9 +63,13 @@ class DoubleXpWeekend : public PlayerScript { if (sConfigMgr->GetOption("XPWeekend.Announce", false)) { - if (IsEventActive()) + if (IsEventActive() && !sConfigMgr->GetOption("XPWeekend.AlwaysEnabled", false)) { - ChatHandler(player->GetSession()).PSendSysMessage("It's the Weekend! Your XP rate has been set to: %u", GetExperienceRate(player)); + ChatHandler(player->GetSession()).PSendSysMessage("It's the weekend! Your XP rate has been set to: %u", GetExperienceRate(player)); + } + else if (IsEventActive() && sConfigMgr->GetOption("XPWeekend.AlwaysEnabled", false) + { + ChatHandler(player->GetSession()).PSendSysMessage("Your XP rate has been set to: %u", GetExperienceRate(player)); } else { From 630b89d69ce02f36f891306803ad1fcc40b8f64d Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Fri, 14 Jul 2023 17:48:25 -0400 Subject: [PATCH 2/2] Parentheses. --- src/mod-double-xp-weekend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod-double-xp-weekend.cpp b/src/mod-double-xp-weekend.cpp index 523e6b9..3863299 100644 --- a/src/mod-double-xp-weekend.cpp +++ b/src/mod-double-xp-weekend.cpp @@ -67,7 +67,7 @@ class DoubleXpWeekend : public PlayerScript { ChatHandler(player->GetSession()).PSendSysMessage("It's the weekend! Your XP rate has been set to: %u", GetExperienceRate(player)); } - else if (IsEventActive() && sConfigMgr->GetOption("XPWeekend.AlwaysEnabled", false) + else if (IsEventActive() && sConfigMgr->GetOption("XPWeekend.AlwaysEnabled", false)) { ChatHandler(player->GetSession()).PSendSysMessage("Your XP rate has been set to: %u", GetExperienceRate(player)); }