mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 01:22:54 +00:00
fix shop config issue
This commit is contained in:
parent
275fcc7dd6
commit
fcb4894387
@ -23,6 +23,8 @@ public class ShopInfo {
|
|||||||
private int disableType = 0;
|
private int disableType = 0;
|
||||||
private int secondarySheetId = 0;
|
private int secondarySheetId = 0;
|
||||||
|
|
||||||
|
private String refreshType;
|
||||||
|
|
||||||
public enum ShopRefreshType {
|
public enum ShopRefreshType {
|
||||||
NONE(0),
|
NONE(0),
|
||||||
SHOP_REFRESH_DAILY(1),
|
SHOP_REFRESH_DAILY(1),
|
||||||
@ -179,9 +181,14 @@ public class ShopInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ShopRefreshType getShopRefreshType() {
|
public ShopRefreshType getShopRefreshType() {
|
||||||
if (shopRefreshType == null)
|
if (refreshType == null)
|
||||||
return ShopRefreshType.NONE;
|
return ShopRefreshType.NONE;
|
||||||
return shopRefreshType;
|
return switch (refreshType) {
|
||||||
|
case "SHOP_REFRESH_DAILY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_DAILY;
|
||||||
|
case "SHOP_REFRESH_WEEKLY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_WEEKLY;
|
||||||
|
case "SHOP_REFRESH_MONTHLY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_MONTHLY;
|
||||||
|
default -> ShopInfo.ShopRefreshType.NONE;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShopRefreshType(ShopRefreshType shopRefreshType) {
|
public void setShopRefreshType(ShopRefreshType shopRefreshType) {
|
||||||
|
Loading…
Reference in New Issue
Block a user