Skip to content

Commit

Permalink
fix: prevent negative xp rates
Browse files Browse the repository at this point in the history
  • Loading branch information
Nefertumm authored May 20, 2023
2 parents 257f747 + 468f783 commit e83c114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mod-double-xp-weekend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class weekendxp_commandscript : public CommandScript

int8 maxRate = sConfigMgr->GetOption<int8>("XPWeekend.MaxAllowedRate", 2);

if (!rate || rate > maxRate)
if (rate <= 0 || rate > maxRate)
{
handler->PSendSysMessage(LANG_CMD_WEEKEND_XP_ERROR, maxRate);
handler->SetSentErrorMessage(true);
Expand Down

0 comments on commit e83c114

Please sign in to comment.