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:
Aaron Kimbrell
2026-09-26 17:52:10 -05:00
parent 854d02f509
commit e213a7aeff
681 changed files with 88310 additions and 1321 deletions

57
dNet/DataChanged.h Normal file
View File

@@ -0,0 +1,57 @@
#ifndef __DATACHANGED__H__
#define __DATACHANGED__H__
#include <algorithm>
#include <cstdint>
#include <string>
#include <vector>
#include "BitStream.h"
#include "dCommonVars.h"
/**
* DATA_CHANGED payload: the tables and rows a game server just wrote. The dashboard turns each entry into a
* table_changed event so open pages refresh without waiting for its periodic database check.
*/
struct DataChanged {
struct Entry {
std::string table; // dashboard table name, e.g. "characters", "mail", "economy"
LWOOBJID id{}; // row the change is about, 0 for the table as a whole
};
static constexpr size_t MAX_ENTRIES = 1024;
static constexpr size_t MAX_TABLE_NAME = 32;
std::vector<Entry> entries;
void Serialize(RakNet::BitStream& stream) const {
const auto count = static_cast<uint16_t>(std::min(entries.size(), MAX_ENTRIES));
stream.Write(count);
for (size_t i = 0; i < count; i++) {
const auto& entry = entries[i];
const auto length = static_cast<uint8_t>(std::min(entry.table.size(), MAX_TABLE_NAME));
stream.Write(length);
stream.Write(entry.table.data(), length);
stream.Write(entry.id);
}
}
bool Deserialize(RakNet::BitStream& stream) {
uint16_t count{};
if (!stream.Read(count) || count > MAX_ENTRIES) return false;
entries.clear();
entries.reserve(count);
for (uint16_t i = 0; i < count; i++) {
uint8_t length{};
if (!stream.Read(length) || length > MAX_TABLE_NAME) return false;
Entry entry;
entry.table.resize(length);
if (length > 0 && !stream.Read(entry.table.data(), length)) return false;
if (!stream.Read(entry.id)) return false;
entries.push_back(std::move(entry));
}
return true;
}
};
#endif //!__DATACHANGED__H__