fix mainlevle level limit

back_recharge
wangyuan 2019-10-10 11:59:42 +08:00
parent a24369e2f5
commit e79303692b
1 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package com.ljsd.jieling.logic.activity;
import com.ljsd.jieling.config.SGlobalSystemConfig;
import com.ljsd.jieling.config.SMainLevelConfig;
import com.ljsd.jieling.globals.BIReason;
import com.ljsd.jieling.logic.activity.event.FightMainEvent;
import com.ljsd.jieling.logic.activity.event.IEvent;
@ -26,9 +27,14 @@ public class UserLevelEventHandler implements IEventHandler{
int uid = userLevelEvent.getUid();
User user = UserManager.getUser(uid);
int state = user.getMainLevelManager().getState();
if(state == -1){
if(state == -1 ){
int fightId = user.getMainLevelManager().getFightId();
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
if(level>=sMainLevelConfig.getLevelLimit()){
user.getMainLevelManager().setState(1);
}
}
List<SGlobalSystemConfig> sGlobalSystemConfigs = SGlobalSystemConfig.sGlobalSystemConfigMapByTypeAndConditionMap.get(2).get(level);
if(sGlobalSystemConfigs == null){
return;