2020-05-21 14:07:46 +08:00
|
|
|
package config;
|
|
|
|
|
|
|
|
|
2021-03-17 14:09:55 +08:00
|
|
|
import manager.STableManager;
|
2020-05-21 14:07:46 +08:00
|
|
|
import manager.Table;
|
|
|
|
|
2021-03-17 14:09:55 +08:00
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
2020-05-21 14:07:46 +08:00
|
|
|
@Table(name ="ExpeditionRecruitConfig")
|
|
|
|
public class SExpeditionRecruitConfig implements BaseConfig {
|
|
|
|
|
|
|
|
private int id;
|
|
|
|
|
|
|
|
private int pool;
|
|
|
|
|
|
|
|
private int type;
|
|
|
|
|
|
|
|
private int heroId;
|
|
|
|
|
|
|
|
private int getHero;
|
|
|
|
|
|
|
|
private int weight;
|
|
|
|
|
2021-03-17 14:09:55 +08:00
|
|
|
private int[] sign;
|
|
|
|
|
|
|
|
private int[] equip;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* map<库类型,map<敌人id,类>>
|
|
|
|
*/
|
|
|
|
private static Map<Integer,Map<Integer,SExpeditionRecruitConfig>> recruitMap;
|
2020-05-21 14:07:46 +08:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void init() throws Exception {
|
2021-03-17 14:09:55 +08:00
|
|
|
recruitMap = new HashMap<>();
|
|
|
|
Map<Integer, SExpeditionRecruitConfig> config = STableManager.getConfig(SExpeditionRecruitConfig.class);
|
|
|
|
config.values().forEach(v->{
|
|
|
|
Map<Integer, SExpeditionRecruitConfig> map1 = recruitMap.getOrDefault(v.getType(), new HashMap<>());
|
|
|
|
map1.put(v.getHeroId(),v);
|
|
|
|
recruitMap.put(v.getType(),map1);
|
|
|
|
});
|
2020-05-21 14:07:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getPool() {
|
|
|
|
return pool;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getType() {
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getHeroId() {
|
|
|
|
return heroId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getgetHero() {
|
|
|
|
return getHero;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getWeight() {
|
|
|
|
return weight;
|
|
|
|
}
|
|
|
|
|
2021-03-17 14:09:55 +08:00
|
|
|
public int[] getSign() {
|
|
|
|
return sign;
|
|
|
|
}
|
2020-05-21 14:07:46 +08:00
|
|
|
|
2021-03-17 14:09:55 +08:00
|
|
|
public int[] getEquip() {
|
|
|
|
return equip;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Map<Integer, Map<Integer, SExpeditionRecruitConfig>> getRecruitMap() {
|
|
|
|
return recruitMap;
|
|
|
|
}
|
2020-05-21 14:07:46 +08:00
|
|
|
}
|