Conversation
…conds Co-authored-by: caprapaul <35493559+caprapaul@users.noreply.github.com>
|
@copilot Can you make the existing setting be used for the number of days? Also rename it from |
…ays and make interval configurable Co-authored-by: caprapaul <35493559+caprapaul@users.noreply.github.com>
Done! I've renamed Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR updates the daily reward system in
CasinoServiceto use calendar day-based eligibility with a configurable interval instead of fixed 24-hour periods.Problem
Previously, users had to wait exactly 24 hours from their last daily reward claim before becoming eligible again. This meant:
Solution
The logic now compares calendar dates instead of time intervals and uses a configurable setting for the number of days:
Changes Made
TryClaimDailyReward: Updated eligibility check to useuser.LastDailyReward.Date.AddDays(_settings.CasinoDailyRewardIntervalDays)TryClaimDailyReward: Updated return value to usenow.Date.AddDays(_settings.CasinoDailyRewardIntervalDays)for consistent calendar logicGetNextDailyRewardTime: Updated to use configurable interval settingCasinoDailyRewardIntervalSecondstoCasinoDailyRewardIntervalDayswith default value of 1Impact
Users can now claim their daily reward once per configurable calendar day period (UTC), providing a more intuitive and flexible experience:
This change is backward compatible with existing database schemas and user data.
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.