Build BaseClass from its class rune and compare every field
Adds BaseClass(RuneTemplate): attributes from rune_attr_adj, health/mana/stamina from rune_health/mana/stamina, token = SBStringHash(rune_sub_type), description from rune_dsc. Skills, powers and effects still load from the DB by rune id (tasks 2.8, 2.9, 2.10). The static_rune_baseclass comparator now checks every field against a JSON-built BaseClass. Offline parity (scripts/p21.py, 4 rows vs the CLASS runes with rune_is_standard_character_creation = 2500-2503): 0 differences except description, which is '' in the DB and the class blurb in rune_dsc. Nothing reads BaseClass.getDescription(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0283f85e87
commit
5acd3492ed
2 files changed
+44
-3
No files matched your search
+19
-3
@@ -96,7 +96,9 @@ public class ParityCheck {
|
||||
|
||||
ConcurrentHashMap<Integer, AbstractGameObject> cache;
|
||||
BaseClass baseClass;
|
||||
BaseClass jsonClass;
|
||||
RuneTemplate rune;
|
||||
int id;
|
||||
|
||||
cache = DbManager.getMap(mbEnums.GameObjectType.BaseClass);
|
||||
|
||||
@@ -107,12 +109,26 @@ public class ParityCheck {
|
||||
|
||||
for (AbstractGameObject cached : cache.values()) {
|
||||
baseClass = (BaseClass) cached;
|
||||
rune = RuneTemplate._runes.get(baseClass.getObjectUUID());
|
||||
id = baseClass.getObjectUUID();
|
||||
rune = RuneTemplate._runes.get(id);
|
||||
|
||||
if (!check.compareRow(baseClass.getObjectUUID(), rune))
|
||||
if (!check.compareRow(id, rune))
|
||||
continue;
|
||||
|
||||
check.compareField(baseClass.getObjectUUID(), "name", baseClass.getName(), rune.obj_name);
|
||||
jsonClass = new BaseClass(rune);
|
||||
|
||||
check.compareField(id, "name", baseClass.getName(), jsonClass.getName());
|
||||
check.compareField(id, "strMod", baseClass.getStrMod(), jsonClass.getStrMod());
|
||||
check.compareField(id, "dexMod", baseClass.getDexMod(), jsonClass.getDexMod());
|
||||
check.compareField(id, "conMod", baseClass.getConMod(), jsonClass.getConMod());
|
||||
check.compareField(id, "intMod", baseClass.getIntMod(), jsonClass.getIntMod());
|
||||
check.compareField(id, "spiMod", baseClass.getSpiMod(), jsonClass.getSpiMod());
|
||||
check.compareField(id, "token", baseClass.getToken(), jsonClass.getToken());
|
||||
check.compareField(id, "healthMod", baseClass.getHealthMod(), jsonClass.getHealthMod());
|
||||
check.compareField(id, "manaMod", baseClass.getManaMod(), jsonClass.getManaMod());
|
||||
check.compareField(id, "staminaMod", baseClass.getStaminaMod(), jsonClass.getStaminaMod());
|
||||
check.compareField(id, "isStandardCreation", true, rune.rune_type == mbEnums.RuneType.CLASS
|
||||
&& rune.rune_is_standard_character_creation);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user