mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Move CDClientManager to be a namespace (#1431)
Tested that worlds still load data as expected. Had no use being a singleton anyways.
This commit is contained in:
@@ -9,10 +9,7 @@
|
||||
/**
|
||||
* Initialize the CDClient tables so they are all loaded into memory.
|
||||
*/
|
||||
class CDClientManager : public Singleton<CDClientManager> {
|
||||
public:
|
||||
CDClientManager() = default;
|
||||
|
||||
namespace CDClientManager {
|
||||
void LoadValuesFromDatabase();
|
||||
void LoadValuesFromDefaults();
|
||||
|
||||
|
@@ -6,8 +6,8 @@
|
||||
|
||||
// Sort the tables by their rarity so the highest rarity items are first.
|
||||
void SortTable(LootTableEntries& table) {
|
||||
auto* componentsRegistryTable = CDClientManager::Instance().GetTable<CDComponentsRegistryTable>();
|
||||
auto* itemComponentTable = CDClientManager::Instance().GetTable<CDItemComponentTable>();
|
||||
auto* componentsRegistryTable = CDClientManager::GetTable<CDComponentsRegistryTable>();
|
||||
auto* itemComponentTable = CDClientManager::GetTable<CDItemComponentTable>();
|
||||
// We modify the table in place so the outer loop keeps track of what is sorted
|
||||
// and the inner loop finds the highest rarity item and swaps it with the current position
|
||||
// of the outer loop.
|
||||
|
Reference in New Issue
Block a user