Remove broken honor titles when logging in

This commit is contained in:
Melledy
2025-12-22 19:36:54 -08:00
parent c75da823e0
commit 450b0cca30
4 changed files with 70 additions and 2 deletions
@@ -1,6 +1,7 @@
package emu.nebula.data.resources;
import emu.nebula.data.BaseDef;
import emu.nebula.data.GameData;
import emu.nebula.data.ResourceType;
import lombok.Getter;
@@ -9,9 +10,27 @@ import lombok.Getter;
public class HonorDef extends BaseDef {
private int Id;
private int Type;
private int[] Params;
@Override
public int getId() {
return Id;
}
public boolean isValid() {
if (this.Type == 2) {
if (this.Params.length < 1) {
return false;
}
int charId = this.Params[0];
var charData = GameData.getCharacterDataTable().get(charId);
if (charData == null || !charData.isAvailable()) {
return false;
}
}
return true;
}
}