抽卡校验修改

back_recharge
lvxinran 2021-01-14 17:22:19 +08:00
parent b7f10ac10e
commit f28fd3a65d
2 changed files with 8 additions and 1 deletions

View File

@ -266,7 +266,8 @@ public class HeroLogic{
}
}
if(heroManager!=null&& heroManager.getHeroMap()!=null){
if(heroManager.getHeroMap().size() + perCount > STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting().getHeroNumlimit()){
//只有抽英雄才校验
if(sLotterySetting.getGainType()==1&&heroManager.getHeroMap().size() + perCount > STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting().getHeroNumlimit()){
throw new ErrorCodeException(ErrorCode.HERO_MAX);
}
}

View File

@ -37,6 +37,8 @@ public class SLotterySetting implements BaseConfig {
private int activityId;
private int gainType;
public static Map<Integer,Map<Integer,Integer>> changeIds = new HashMap<>();
@Override
@ -122,4 +124,8 @@ public class SLotterySetting implements BaseConfig {
public static void setChangeIds(Map<Integer, Map<Integer, Integer>> changeIds) {
SLotterySetting.changeIds = changeIds;
}
public int getGainType() {
return gainType;
}
}