添加空判断

back_recharge
jiahuiwen 2020-09-11 10:05:43 +08:00
parent 2982500416
commit 5c4d7e49e2
1 changed files with 3 additions and 0 deletions

View File

@ -192,6 +192,9 @@ public class HeroLogic{
int uid = session.getUid();
User user = UserManager.getUser(uid);
SLotterySetting sLotterySetting = STableManager.getConfig(SLotterySetting.class).get(type);
if (sLotterySetting == null) {
throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN);
}
int perCount = sLotterySetting.getPerCount();
int maxTimes = sLotterySetting.getMaxTimes();
if(maxTimes!=0 && !PlayerLogic.getInstance().checkAndUpdate(user,maxTimes, perCount)){