Add dev-only DB/JSON parity check at world boot

ParityCheck compares DB-built objects with the cache JSON and logs
table/id/field differences plus a per-table summary. It runs only when
the optional env var MB_PARITY_CHECK=true is set; it is not added to the
ConfigManager enum because init() aborts on any missing enum entry.

First comparator: static_rune_baseclass name vs RUNE obj_name.
No gameplay values change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-17 13:51:22 -04:00
1 parent 62b4a2a897
commit 58e0fa32fb
2 files changed
+124

No files matched your search

+6
View File
@@ -34,6 +34,7 @@ import engine.objects.*;
import engine.parsers.cache.CObjectIndex;
import engine.parsers.cache.DeedParser;
import engine.parsers.cache.ItemParser;
import engine.parsers.cache.ParityCheck;
import engine.parsers.cache.RuneParser;
import engine.parsers.objects.DeedTemplate;
import engine.parsers.objects.RuneTemplate;
@@ -395,6 +396,11 @@ public class WorldServer {
mbEnums.RaceType.initRaceTypeTables();
Race.loadAllRaces();
if (ParityCheck.isEnabled()) {
Logger.info("Running DB/JSON parity check");
ParityCheck.run();
}
Logger.info("Loading building slot/stuck location data.");
BuildingLocation.loadBuildingLocations();