fix activity
parent
7d26a0da25
commit
307768615b
|
|
@ -420,7 +420,11 @@ public class ActivityLogic {
|
|||
if(user.getMainLevelManager().getState() == 2 ){
|
||||
mineMainLevelConfig = SMainLevelConfig.config.get(user.getMainLevelManager().getFightId());
|
||||
}
|
||||
if(mineMainLevelConfig!=null && virtureId > mineMainLevelConfig.getVirtureId()){
|
||||
int myVirtureId =0;
|
||||
if(mineMainLevelConfig != null){
|
||||
myVirtureId =mineMainLevelConfig.getVirtureId();
|
||||
}
|
||||
if(virtureId > myVirtureId){
|
||||
state = ActivityType.UNOPEN_STATE;
|
||||
}
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -31,19 +31,9 @@ public class FightMainEventHandler implements IEventHandler{
|
|||
return;
|
||||
FightMainEvent fightMainEvent = (FightMainEvent) event;
|
||||
int fightId = fightMainEvent.getFightId();
|
||||
List<SGlobalSystemConfig> sGlobalSystemConfigs = STableManager.getFigureConfig(CommonStaticConfig.class).getsGlobalSystemConfigMapByTypeAndConditionMap().get(1).get(fightId);
|
||||
if(sGlobalSystemConfigs == null){
|
||||
return;
|
||||
}
|
||||
|
||||
int uid = fightMainEvent.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
for(SGlobalSystemConfig sGlobalSystemConfig : sGlobalSystemConfigs){
|
||||
int[][] openGifts = sGlobalSystemConfig.getOpenGifts();
|
||||
if(openGifts!=null && openGifts.length>0){
|
||||
ItemUtil.drop(user,openGifts, BIReason.SYSTERM_OPEN_REWARD);
|
||||
}
|
||||
}
|
||||
|
||||
for(SGlobalActivity sGlobalActivity : SGlobalActivity.getsGlobalActivityMap().values()){
|
||||
int[] openRules = sGlobalActivity.getOpenRules();
|
||||
if(openRules!=null && openRules.length>0 && openRules[0] == 1){
|
||||
|
|
@ -54,7 +44,7 @@ public class FightMainEventHandler implements IEventHandler{
|
|||
if(user.getMainLevelManager().getState() == 2 ){
|
||||
mineMainLevelConfig = SMainLevelConfig.config.get(user.getMainLevelManager().getFightId());
|
||||
}
|
||||
if(mineMainLevelConfig!=null && virtureId > mineMainLevelConfig.getVirtureId()){
|
||||
if(mineMainLevelConfig!=null && virtureId <= mineMainLevelConfig.getVirtureId()){
|
||||
activityMission.updateActivityState(ActivityType.OPEN_STATE);
|
||||
ActivityLogic.getInstance().sendActivityInfo(user,sGlobalActivity.getId());
|
||||
}
|
||||
|
|
@ -62,6 +52,16 @@ public class FightMainEventHandler implements IEventHandler{
|
|||
|
||||
}
|
||||
}
|
||||
List<SGlobalSystemConfig> sGlobalSystemConfigs = STableManager.getFigureConfig(CommonStaticConfig.class).getsGlobalSystemConfigMapByTypeAndConditionMap().get(1).get(fightId);
|
||||
if(sGlobalSystemConfigs == null){
|
||||
return;
|
||||
}
|
||||
for(SGlobalSystemConfig sGlobalSystemConfig : sGlobalSystemConfigs){
|
||||
int[][] openGifts = sGlobalSystemConfig.getOpenGifts();
|
||||
if(openGifts!=null && openGifts.length>0){
|
||||
ItemUtil.drop(user,openGifts, BIReason.SYSTERM_OPEN_REWARD);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue