Kelsidavis-WoWee/tools/editor/cli_server_config_catalog.hpp

13 lines
238 B
C++
Raw Normal View History

feat(editor): add WCFG (Server Config) — 120th open format Novel replacement for the worldserver.conf / mangosd.conf flat-text configuration files vanilla server forks shipped. Each entry binds one configId to its polymorphic value via the valueKind enum (Float / Int / Bool / String) — only the matching value field is authoritative per entry. The polymorphic value is the novel data shape: each entry stores ALL three value carriers on disk (floatValue float / intValue int64 / strValue string), and valueKind picks which is meaningful at runtime. Bool folds into intValue with strict 0/1 semantics. JSON export reflects this: an activeValue derived field renders the right form per kind so operators editing JSON see only the relevant value. Nine configKind values cover the full server-tunable surface: XPRate / DropRate / HonorRate / RestedXP / RealmType / WorldFlag / Performance / Security / Misc. Each kind groups settings the server iterates by kind at startup (all XPRate entries seed the per-class experience matrix; all Security entries configure the anti-cheat thresholds). Three preset emitters: makeRates (4 vanilla baseline rate multipliers with valueKind=Float), makePerformance (4 server tuning configs mixing Int and Float kinds — max creatures per cell, view distance yards, GC interval seconds, etc.), makeSecurity (4 anti-cheat configs FIRST format using valueKind=String for the cheat-detection sensitivity preset name). Validator's most novel checks are per-valueKind cross- field consistency: Bool requires intValue strictly 0/1 (error), and warns on cross-field bleed (Float kind with non-zero intValue means the int is silently ignored at runtime but persists on disk). Plus name uniqueness — server name-based config lookups would be ambiguous otherwise. Format count 119 -> 120 (multiple-of-10 milestone). CLI flag count 1262 -> 1267.
2026-05-10 02:57:26 -07:00
#pragma once
namespace wowee {
namespace editor {
namespace cli {
bool handleServerConfigCatalog(int& i, int argc, char** argv,
int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee