Hardcode emblem attribute values

(They were removed from the data files)
This commit is contained in:
Melledy committed 2025-11-27 12:00:08 -08:00
1 parent 4356b194df
commit 26ea746368
9 files changed
+318 -74

No files matched your search

@@ -12,8 +12,6 @@ public class CharGemAttrValueDef extends BaseDef {
private int Id;
private int TypeId;
private int AttrType;
private int AttrTypeFirstSubtype;
private int AttrTypeSecondSubtype;
private int Rarity;
@Override
@@ -23,9 +21,18 @@ public class CharGemAttrValueDef extends BaseDef {
@Override
public void onLoad() {
var data = GameData.getCharGemAttrTypeDataTable().get(this.TypeId);
if (data != null) {
data.getValues().add(this.getRarity(), this);
// Cache attribute values into attribute group defs
// Honestly a horrible/inefficient way of doing this
for (var data : GameData.getCharGemAttrGroupDataTable()) {
for (var type : data.getAttributeTypes()) {
// Skip if type id doesnt match
if (type.getId() != this.getTypeId()) {
continue;
}
// Add
type.addValue(this);
}
}
}
}