mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Remove broken honor titles when logging in
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user