mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-19 18:34:49 +01:00
* add statue promo data * implement levelup city feature * fix get level city when enter game * format code * fix typo, remove some property in the player, add the field cityInfoData to player class
29 lines
753 B
Java
29 lines
753 B
Java
package emu.grasscutter.game.city;
|
|
|
|
import dev.morphia.annotations.Entity;
|
|
import emu.grasscutter.net.proto.CityInfoOuterClass.CityInfo;
|
|
import lombok.Getter;
|
|
import lombok.Setter;
|
|
|
|
@Entity
|
|
public class CityInfoData {
|
|
@Getter @Setter private int cityId;
|
|
|
|
@Getter @Setter
|
|
private int level = 1; // level of the city (include level SotS, level Frostbearing Trees, etc.)
|
|
|
|
@Getter @Setter private int numCrystal = 0; // number of crystals in the city
|
|
|
|
public CityInfoData(int cityId) {
|
|
this.cityId = cityId;
|
|
}
|
|
|
|
public CityInfo toProto() {
|
|
return CityInfo.newBuilder()
|
|
.setCityId(cityId)
|
|
.setLevel(level)
|
|
.setCrystalNum(numCrystal)
|
|
.build();
|
|
}
|
|
}
|