2019-09-06 11:04:28 +08:00
|
|
|
package config;
|
|
|
|
|
|
|
|
import manager.STableManager;
|
|
|
|
import manager.Table;
|
|
|
|
|
2019-10-11 16:32:20 +08:00
|
|
|
import java.util.HashMap;
|
2019-09-06 11:04:28 +08:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@Table(name ="EndlessMapConfig")
|
|
|
|
public class SEndlessMapConfig implements BaseConfig {
|
|
|
|
|
|
|
|
private int id;
|
|
|
|
|
|
|
|
private int mapId;
|
|
|
|
|
|
|
|
private int teleportCost;
|
|
|
|
|
|
|
|
private int walkCost;
|
|
|
|
|
|
|
|
private int deathCost;
|
|
|
|
|
|
|
|
private int[] mapItem;
|
|
|
|
|
|
|
|
private int[][] endlessPoint;
|
|
|
|
|
2019-10-11 16:32:20 +08:00
|
|
|
private int[][] initializeCount;
|
|
|
|
|
|
|
|
private int mapStoreId;
|
|
|
|
|
2019-09-06 11:04:28 +08:00
|
|
|
public static Map<Integer,SEndlessMapConfig> sEndlessMapConfigMap;
|
2019-10-11 16:32:20 +08:00
|
|
|
|
|
|
|
public static Map<Integer,Map<Integer,Integer>> initRandomPointMap;
|
2019-09-06 11:04:28 +08:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void init() throws Exception {
|
|
|
|
sEndlessMapConfigMap = STableManager.getConfig(SEndlessMapConfig.class);
|
2019-10-11 16:32:20 +08:00
|
|
|
initRandomPointMap = new HashMap<>();
|
|
|
|
for(Map.Entry<Integer,SEndlessMapConfig> entry:sEndlessMapConfigMap.entrySet()){
|
|
|
|
Map<Integer,Integer> pointMap = new HashMap<>();
|
|
|
|
int[][] initializeCount = entry.getValue().getInitializeCount();
|
|
|
|
for(int i = 0;i<initializeCount.length;i++){
|
|
|
|
pointMap.put(initializeCount[i][0],initializeCount[i][1]);
|
|
|
|
}
|
|
|
|
initRandomPointMap.put(entry.getKey(),pointMap);
|
|
|
|
}
|
2019-09-06 11:04:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getMapId() {
|
|
|
|
return mapId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getTeleportCost() {
|
|
|
|
return teleportCost;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getWalkCost() {
|
|
|
|
return walkCost;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getDeathCost() {
|
|
|
|
return deathCost;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int[][] getEndlessPoint() {
|
|
|
|
return endlessPoint;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int[] getMapItem() {
|
|
|
|
return mapItem;
|
|
|
|
}
|
2019-10-11 16:32:20 +08:00
|
|
|
|
|
|
|
public int[][] getInitializeCount() {
|
|
|
|
return initializeCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getMapStoreId() {
|
|
|
|
return mapStoreId;
|
|
|
|
}
|
2019-09-06 11:04:28 +08:00
|
|
|
}
|