mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
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>
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <functional>
|
|
#include <string>
|
|
|
|
/**
|
|
* Daily economy jobs, registered as scheduled tasks (see Scheduler.h): anomaly checks that raise flags (unusual coin
|
|
* income, item spikes, duplicated items) for the day that just ended, keeping the ledger's size in check (merging old
|
|
* daily rows into months, dropping old transfers), and pruning old log rows.
|
|
*/
|
|
void RegisterEconomyJobRoutes();
|
|
|
|
// Before Scheduler::Initialize
|
|
void RegisterEconomyTasks();
|
|
|
|
struct EconomyCheckResult {
|
|
uint32_t income{};
|
|
uint32_t items{};
|
|
uint32_t duplicates{};
|
|
bool duplicateScan{}; // whether the duplicate scan ran
|
|
uint32_t collisionsDismissed{}; // open duplicate flags dismissed because the id is shared by different items
|
|
uint32_t collisions{}; // new flags for id collisions the login migration will not fix
|
|
std::string error; // empty on success
|
|
|
|
uint32_t Total() const { return income + items + duplicates + collisions; }
|
|
};
|
|
|
|
// Run the anomaly checks for one day in the background; done runs on the main thread
|
|
void RunEconomyChecks(uint32_t day, bool duplicateScan, std::function<void(const EconomyCheckResult&)> done);
|