back_recharge
zhangshanxue 2020-04-29 14:19:59 +08:00
parent 23334124a2
commit 3540d350b9
1 changed files with 5 additions and 10 deletions

View File

@ -744,22 +744,19 @@ public class HeroLogic{
for(String consumeHero : heroIdsList){
Hero hero = heroManager.getHero(consumeHero);
if( null == hero ){
canUse =false;
break;
throw new ErrorCodeException(ErrorCode.HERO_UN_MATCH);
}
if( 1 == isSame) {
if(hero.getTemplateId() != targetHero.getTemplateId()){
canUse =false;
break;
throw new ErrorCodeException(ErrorCode.HERO_UN_MATCH);
}
}
if( starLimit != 0 ) {
if(hero.getStar() != starLimit){
canUse =false;
break;
throw new ErrorCodeException(ErrorCode.HERO_UN_MATCH);
}
}
@ -767,15 +764,13 @@ public class HeroLogic{
SCHero scHeroTmp = SCHero.getsCHero().get(hero.getTemplateId());
SCHero targetSHero = SCHero.getsCHero().get(targetHero.getTemplateId());
if( scHeroTmp.getPropertyName() != targetSHero.getPropertyName() ){
canUse =false;
break;
throw new ErrorCodeException(ErrorCode.HERO_UN_MATCH);
}
}
if( isId != 0) {
if(hero.getTemplateId() != isId){
canUse =false;
break;
throw new ErrorCodeException(ErrorCode.HERO_UN_MATCH);
}
}
removeHeroIds.add(consumeHero);