Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix daily tally limit type #7097

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/world/daily_tally.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace dailytally
{
void UpdateDailyTallyPoints()
{
uint16 dailyTallyLimit = settings::get<uint16>("main.DAILY_TALLY_LIMIT");
uint16 dailyTallyAmount = settings::get<uint16>("main.DAILY_TALLY_AMOUNT");
int32 dailyTallyLimit = std::clamp<int32>(settings::get<int32>("main.DAILY_TALLY_LIMIT"), std::numeric_limits<uint16>::min(), std::numeric_limits<uint16>::max());
int32 dailyTallyAmount = std::clamp<int32>(settings::get<int32>("main.DAILY_TALLY_AMOUNT"), std::numeric_limits<uint16>::min(), std::numeric_limits<uint16>::max());

if (!db::preparedStmt("UPDATE char_points "
"SET char_points.daily_tally = LEAST(?, char_points.daily_tally + ?) "
Expand Down