mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-09 05:17:17 +00:00
refactor: look up the oldest zone files' scenes in a CDClient SceneTable table
Zone held a std::function that queried the SceneTable, so tests could swap it out. CDSceneTableTable now loads the table with the others, and Zone looks scenes up in it; tests fill its entries like the zone table's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
struct CDSceneTable {
|
||||
uint32_t sceneID; //!< The scene's ID, as zone files before version 30 list their scenes
|
||||
std::string sceneName; //!< The scene's file
|
||||
};
|
||||
|
||||
namespace CDSceneTableTable {
|
||||
using Table = std::map<uint32_t, CDSceneTable>;
|
||||
void LoadValuesFromDatabase();
|
||||
|
||||
// Queries the table with a sceneID to find.
|
||||
const CDSceneTable* Query(uint32_t sceneID);
|
||||
};
|
||||
Reference in New Issue
Block a user