新增任务类型
parent
9942b4abb3
commit
189674d9ca
|
@ -131,11 +131,11 @@ public class CumulationData {
|
||||||
public Map<Integer,Integer> servenGiftTimes = new HashMap<>();//每日登陆次数
|
public Map<Integer,Integer> servenGiftTimes = new HashMap<>();//每日登陆次数
|
||||||
public Map<Integer,Integer> dailyChallengeMap = new HashMap<>();//每日挑战副本
|
public Map<Integer,Integer> dailyChallengeMap = new HashMap<>();//每日挑战副本
|
||||||
|
|
||||||
public Map<Integer,Integer> card_random_type;//使用普通召唤num次(十连抽num计10)
|
public Map<Integer,Integer> card_random_type= new HashMap<>();//使用普通召唤num次(十连抽num计10)
|
||||||
public Map<Integer,Integer> guild_give_time ;//使用level级别(0不限、1普通、2钻石小、3钻石大)的公会捐献num次
|
public Map<Integer,Integer> guild_give_time= new HashMap<>() ;//使用level级别(0不限、1普通、2钻石小、3钻石大)的公会捐献num次
|
||||||
public int ten_challenge_time;// 挑战十绝阵num次
|
public int ten_challenge_time;// 挑战十绝阵num次
|
||||||
// public Map<Integer,Integer> finisin_daily_challenge_times;//完成type(0不限、1金币、2武将经验、3武将碎片、4兵魂、5谋略)的日常副本num次
|
// public Map<Integer,Integer> finisin_daily_challenge_times;//完成type(0不限、1金币、2武将经验、3武将碎片、4兵魂、5谋略)的日常副本num次
|
||||||
public Map<Integer,Integer> expedition_floor_times;//猎妖之路通过floor层num次
|
public Map<Integer,Integer> expedition_floor_times= new HashMap<>();//猎妖之路通过floor层num次
|
||||||
|
|
||||||
public int decompose_times;//献祭武将次数
|
public int decompose_times;//献祭武将次数
|
||||||
public int death_path_times;// 击杀过关十绝阵num次
|
public int death_path_times;// 击杀过关十绝阵num次
|
||||||
|
|
|
@ -112,6 +112,7 @@ public enum MissionType {
|
||||||
GUILD_HELP_TIMES(104),//公会援助他人次数达到num
|
GUILD_HELP_TIMES(104),//公会援助他人次数达到num
|
||||||
CAR_PLAY_TIMES(105),//参与车迟斗法num次
|
CAR_PLAY_TIMES(105),//参与车迟斗法num次
|
||||||
CAR_PLAY_LOOT_TIME(106),//于车迟斗法中抢夺其他玩家积分num次
|
CAR_PLAY_LOOT_TIME(106),//于车迟斗法中抢夺其他玩家积分num次
|
||||||
|
RANDOM_All_TIMES(107),//使用募英殿内(即包含魂晶、友情、普通三种方式)任意类型招募武将num次
|
||||||
;
|
;
|
||||||
|
|
||||||
private int missionType;
|
private int missionType;
|
||||||
|
|
|
@ -131,6 +131,7 @@ public class DataManagerDistributor {
|
||||||
judges.put(MissionType.GUILD_HELP_TIMES,new GuildHelpManager());
|
judges.put(MissionType.GUILD_HELP_TIMES,new GuildHelpManager());
|
||||||
judges.put(MissionType.CAR_PLAY_TIMES,new CarPlayManager());
|
judges.put(MissionType.CAR_PLAY_TIMES,new CarPlayManager());
|
||||||
judges.put(MissionType.CAR_PLAY_LOOT_TIME,new CarPlayLootManager());
|
judges.put(MissionType.CAR_PLAY_LOOT_TIME,new CarPlayLootManager());
|
||||||
|
judges.put(MissionType.RANDOM_All_TIMES,new CardTypeRandomTimes());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.ljsd.jieling.logic.mission.data;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.mission.MissionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description: 所有类型招募
|
||||||
|
* Author: zsx
|
||||||
|
* CreateDate: 2020/6/1 14:13
|
||||||
|
*/
|
||||||
|
public class RandomAllTypeTimes extends AbstractDataManager {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
|
int type =(int)parm[0];
|
||||||
|
int count =(int)parm[1];
|
||||||
|
data.card_random_type.put(type,data.card_random_type.getOrDefault(type, 0)+count);
|
||||||
|
return new CumulationData.Result(missionType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFinish(User user, CumulationData data, int[][] cfgValue, Object... parm) {
|
||||||
|
Integer orDefault = data.card_random_type.getOrDefault(cfgValue[0][0], 0);
|
||||||
|
return orDefault>=cfgValue[1][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getprocess(User user, CumulationData data, int[] missionSubType) {
|
||||||
|
return data.card_random_type.getOrDefault(missionSubType[0], 0);
|
||||||
|
}
|
||||||
|
}
|
|
@ -50,6 +50,7 @@ public class MissionEventDistributor {
|
||||||
typeList.add(MissionType.RECRUITMENT_RANDOM_HEROES);
|
typeList.add(MissionType.RECRUITMENT_RANDOM_HEROES);
|
||||||
typeList.add(MissionType.ELEMENT_RANDOM_TIMES);
|
typeList.add(MissionType.ELEMENT_RANDOM_TIMES);
|
||||||
typeList.add(MissionType.CARD_RANDOM_TYPE);
|
typeList.add(MissionType.CARD_RANDOM_TYPE);
|
||||||
|
typeList.add(MissionType.RANDOM_All_TIMES);
|
||||||
eventEnumListMap.put(GameEvent.RANDOM_HERO,typeList);
|
eventEnumListMap.put(GameEvent.RANDOM_HERO,typeList);
|
||||||
eventProcessor.put(GameEvent.RANDOM_HERO,new CumulationDataEventProcessor());
|
eventProcessor.put(GameEvent.RANDOM_HERO,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue