Skip to content

Commit

Permalink
Change XP rate indication message based on AlwaysEnabled config. (#22)
Browse files Browse the repository at this point in the history
* Update cpp.

* Parentheses.
  • Loading branch information
heyitsbench authored Jul 15, 2023
1 parent e83c114 commit 22a9674
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mod-double-xp-weekend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ class DoubleXpWeekend : public PlayerScript
{
if (sConfigMgr->GetOption<bool>("XPWeekend.Announce", false))
{
if (IsEventActive())
if (IsEventActive() && !sConfigMgr->GetOption<bool>("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<bool>("XPWeekend.AlwaysEnabled", false))
{
ChatHandler(player->GetSession()).PSendSysMessage("Your XP rate has been set to: %u", GetExperienceRate(player));
}
else
{
Expand Down

0 comments on commit 22a9674

Please sign in to comment.