【任务】参与日常副本次数,完不成
parent
9c373c3b2a
commit
7e360f4d71
|
@ -19,18 +19,19 @@ public class WorldBossTreasureStaticConfig extends AbstractClassStaticConfig {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void figureConfigs() {
|
public void figureConfigs() {
|
||||||
/* Map<Integer, SWorldBossTreasureConfig> config = STableManager.getConfig(SWorldBossTreasureConfig.class);
|
Map<Integer, SWorldBossTreasureConfig> config = STableManager.getConfig(SWorldBossTreasureConfig.class);
|
||||||
Map<Integer,Set<SWorldBossTreasureConfig>> idsByPeriodsTmp = new HashMap<>();
|
Map<Integer,Set<SWorldBossTreasureConfig>> idsByPeriodsTmp = new HashMap<>();
|
||||||
config.forEach((id,item)->{
|
config.forEach((id,item)->{
|
||||||
int[] activityIds = item.getActivityId();
|
int[] activityIds = item.getActivityId();
|
||||||
Set<SWorldBossTreasureConfig> ids = idsByPeriodsTmp.putIfAbsent(activityIds[0], new HashSet<>());
|
idsByPeriodsTmp.putIfAbsent(activityIds[0], new HashSet<>());
|
||||||
|
Set<SWorldBossTreasureConfig> ids = idsByPeriodsTmp.get(activityIds[0]);
|
||||||
for(int i=1;i<activityIds.length;i++){
|
for(int i=1;i<activityIds.length;i++){
|
||||||
idsByPeriodsTmp.putIfAbsent(activityIds[i],ids);
|
idsByPeriodsTmp.putIfAbsent(activityIds[i],ids);
|
||||||
}
|
}
|
||||||
ids.add(item);
|
ids.add(item);
|
||||||
});
|
});
|
||||||
sWorldBossTreasureConfigByIdMap = config;
|
sWorldBossTreasureConfigByIdMap = config;
|
||||||
idsByPeriods = idsByPeriodsTmp;*/
|
idsByPeriods = idsByPeriodsTmp;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3416,6 +3416,7 @@ public class MapLogic {
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_CHALLENGE,sDailyChallengeConfig.getType());
|
||||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),builder.build());
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),builder.build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,6 +130,7 @@ public class CumulationData {
|
||||||
public Map<Integer,Integer> finishMissionTimes = new HashMap<>();//完成迷宫寻宝%品质%次
|
public Map<Integer,Integer> finishMissionTimes = new HashMap<>();//完成迷宫寻宝%品质%次
|
||||||
public Map<Integer,Integer> loginTimesDay = new HashMap<>();//每日登陆次数
|
public Map<Integer,Integer> loginTimesDay = new HashMap<>();//每日登陆次数
|
||||||
public Map<Integer,Integer> servenGiftTimes = new HashMap<>();//每日登陆次数
|
public Map<Integer,Integer> servenGiftTimes = new HashMap<>();//每日登陆次数
|
||||||
|
public Map<Integer,Integer> dailyChallengeMap = new HashMap<>();//每日挑战副本
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,4 +82,5 @@ public enum GameEvent {
|
||||||
EXPEDITION_TIMES,//完成猎妖之路节点
|
EXPEDITION_TIMES,//完成猎妖之路节点
|
||||||
|
|
||||||
BUY_SEVEN_GIFT,//购买七日礼包
|
BUY_SEVEN_GIFT,//购买七日礼包
|
||||||
|
DAILY_CHALLENGE,//日常副本挑战
|
||||||
}
|
}
|
||||||
|
|
|
@ -762,6 +762,13 @@ public class MissionLoigc {
|
||||||
case SEVEN_GIFT_BUY:
|
case SEVEN_GIFT_BUY:
|
||||||
count = cumulationData.servenGiftTimes.get(missionSubType[0]);
|
count = cumulationData.servenGiftTimes.get(missionSubType[0]);
|
||||||
break;
|
break;
|
||||||
|
case FINISIN_DAILY_CHALLENGE_TIMES:
|
||||||
|
if(missionSubType[0] == 0){
|
||||||
|
count = (int)(cumulationData.dailyChallengeMap.values().stream().collect(Collectors.summarizingInt(x->x)).getSum());
|
||||||
|
}else{
|
||||||
|
count = cumulationData.dailyChallengeMap.get(missionSubType[0]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
count = 0;
|
count = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -91,6 +91,7 @@ public enum MissionType {
|
||||||
LUCKY_WHEELS_TIMES(83),//幸运探宝%次
|
LUCKY_WHEELS_TIMES(83),//幸运探宝%次
|
||||||
FINISH_EXPEDITION_HERO_TIMES(84),//完成猎妖之路次数达到
|
FINISH_EXPEDITION_HERO_TIMES(84),//完成猎妖之路次数达到
|
||||||
SEVEN_GIFT_BUY(86),//购买7日狂欢福利礼包%s次七日狂欢积分
|
SEVEN_GIFT_BUY(86),//购买7日狂欢福利礼包%s次七日狂欢积分
|
||||||
|
FINISIN_DAILY_CHALLENGE_TIMES(87),//完成%s类型(0为不限类型)的日常副本%s次
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -256,6 +257,8 @@ public enum MissionType {
|
||||||
return FINISH_EXPEDITION_HERO_TIMES;
|
return FINISH_EXPEDITION_HERO_TIMES;
|
||||||
case 86:
|
case 86:
|
||||||
return SEVEN_GIFT_BUY;
|
return SEVEN_GIFT_BUY;
|
||||||
|
case 87:
|
||||||
|
return FINISIN_DAILY_CHALLENGE_TIMES;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,7 @@ public class DataManagerDistributor {
|
||||||
judges.put(MissionType.FINISH_EXPEDITION_HERO_TIMES,new ExpeditionManager());
|
judges.put(MissionType.FINISH_EXPEDITION_HERO_TIMES,new ExpeditionManager());
|
||||||
judges.put(MissionType.LOGIN_TIMES,new LoginTimeManager());
|
judges.put(MissionType.LOGIN_TIMES,new LoginTimeManager());
|
||||||
judges.put(MissionType.SEVEN_GIFT_BUY,new SevenGiftManager());
|
judges.put(MissionType.SEVEN_GIFT_BUY,new SevenGiftManager());
|
||||||
|
judges.put(MissionType.FINISIN_DAILY_CHALLENGE_TIMES,new FinishDailyChallengeManger());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ljsd.jieling.logic.mission.data;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||||
|
import com.ljsd.jieling.logic.mission.MissionType;
|
||||||
|
|
||||||
|
public class FinishDailyChallengeManger implements BaseDataManager{
|
||||||
|
@Override
|
||||||
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
|
int type = (int) parm[0];
|
||||||
|
data.dailyChallengeMap.put(type,data.dailyChallengeMap.getOrDefault(type, 0)+1);
|
||||||
|
return new CumulationData.Result(missionType);
|
||||||
|
}
|
||||||
|
}
|
|
@ -334,6 +334,11 @@ public class MissionEventDistributor {
|
||||||
typeList.add(MissionType.SEVEN_GIFT_BUY);
|
typeList.add(MissionType.SEVEN_GIFT_BUY);
|
||||||
eventEnumListMap.put(GameEvent.BUY_SEVEN_GIFT,typeList);
|
eventEnumListMap.put(GameEvent.BUY_SEVEN_GIFT,typeList);
|
||||||
eventProcessor.put(GameEvent.BUY_SEVEN_GIFT,new CumulationDataEventProcessor());
|
eventProcessor.put(GameEvent.BUY_SEVEN_GIFT,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
|
typeList = new ArrayList<>();
|
||||||
|
typeList.add(MissionType.FINISIN_DAILY_CHALLENGE_TIMES);
|
||||||
|
eventEnumListMap.put(GameEvent.DAILY_CHALLENGE,typeList);
|
||||||
|
eventProcessor.put(GameEvent.DAILY_CHALLENGE,new CumulationDataEventProcessor());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
public static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
||||||
|
|
Loading…
Reference in New Issue