计算属性

back_recharge
wangyuan 2019-05-14 18:17:00 +08:00
parent b25d7067ba
commit 85cbae09db
1 changed files with 7 additions and 3 deletions

View File

@ -753,11 +753,15 @@ public class HeroLogic {
if(propertyValue == null){ if(propertyValue == null){
propertyValue =0; propertyValue =0;
} }
SPropertyConfig sPropertyConfig = SPropertyConfig.getsPropertyConfigByPID(templatePropetyId);
if(SPropertyConfig.getsPropertyConfigByPID(templatePropetyId).getIfFormula() == 1){ if(sPropertyConfig.getIfFormula() == 1){
sb.append(propertyValue*0.1/(hero.getLevel()+10)/100).append(DIVISION); sb.append(propertyValue*0.1/(hero.getLevel()+10)/100).append(DIVISION);
}else{ }else{
sb.append(propertyValue).append(DIVISION); if(sPropertyConfig.getStyle() == GlobalsDef.PERCENT_TYPE){
sb.append(propertyValue/100).append(DIVISION);
}else{
sb.append(propertyValue).append(DIVISION);
}
} }
} }