diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java index 620168566..c75998712 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java @@ -1090,7 +1090,7 @@ public class HeroLogic { float score = sPropertyConfig.getScore(); result += propertyValue*score; - // LOGGER.info("the value is ={},propertyValue={},score={},result ={},the value={}",propertyValue*score,propertyValue,score,result,propertyValue*score); + LOGGER.info("the value is ={},propertyValue={},score={},result ={},the value={}",propertyValue*score,propertyValue,score,result,propertyValue*score); } return (int)result; } @@ -1496,7 +1496,7 @@ public class HeroLogic { public int calPokenmonForce(Pokemon pokemon){ Map pokemonAttributeMap = new HashMap<>(); - combinePokemonAttribute(pokemonAttributeMap, pokemon); + combinePokemonAttribute(pokemonAttributeMap, pokemon,false); return calForce(pokemonAttributeMap)*5; } @@ -1504,14 +1504,14 @@ public class HeroLogic { Map pokemonAttributeMap = new HashMap<>(); Map pokemonMap = user.getPokemonManager().getPokemonMap(); for(Pokemon pokemon : pokemonMap.values()){ - combinePokemonAttribute(pokemonAttributeMap, pokemon); + combinePokemonAttribute(pokemonAttributeMap, pokemon,false); } return calForce(pokemonAttributeMap)*5; } - private void combinePokemonAttribute(Map pokemonAttributeMap, Pokemon pokemon) { + private void combinePokemonAttribute(Map pokemonAttributeMap, Pokemon pokemon,boolean needExtra) { Map comonpentsLevelMap = pokemon.getComonpentsLevelMap(); for (Map.Entry comonpentsLevelItem : comonpentsLevelMap.entrySet()) { Integer comonpentId = comonpentsLevelItem.getKey(); @@ -1520,7 +1520,8 @@ public class HeroLogic { SDifferDemonsComonpentsConfig sDifferDemonsComonpentsConfig = sDifferDemonsComonpentsConfigMap.get(comonpentLevel); Map> extraAddMap = sDifferDemonsComonpentsConfig.getExtraAddMap(); combinedAttribute(sDifferDemonsComonpentsConfig.getBaseAttribute(), pokemonAttributeMap); - if (extraAddMap != null) { + + if (needExtra && extraAddMap != null) { for (Map item : extraAddMap.values()) { combinedAttribute(item, pokemonAttributeMap); }