224 lines
5.4 KiB
Java
224 lines
5.4 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
import rpc.protocols.CommonProto;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="ArenaRobotConfig")
|
|
public class SArenaRobotConfig implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private String robotName;
|
|
|
|
private int robotScore;
|
|
private int robotLevel;
|
|
|
|
private int[] roleId;
|
|
|
|
// private int[] roleId2;
|
|
//
|
|
// private int[] roleId3;
|
|
|
|
private List<Integer> heroList;
|
|
|
|
// private List<Integer> heroList2;
|
|
//
|
|
// private List<Integer> heroList3;
|
|
|
|
private int roleLv;
|
|
|
|
private int[] differDemonsId;
|
|
|
|
private int differDemonsLv;
|
|
|
|
private int poolId;
|
|
|
|
private int totalForce;
|
|
|
|
// private int yxldTotalForce;
|
|
|
|
private int breakId;
|
|
|
|
private int starBreakId;
|
|
|
|
private Map<Integer,Integer> starOfHeroMap;
|
|
|
|
private Map<Integer, CommonProto.Hero> heroMapList;
|
|
|
|
// private Map<Integer, CommonProto.Hero> heroMapList2;
|
|
// private Map<Integer, CommonProto.Hero> heroMapList3;
|
|
|
|
private static Map<Integer, List<SArenaRobotConfig>> sArenaRobotConfigByPoolMap;
|
|
|
|
private static Map<Integer, SArenaRobotConfig> sArenaRobotConfigMap;
|
|
|
|
// private int msScroe;
|
|
//
|
|
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
Map<Integer, List<SArenaRobotConfig>> result = new HashMap<>();
|
|
Map<Integer, SArenaRobotConfig> config = STableManager.getConfig(SArenaRobotConfig.class);
|
|
for(SArenaRobotConfig sArenaRobotConfig : config.values()){
|
|
int poolId = sArenaRobotConfig.getPoolId();
|
|
if(!result.containsKey(poolId)){
|
|
result.put(poolId,new ArrayList<>());
|
|
}
|
|
int[] roleId = sArenaRobotConfig.getRoleId();
|
|
List<Integer> heroListTmp = new ArrayList<>(roleId.length);
|
|
for(int heroId : roleId){
|
|
heroListTmp.add(heroId);
|
|
}
|
|
//玉虚论道第二个队伍
|
|
// int[] roleId2 = sArenaRobotConfig.getRoleId2();
|
|
// List<Integer> heroListTmp2 = new ArrayList<>(roleId.length);
|
|
// for(int heroId : roleId2){
|
|
// heroListTmp2.add(heroId);
|
|
// }
|
|
//第三个队伍
|
|
// int[] roleId3 = sArenaRobotConfig.getRoleId2();
|
|
// List<Integer> heroListTmp3 = new ArrayList<>(roleId.length);
|
|
// for(int heroId : roleId3){
|
|
// heroListTmp3.add(heroId);
|
|
// }
|
|
sArenaRobotConfig.setHeroList(heroListTmp);
|
|
// sArenaRobotConfig.setHeroList2(heroListTmp2);
|
|
// sArenaRobotConfig.setHeroList3(heroListTmp3);
|
|
result.get(poolId).add(sArenaRobotConfig);
|
|
}
|
|
sArenaRobotConfigByPoolMap = result;
|
|
sArenaRobotConfigMap = config;
|
|
|
|
}
|
|
|
|
public static List<SArenaRobotConfig> getSArenaRobotConfigsByPool( int poolId) {
|
|
return sArenaRobotConfigByPoolMap.get(poolId);
|
|
}
|
|
|
|
public static Map<Integer, SArenaRobotConfig> getsArenaRobotConfigMap() {
|
|
return sArenaRobotConfigMap;
|
|
}
|
|
|
|
public static SArenaRobotConfig getsArenaRobotConfigById(int id) {
|
|
return sArenaRobotConfigMap.get(id);
|
|
}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public String getRobotName() {
|
|
return robotName;
|
|
}
|
|
|
|
public int getRobotScore() {
|
|
return robotScore;
|
|
}
|
|
|
|
private int[] getRoleId() {
|
|
return roleId;
|
|
}
|
|
|
|
// public int[] getRoleId2() {
|
|
// return roleId2;
|
|
// }
|
|
//
|
|
// public int[] getRoleId3() {
|
|
// return roleId3;
|
|
// }
|
|
|
|
public int getRoleLv() {
|
|
return roleLv;
|
|
}
|
|
|
|
public int[] getDifferDemonsId() {
|
|
return differDemonsId;
|
|
}
|
|
|
|
public int getDifferDemonsLv() {
|
|
return differDemonsLv;
|
|
}
|
|
|
|
public int getPoolId() {
|
|
return poolId;
|
|
}
|
|
|
|
public List<Integer> getHeroList() {
|
|
return heroList;
|
|
}
|
|
|
|
public void setHeroList(List<Integer> heroList) {
|
|
this.heroList = heroList;
|
|
}
|
|
|
|
public int getTotalForce() {
|
|
return totalForce;
|
|
}
|
|
|
|
public void setTotalForce(int totalForce) {
|
|
this.totalForce = totalForce;
|
|
}
|
|
|
|
public int getRobotLevel() {
|
|
return robotLevel;
|
|
}
|
|
|
|
public Map<Integer, CommonProto.Hero> getHeroMapList() {
|
|
return heroMapList;
|
|
}
|
|
|
|
public void setHeroMapList(Map<Integer, CommonProto.Hero> heroMapList) {
|
|
this.heroMapList = heroMapList;
|
|
}
|
|
//
|
|
// public Map<Integer, CommonProto.Hero> getHeroMapList2() {
|
|
// return heroMapList2;
|
|
// }
|
|
//
|
|
// public void setHeroMapList2(Map<Integer, CommonProto.Hero> heroMapList2) {
|
|
// this.heroMapList2 = heroMapList2;
|
|
// }
|
|
//
|
|
// public Map<Integer, CommonProto.Hero> getHeroMapList3() {
|
|
// return heroMapList3;
|
|
// }
|
|
//
|
|
// public void setHeroMapList3(Map<Integer, CommonProto.Hero> heroMapList3) {
|
|
// this.heroMapList3 = heroMapList3;
|
|
// }
|
|
//
|
|
// public List<Integer> getHeroList2() {
|
|
// return heroList2;
|
|
// }
|
|
//
|
|
// public void setHeroList2(List<Integer> heroList2) {
|
|
// this.heroList2 = heroList2;
|
|
// }
|
|
//
|
|
// public List<Integer> getHeroList3() {
|
|
// return heroList3;
|
|
// }
|
|
//
|
|
// public void setHeroList3(List<Integer> heroList3) {
|
|
// this.heroList3 = heroList3;
|
|
// }
|
|
//
|
|
// public int getMsScroe() {
|
|
// return msScroe;
|
|
// }
|
|
//
|
|
// public int getYxldTotalForce() {
|
|
// return yxldTotalForce;
|
|
// }
|
|
//
|
|
// public void setYxldTotalForce(int yxldTotalForce) {
|
|
// this.yxldTotalForce = yxldTotalForce;
|
|
// }
|
|
} |