白金装备技能

back_recharge
jiahuiwen 2021-09-26 18:50:43 +08:00
parent 177b95c6fe
commit 8bc3f13117
1 changed files with 22 additions and 6 deletions

View File

@ -15,6 +15,8 @@ public class SEquipSuiteConfig implements BaseConfig {
private int[][] suiteSkill; private int[][] suiteSkill;
private Map<Integer, Integer> suiteSkills;
private Map<Integer,Map<Integer,Long>> suiteMap; private Map<Integer,Map<Integer,Long>> suiteMap;
public static Map<Integer, SEquipSuiteConfig> config; public static Map<Integer, SEquipSuiteConfig> config;
@ -22,18 +24,24 @@ public class SEquipSuiteConfig implements BaseConfig {
@Override @Override
public void init() throws Exception { public void init() throws Exception {
Map<Integer, SEquipSuiteConfig> configTmp = STableManager.getConfig(SEquipSuiteConfig.class); Map<Integer, SEquipSuiteConfig> configTmp = STableManager.getConfig(SEquipSuiteConfig.class);
configTmp.values().forEach(item->{ for (SEquipSuiteConfig value : configTmp.values()) {
Map<Integer,Map<Integer,Long>> suiteMapTmp = new HashMap<>(); Map<Integer,Map<Integer,Long>> suiteMapTmp = new HashMap<>();
int[][] suiteValue = item.getSuiteValue(); Map<Integer, Integer> suiteSkills = new HashMap<>(2);
int[][] suiteValue = value.getSuiteValue();
for(int[] suiteItem :suiteValue){ for(int[] suiteItem :suiteValue){
HashMap<Integer, Long> map = new HashMap<>(); HashMap<Integer, Long> map = new HashMap<>();
map.putIfAbsent(suiteItem[1], (long) suiteItem[2]); map.putIfAbsent(suiteItem[1], (long) suiteItem[2]);
suiteMapTmp.put(suiteItem[0],map); suiteMapTmp.put(suiteItem[0],map);
// suiteMapTmp.putIfAbsent(suiteItem[0],suiteMapTmp.getOrDefault(suiteItem[0],new HashMap<>(suiteMapTmp.getOrDefault(suiteItem[0]-1,new HashMap<>()))));
// suiteMapTmp.get(suiteItem[0]).put(suiteItem[1], suiteMapTmp.get(suiteItem[0]).getOrDefault(suiteItem[1],0) + suiteItem[2]);
} }
item.setSuiteMap(suiteMapTmp); int[][] suiteSkill = value.getSuiteSkill();
}); if (suiteSkill != null && suiteSkill.length > 0) {
for (int[] ints : suiteSkill) {
suiteSkills.put(ints[0], ints[1]);
}
}
value.setSuiteSkills(suiteSkills);
value.setSuiteMap(suiteMapTmp);
}
config=configTmp; config=configTmp;
} }
@ -57,4 +65,12 @@ public class SEquipSuiteConfig implements BaseConfig {
public int[][] getSuiteSkill() { public int[][] getSuiteSkill() {
return suiteSkill; return suiteSkill;
} }
public Map<Integer, Integer> getSuiteSkills() {
return suiteSkills;
}
public void setSuiteSkills(Map<Integer, Integer> suiteSkills) {
this.suiteSkills = suiteSkills;
}
} }