mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-14 12:18:22 +00:00
d2aeebcd46
* Move CDClientManager to be a namespace Tested that worlds still load data as expected. Had no use being a singleton anyways. * Move cdclient data storage to tu local containers Allows some data from these containers to be saved on object by reference instead of always needing to copy. iteration 2 - move all unnamed namespace containers to a singular spot - use macro for template specialization and variable declaration - use templates to allow for as little copy paste of types and functions as possible * remember to use typename! compiler believes T::StorageType is accessing a member, not a type. * Update CDClientManager.cpp * move to cpp?
43 lines
2.2 KiB
C++
43 lines
2.2 KiB
C++
#pragma once
|
|
|
|
// Custom Classes
|
|
#include "CDTable.h"
|
|
|
|
struct CDZoneTable {
|
|
uint32_t zoneID; //!< The Zone ID of the object
|
|
uint32_t locStatus; //!< The Locale Status(?)
|
|
std::string zoneName; //!< The name of the zone
|
|
uint32_t scriptID; //!< The Script ID of the zone (ScriptsTable)
|
|
float ghostdistance_min; //!< The minimum ghosting distance
|
|
float ghostdistance; //!< The ghosting distance
|
|
uint32_t population_soft_cap; //!< The "soft cap" on the world population
|
|
uint32_t population_hard_cap; //!< The "hard cap" on the world population
|
|
UNUSED(std::string DisplayDescription); //!< The display description of the world
|
|
UNUSED(std::string mapFolder); //!< ???
|
|
float smashableMinDistance; //!< The minimum smashable distance?
|
|
float smashableMaxDistance; //!< The maximum smashable distance?
|
|
UNUSED(std::string mixerProgram); //!< ???
|
|
UNUSED(std::string clientPhysicsFramerate); //!< The client physics framerate
|
|
std::string serverPhysicsFramerate; //!< The server physics framerate
|
|
uint32_t zoneControlTemplate; //!< The Zone Control template
|
|
uint32_t widthInChunks; //!< The width of the world in chunks
|
|
uint32_t heightInChunks; //!< The height of the world in chunks
|
|
bool petsAllowed; //!< Whether or not pets are allowed in the world
|
|
bool localize; //!< Whether or not the world should be localized
|
|
float fZoneWeight; //!< ???
|
|
UNUSED(std::string thumbnail); //!< The thumbnail of the world
|
|
bool PlayerLoseCoinsOnDeath; //!< Whether or not the user loses coins on death
|
|
bool disableSaveLoc; //!< Disables the saving location?
|
|
float teamRadius; //!< ???
|
|
UNUSED(std::string gate_version); //!< The gate version
|
|
bool mountsAllowed; //!< Whether or not mounts are allowed
|
|
};
|
|
|
|
class CDZoneTableTable : public CDTable<CDZoneTableTable, std::map<uint32_t, CDZoneTable>> {
|
|
public:
|
|
void LoadValuesFromDatabase();
|
|
|
|
// Queries the table with a zoneID to find.
|
|
const CDZoneTable* Query(uint32_t zoneID);
|
|
};
|