助阵修改

master_dev
grimm 2024-04-12 18:59:46 +08:00
parent c4f1d8b620
commit e591edbea1
2 changed files with 4 additions and 3 deletions

View File

@ -107,7 +107,7 @@ public class AssistLogic {
if (assistanceConfig == null){ if (assistanceConfig == null){
throw new ErrorCodeException(ErrorCode.CFG_NULL);//配置不存在 throw new ErrorCodeException(ErrorCode.CFG_NULL);//配置不存在
} }
if (scHero.getPropertyName() != assistanceConfig.getProfessionLimit() || scHero.getQuality() != assistanceConfig.getQuality()){ if (scHero.getPropertyName() != assistanceConfig.getProfessionLimit() || scHero.getNatural() != assistanceConfig.getQuality()){
throw new ErrorTableException(167);//条件不满足 throw new ErrorTableException(167);//条件不满足
} }
assistBox.setHeroId(heroId); assistBox.setHeroId(heroId);

View File

@ -3389,7 +3389,7 @@ public class HeroLogic {
continue; continue;
} }
SCHero scHero = SCHero.getSCHero(hero.getTemplateId()); SCHero scHero = SCHero.getSCHero(hero.getTemplateId());
int[][] property = SAssistanceProperty.propertymap.get(scHero.getQuality()).get(hero.getStar()); int[][] property = SAssistanceProperty.propertymap.get(scHero.getNatural()).get(hero.getStar());
if (property == null){ if (property == null){
continue; continue;
} }
@ -3404,10 +3404,11 @@ public class HeroLogic {
for (int[][] i : list) { for (int[][] i : list) {
for (int[] j : i) { for (int[] j : i) {
int id = j[0]; int id = j[0];
long num = Math.round(j[1] * totalAdd / 10000D); long num = Math.round(j[1] * (totalAdd / 10000D + 1));
attribute.put(id, attribute.getOrDefault(id, 0L) + num); attribute.put(id, attribute.getOrDefault(id, 0L) + num);
} }
} }
LOGGER.info("===助阵属性:{}",attribute);
combinedAttribute(attribute, heroAllAttribute); combinedAttribute(attribute, heroAllAttribute);
} }