fix mainlevle level limit
parent
a24369e2f5
commit
e79303692b
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue