feat: daily login bonus — +500 gems per day#52
Open
Nabenns wants to merge 2 commits into
Open
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 24 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
3 stability improvements (independent of other PRs): A. MySQL auto-reconnect: add MYSQL_OPT_RECONNECT after mysql_init() so the server survives MariaDB restarts without 'Server has gone away'. C. HTTPS flexible read: read HTTP request byte-by-byte until the blank line instead of a hardcoded 213 bytes — works behind any reverse proxy (Caddy, nginx) with varying header sizes. D. Player gameplay state persistence: save gems, level, xp, role, skin_color, hair_color, slot_size, clothing (CSV), and inventory (CSV id:count) to MariaDB. Loaded in mysql_select_all(), saved via peer::mysql_save() from quit.cpp on disconnect. Auto-migrates existing tables with ALTER TABLE ADD COLUMN IF NOT EXISTS. (World-save-on-shutdown moved to the world-persistence PR since it depends on world::mysql_save().)
Award 500 gems on first login of each calendar day. Tracked via last_daily TIMESTAMP column in peer table. Compared by year/month/day for proper day boundary detection even across timezone changes. Gems added in-memory, saved on disconnect.
b4d9a84 to
bf78483
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Award 500 gems on first login each calendar day. Tracked via last_daily TIMESTAMP column. Compared by year/month/day for proper day boundary detection. Gems added in-memory + saved on disconnect.