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:
@@ -1,11 +1,11 @@
|
||||
#include "ObjectIDManager.h"
|
||||
|
||||
// Custom Classes
|
||||
#include "MasterPackets.h"
|
||||
#include "Database.h"
|
||||
#include "Logger.h"
|
||||
#include "Game.h"
|
||||
#include "eObjectBits.h"
|
||||
#include "GeneralUtils.h"
|
||||
|
||||
// should the spawners from vanity also have the CLIENT flag?
|
||||
|
||||
@@ -35,6 +35,28 @@ uint64_t ObjectIDManager::GetPersistentID() {
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
ObjectIDManager::ModelIDs ObjectIDManager::GetNewModelIDs() {
|
||||
// Legacy logic to check for old random IDs (regenerating these is not really feasible)
|
||||
// Probably good to have this anyway in case someone messes with the last_object_id or it gets reset somehow
|
||||
const uint32_t maxRetries = 100;
|
||||
uint32_t retries = 0;
|
||||
bool blueprintIDExists = true;
|
||||
bool modelExists = true;
|
||||
|
||||
LWOOBJID newID = LWOOBJID_EMPTY;
|
||||
LWOOBJID blueprintID = LWOOBJID_EMPTY;
|
||||
do {
|
||||
if (newID != LWOOBJID_EMPTY) LOG("Generating blueprintID for UGC model, collision with existing model ID: %llu", blueprintID);
|
||||
newID = GetPersistentID();
|
||||
blueprintID = GetPersistentID();
|
||||
++retries;
|
||||
blueprintIDExists = Database::Get()->GetUgcModel(blueprintID).has_value();
|
||||
modelExists = Database::Get()->GetModel(newID).has_value();
|
||||
} while ((blueprintIDExists || modelExists) && retries < maxRetries);
|
||||
|
||||
return { newID, blueprintID };
|
||||
}
|
||||
|
||||
// Generates an object ID server-sided (used for regular entities like smashables)
|
||||
uint32_t ObjectIDManager::GenerateObjectID() {
|
||||
return ++CurrentObjectID;
|
||||
|
||||
Reference in New Issue
Block a user