Files
DarkflameServer/dDashboardServer/routes/EconomyJobs.h
Aaron Kimbrell e213a7aeff 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>
2026-09-28 22:30:43 -05:00

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);