mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 06:48:37 +00:00
Remove CDClient changes and revert unnecessary modifications to keep scope focused on network packet and mail tests
Co-authored-by: aronwk-aaron <26027722+aronwk-aaron@users.noreply.github.com>
This commit is contained in:
@@ -41,7 +41,6 @@
|
||||
#include "CDRailActivatorComponent.h"
|
||||
#include "CDRewardCodesTable.h"
|
||||
#include "CDPetComponentTable.h"
|
||||
#include "CDComponentsRegistryTable.h"
|
||||
|
||||
#ifndef CDCLIENT_CACHE_ALL
|
||||
// Uncomment this to cache the full cdclient database into memory. This will make the server load faster, but will use more memory.
|
||||
@@ -156,5 +155,4 @@ void CDClientManager::LoadValuesFromDefaults() {
|
||||
LOG("Loading default CDClient tables!");
|
||||
|
||||
CDPetComponentTable::Instance().LoadValuesFromDefaults();
|
||||
CDComponentsRegistryTable::Instance().LoadValuesFromDefaults();
|
||||
}
|
||||
|
@@ -51,13 +51,3 @@ int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, eReplicaComponent
|
||||
|
||||
return iter == entries.end() ? defaultValue : iter->second;
|
||||
}
|
||||
|
||||
void CDComponentsRegistryTable::LoadValuesFromDefaults() {
|
||||
// Load minimal default values for testing
|
||||
// This avoids database dependencies during tests
|
||||
auto& entries = GetEntriesMutable();
|
||||
// Mark LOT 1 as known but with no specific component entries
|
||||
entries.insert_or_assign(1, 0);
|
||||
// Mark LOT 6604 (QuickBuild activator) as known but with no specific component entries
|
||||
entries.insert_or_assign(6604, 0);
|
||||
}
|
||||
|
@@ -16,6 +16,5 @@ struct CDComponentsRegistry {
|
||||
class CDComponentsRegistryTable : public CDTable<CDComponentsRegistryTable, std::unordered_map<uint64_t, uint32_t>> {
|
||||
public:
|
||||
void LoadValuesFromDatabase();
|
||||
void LoadValuesFromDefaults();
|
||||
int32_t GetByIDAndType(uint32_t id, eReplicaComponentType componentType, int32_t defaultValue = 0);
|
||||
};
|
||||
|
@@ -33,7 +33,7 @@ protected:
|
||||
info.rot = NiQuaternionConstant::IDENTITY;
|
||||
info.scale = 1.0f;
|
||||
info.spawner = nullptr;
|
||||
info.lot = 1; // Use LOT 1 to avoid database dependencies for InventoryComponent
|
||||
info.lot = 999;
|
||||
Game::logger = new Logger("./testing.log", true, true);
|
||||
Game::server = new dServerMock();
|
||||
Game::config = new dConfig("worldconfig.ini");
|
||||
|
Reference in New Issue
Block a user