51 task
parent
725910f363
commit
a32e878367
|
@ -96,6 +96,8 @@ public class CumulationData {
|
|||
|
||||
public int consumerStamina; //消耗体力数量达到
|
||||
|
||||
public int heroInTeamNums; // 上阵卡牌数量
|
||||
|
||||
public Set<Integer> differentHeros = new HashSet<>();
|
||||
|
||||
|
||||
|
@ -138,6 +140,7 @@ public class CumulationData {
|
|||
consumerStamina=0;
|
||||
differentHeros.clear();
|
||||
heroUpStarTimesMap.clear();
|
||||
heroInTeamNums=0;
|
||||
}
|
||||
|
||||
private void clearArray(int[] source){
|
||||
|
|
|
@ -44,4 +44,6 @@ public enum GameEvent {
|
|||
TAKE_ACTIVITY_REWARD, // 领取活动奖励
|
||||
COMPOS_HERO, // 合成英雄
|
||||
|
||||
HERO_IN_TEAM, // 上阵卡牌数量
|
||||
|
||||
}
|
||||
|
|
|
@ -555,6 +555,9 @@ public class MissionLoigc {
|
|||
count = num;
|
||||
}
|
||||
break;
|
||||
case HERO_IN_TEAM_NUMS:
|
||||
count = cumulationData.heroInTeamNums;
|
||||
break;
|
||||
default:
|
||||
count = 0;
|
||||
break;
|
||||
|
|
|
@ -63,6 +63,8 @@ public enum MissionType {
|
|||
USER_CONSUMER_STAMINA(48),//消耗体力数量达到
|
||||
COLLECT_DIFFERENT_HEROS(49), // 收集不同妖灵师数目达到
|
||||
ONE_HERO_UP_STAR_TIMES(50), // 收集不同妖灵师数目达到
|
||||
|
||||
HERO_IN_TEAM_NUMS(51), // 上阵卡牌数量
|
||||
;
|
||||
|
||||
private int missionType;
|
||||
|
@ -177,6 +179,8 @@ public enum MissionType {
|
|||
return COLLECT_DIFFERENT_HEROS;
|
||||
case 50:
|
||||
return ONE_HERO_UP_STAR_TIMES;
|
||||
case 51:
|
||||
return HERO_IN_TEAM_NUMS;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -84,6 +84,8 @@ public class DataManagerDistributor {
|
|||
|
||||
judges.put(MissionType.SYNTHESIS_HERO_STAR_TIMES,new HeroComposDataManager());
|
||||
|
||||
judges.put(MissionType.HERO_IN_TEAM_NUMS,new HeroInTeamNumsDataManager());
|
||||
|
||||
|
||||
judges.put(MissionType.VIP_LEVEL,new DefaultDataManager());
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.ljsd.jieling.logic.mission.data;
|
||||
|
||||
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
|
||||
public class HeroInTeamNumsDataManager implements BaseDataManager{
|
||||
@Override
|
||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
data.heroInTeamNums+=(int)parm[0];
|
||||
return new CumulationData.Result(missionType);
|
||||
}
|
||||
}
|
|
@ -214,6 +214,11 @@ public class MissionEventDistributor {
|
|||
eventEnumListMap.put(GameEvent.COMPOS_HERO,typeList);
|
||||
eventProcessor.put(GameEvent.COMPOS_HERO,new CumulationDataEventProcessor());
|
||||
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(MissionType.HERO_IN_TEAM_NUMS);
|
||||
eventEnumListMap.put(GameEvent.HERO_IN_TEAM,typeList);
|
||||
eventProcessor.put(GameEvent.HERO_IN_TEAM,new CumulationDataEventProcessor());
|
||||
|
||||
}
|
||||
|
||||
private static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
||||
|
|
Loading…
Reference in New Issue