fix differ
parent
31590ea1c8
commit
7614cf3aaa
|
@ -9,24 +9,24 @@ import java.util.Map;
|
|||
@Table(name ="DifferDemonsComonpentsConfig")
|
||||
public class SDifferDemonsComonpentsConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
private int id;
|
||||
|
||||
private int comonpentsId;
|
||||
private int comonpentsId;
|
||||
|
||||
private int stage;
|
||||
private int stage;
|
||||
|
||||
private int[][] cost;
|
||||
private int[][] cost;
|
||||
|
||||
private int[][] baseAttribute;
|
||||
private int[][] baseAttribute;
|
||||
|
||||
private int[][] extraAdd;
|
||||
private int[][] extraAdd;
|
||||
|
||||
private Map<Integer,Map<Integer,Integer>> extraAddMap;
|
||||
private Map<Integer,Map<Integer,Integer>> extraAddMap;
|
||||
|
||||
private static Map<Integer,Map<Integer,SDifferDemonsComonpentsConfig>> sDifferDemonsComonpentsConfig;
|
||||
private static Map<Integer,Map<Integer,SDifferDemonsComonpentsConfig>> sDifferDemonsComonpentsConfig;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer,Map<Integer,SDifferDemonsComonpentsConfig>> sDifferDemonsComonpentsConfigTmp = new HashMap<>();
|
||||
Map<Integer,Map<Integer,Map<Integer,Integer>>> extraAddMapTmp = new HashMap<>();
|
||||
|
@ -40,17 +40,19 @@ public class SDifferDemonsComonpentsConfig implements BaseConfig {
|
|||
extraAddMapTmp.put(comonpentsId,new HashMap<>());
|
||||
}
|
||||
int[][] extraAdd = sDifferDemonsComonpentsConfig.getExtraAdd();
|
||||
Map<Integer, Map<Integer, Integer>> extraMapTmpInfo = extraAddMapTmp.get(comonpentsId);
|
||||
for(int [] extraItem : extraAdd){
|
||||
int profession = extraItem[0];
|
||||
int propertyId = extraItem[1];
|
||||
int propertyValue = extraItem[2];
|
||||
if(!extraMapTmpInfo.containsKey(profession)){
|
||||
extraMapTmpInfo.put(profession,new HashMap<>());
|
||||
if(extraAdd!=null&&extraAdd.length>0){
|
||||
Map<Integer, Map<Integer, Integer>> extraMapTmpInfo = extraAddMapTmp.get(comonpentsId);
|
||||
for(int [] extraItem : extraAdd){
|
||||
int profession = extraItem[0];
|
||||
int propertyId = extraItem[1];
|
||||
int propertyValue = extraItem[2];
|
||||
if(!extraMapTmpInfo.containsKey(profession)){
|
||||
extraMapTmpInfo.put(profession,new HashMap<>());
|
||||
}
|
||||
extraMapTmpInfo.get(profession).put(propertyId,propertyValue);
|
||||
}
|
||||
extraMapTmpInfo.get(profession).put(propertyId,propertyValue);
|
||||
sDifferDemonsComonpentsConfig.setExtraAddMap(new HashMap<>(extraMapTmpInfo));
|
||||
}
|
||||
sDifferDemonsComonpentsConfig.setExtraAddMap(new HashMap<>(extraMapTmpInfo));
|
||||
sDifferDemonsComonpentsConfigTmp.get(comonpentsId).put(stage,sDifferDemonsComonpentsConfig);
|
||||
|
||||
}
|
||||
|
@ -66,19 +68,19 @@ public class SDifferDemonsComonpentsConfig implements BaseConfig {
|
|||
return id;
|
||||
}
|
||||
|
||||
public int getComonpentsId() {
|
||||
public int getComonpentsId() {
|
||||
return comonpentsId;
|
||||
}
|
||||
|
||||
public int getStage() {
|
||||
public int getStage() {
|
||||
return stage;
|
||||
}
|
||||
|
||||
public int[][] getCost() {
|
||||
public int[][] getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public int[][] getBaseAttribute() {
|
||||
public int[][] getBaseAttribute() {
|
||||
return baseAttribute;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue