Implement level rewards

This commit is contained in:
Melledy
2025-11-07 06:23:42 -08:00
parent b08ad1b7a1
commit 86b2933aa1
6 changed files with 153 additions and 7 deletions
@@ -2,6 +2,7 @@ package emu.nebula.data.resources;
import emu.nebula.data.BaseDef;
import emu.nebula.data.ResourceType;
import emu.nebula.game.inventory.ItemParamMap;
import lombok.Getter;
@Getter
@@ -11,8 +12,19 @@ public class WorldClassDef extends BaseDef {
private int Exp;
private String Reward;
private transient ItemParamMap rewards;
@Override
public int getId() {
return Id;
}
@Override
public void onLoad() {
if (this.Reward != null) {
this.rewards = ItemParamMap.fromJsonString(this.Reward);
} else {
this.rewards = new ItemParamMap();
}
}
}