miduo_server/tablemanager/src/main/java/config/SGuildTechnology.java

63 lines
1.3 KiB
Java

package config;
import manager.STableManager;
import manager.Table;
import java.util.HashMap;
import java.util.Map;
@Table(name ="GuildTechnology")
public class SGuildTechnology implements BaseConfig {
private int id;
private int techId;
private int level;
private int[] values;
private int profession;
private int[][] consume;
public static Map<Integer,Map<Integer,Map<Integer,SGuildTechnology>>> technologyMap = new HashMap<>();
@Override
public void init() throws Exception {
Map<Integer, SGuildTechnology> config = STableManager.getConfig(SGuildTechnology.class);
for(SGuildTechnology value:config.values()){
technologyMap.computeIfAbsent(value.getProfession(),n->new HashMap<>());
technologyMap.get(value.getProfession()).computeIfAbsent(value.getTechId(),n->new HashMap<>());
technologyMap.get(value.getProfession()).get(value.getTechId()).put(value.getLevel(),value);
}
}
public int getId() {
return id;
}
public int getTechId() {
return techId;
}
public int getLevel() {
return level;
}
public int[] getValues() {
return values;
}
public int getProfession() {
return profession;
}
public int[][] getConsume() {
return consume;
}
}