fix
parent
2348065005
commit
58e38789a9
|
@ -1,59 +0,0 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="AccomplishmentBox")
|
||||
public class SAccomplishmentBox implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int total;
|
||||
|
||||
private int[][] box;
|
||||
|
||||
private Map<Integer,Integer> boxMap;
|
||||
private static Map<Integer, SAccomplishmentBox> sAccomplishmentBoxMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer, SAccomplishmentBox> config = STableManager.getConfig(SAccomplishmentBox.class);
|
||||
for(SAccomplishmentBox sAccomplishmentBox : config.values()){
|
||||
int[][] box = sAccomplishmentBox.getBox();
|
||||
Map<Integer,Integer> boxMapTmp = new HashMap<>();
|
||||
for(int [] boxItem : box){
|
||||
boxMapTmp.put(boxItem[0],boxItem[1]);
|
||||
}
|
||||
sAccomplishmentBox.setBoxMap(boxMapTmp);
|
||||
}
|
||||
sAccomplishmentBoxMap = config;
|
||||
}
|
||||
|
||||
public static SAccomplishmentBox getsAccomplishmentBoxByMapId( int mapId ) {
|
||||
return sAccomplishmentBoxMap.get(mapId);
|
||||
}
|
||||
|
||||
public int getid() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public int[][] getBox() {
|
||||
return box;
|
||||
}
|
||||
|
||||
public Map<Integer, Integer> getBoxMap() {
|
||||
return boxMap;
|
||||
}
|
||||
|
||||
public void setBoxMap(Map<Integer, Integer> boxMap) {
|
||||
this.boxMap = boxMap;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue