归元修改
parent
448c13c550
commit
ee53f583f5
|
@ -2754,7 +2754,8 @@ public class HeroLogic{
|
|||
User user = UserManager.getUser(uid);
|
||||
List<String> heroList = new ArrayList<>(1);
|
||||
heroList.add(heroId);
|
||||
ErrorCode err = ItemLogic.getInstance().checkHeroResolve(heroList, user);
|
||||
boolean teamCheck = false;
|
||||
ErrorCode err = ItemLogic.getInstance().checkHeroResolve(heroList, user,teamCheck);
|
||||
if(null!=err){
|
||||
throw new ErrorCodeException(err);
|
||||
}
|
||||
|
|
|
@ -579,7 +579,7 @@ public class ItemLogic {
|
|||
return tempReturn;
|
||||
}
|
||||
|
||||
public ErrorCode checkHeroResolve(List<String> heroIdsList, User user) {
|
||||
public ErrorCode checkHeroResolve(List<String> heroIdsList, User user,boolean teamCheck) {
|
||||
HeroManager heroManager = user.getHeroManager();
|
||||
if (heroIdsList.size() == 0) {
|
||||
return ErrorCode.ITEM_DECOMPOSE_HERO_NO;
|
||||
|
@ -592,10 +592,12 @@ public class ItemLogic {
|
|||
if (hero.getIsLock() == 1) {
|
||||
return ErrorCode.ITEM_DECOMPOSE_HERO_LOCK;
|
||||
}
|
||||
int[] teamId = SSpecialConfig.getOnceArrayValue(SSpecialConfig.HERO_RESOLVE_LICENCE);
|
||||
boolean battleArray = HeroLogic.getInstance().isBattleArray(user, heroId, teamId);
|
||||
if (!battleArray) {
|
||||
return ErrorCode.ITEM_DECOMPOSE_HERO_TEAM;
|
||||
if(teamCheck){
|
||||
int[] teamId = SSpecialConfig.getOnceArrayValue(SSpecialConfig.HERO_RESOLVE_LICENCE);
|
||||
boolean battleArray = HeroLogic.getInstance().isBattleArray(user, heroId, teamId);
|
||||
if (!battleArray) {
|
||||
return ErrorCode.ITEM_DECOMPOSE_HERO_TEAM;
|
||||
}
|
||||
}
|
||||
SItem sItem = SItem.getsItemMap().get(hero.getTemplateId());
|
||||
if (sItem.getIfResolve() == 0) {
|
||||
|
@ -605,6 +607,9 @@ public class ItemLogic {
|
|||
return null;
|
||||
|
||||
}
|
||||
public ErrorCode checkHeroResolve(List<String> heroIdsList, User user) {
|
||||
return checkHeroResolve(heroIdsList,user,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步刷新道具数量
|
||||
|
|
Loading…
Reference in New Issue