mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat: web dashboard and playground work
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch: accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes they need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,3 +89,18 @@ std::optional<ILeaderboard::Score> MySQLDatabase::GetPlayerScore(const LWOOBJID
|
||||
void MySQLDatabase::IncrementNumWins(const LWOOBJID playerId, const uint32_t gameId) {
|
||||
ExecuteUpdate("UPDATE leaderboard SET numWins = numWins + 1 WHERE character_id = ? AND game_id = ?;", playerId, gameId);
|
||||
}
|
||||
|
||||
std::map<uint32_t, uint32_t> MySQLDatabase::GetLeaderboardSizes() {
|
||||
std::map<uint32_t, uint32_t> sizes;
|
||||
auto result = ExecuteSelect("SELECT game_id, COUNT(*) AS scores FROM leaderboard GROUP BY game_id;");
|
||||
while (result->next()) sizes[result->getUInt("game_id")] = result->getUInt("scores");
|
||||
return sizes;
|
||||
}
|
||||
|
||||
void MySQLDatabase::DeleteLeaderboardScore(const LWOOBJID playerId, const uint32_t gameId) {
|
||||
ExecuteDelete("DELETE FROM leaderboard WHERE character_id = ? AND game_id = ?;", playerId, gameId);
|
||||
}
|
||||
|
||||
void MySQLDatabase::ResetLeaderboard(const uint32_t gameId) {
|
||||
ExecuteDelete("DELETE FROM leaderboard WHERE game_id = ?;", gameId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user