特训中的英雄无法做材料消耗或分解

grimm 2023-12-25 15:44:21 +08:00
parent 563d25312d
commit 86ae37c126
2 changed files with 4 additions and 5 deletions

View File

@ -4544,8 +4544,7 @@ public class HeroLogic {
User user = UserManager.getUser(uid);
List<String> heroList = new ArrayList<>(1);
heroList.add(heroId);
boolean teamCheck = false;
ErrorCode err = ItemLogic.getInstance().checkHeroResolve(heroList, user, teamCheck);
ErrorCode err = ItemLogic.getInstance().checkHeroResolve(heroList, user, false);
if (null != err) {
throw new ErrorCodeException(err);
}

View File

@ -534,10 +534,10 @@ public class ItemLogic {
if (hero.getIsLock() == 1) {
return ErrorCode.ITEM_DECOMPOSE_HERO_LOCK;
}
if (hero.getTraining().getIsTraining() == 1){
return ErrorCode.HERO_UN_MATCH;
}
if(teamCheck){
if (hero.getTraining().getIsTraining() == 1){
return ErrorCode.HERO_UN_MATCH;
}
int[] teamId = SSpecialConfig.getOnceArrayValue(SSpecialConfig.HERO_RESOLVE_LICENCE);
boolean battleArray = HeroLogic.getInstance().isBattleArray(user, heroId, teamId);
if (!battleArray) {