78 lines
1.4 KiB
Java
78 lines
1.4 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
|
|
@Table(name ="MazeTreasure")
|
|
public class SMazeTreasure implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int taskType;
|
|
|
|
private int[] takeItem;
|
|
|
|
private int wasteTime;
|
|
|
|
private int[] speedUpTake;
|
|
|
|
private int[][] reward;
|
|
|
|
private int[][] condition;
|
|
|
|
private int needCard;
|
|
|
|
public static Map<Integer,SMazeTreasure> sMazeTreasureMap;
|
|
|
|
public static Map<Integer, List<SMazeTreasure>> mazeMapByTaskType;
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
sMazeTreasureMap = STableManager.getConfig(SMazeTreasure.class);
|
|
mazeMapByTaskType = new HashMap<>();
|
|
for (Map.Entry<Integer,SMazeTreasure> entry:sMazeTreasureMap.entrySet()){
|
|
mazeMapByTaskType.computeIfAbsent(entry.getValue().getTaskType(),v->new ArrayList<>()).add(entry.getValue());
|
|
}
|
|
}
|
|
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getTaskType() {
|
|
return taskType;
|
|
}
|
|
|
|
public int[] getTakeItem() {
|
|
return takeItem;
|
|
}
|
|
|
|
public int getWasteTime() {
|
|
return wasteTime;
|
|
}
|
|
|
|
public int[] getSpeedUpTake() {
|
|
return speedUpTake;
|
|
}
|
|
|
|
public int[][] getReward() {
|
|
return reward;
|
|
}
|
|
|
|
public int[][] getCondition() {
|
|
return condition;
|
|
}
|
|
|
|
public int getNeedCard() {
|
|
return needCard;
|
|
}
|
|
|
|
|
|
} |