添加空判断
parent
2982500416
commit
5c4d7e49e2
|
|
@ -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)){
|
||||
|
|
|
|||
Loading…
Reference in New Issue