小兵关卡任务

master_dev
grimm 2024-05-07 12:09:56 +08:00
parent efd58dc0c0
commit 99f93fe2d6
5 changed files with 29 additions and 6 deletions

View File

@ -22,7 +22,6 @@ public class CumulationData {
* 3.4.5 * 3.4.5
* *
* *
*
* key:heroTid, value : * key:heroTid, value :
*/ */
// private Map<Integer,Integer> sHeroCountMap=new HashMap<>(); // 妖灵师数量统计 // private Map<Integer,Integer> sHeroCountMap=new HashMap<>(); // 妖灵师数量统计
@ -36,10 +35,7 @@ public class CumulationData {
*/ */
private Map<Integer,Integer> heroLevleCountMap = new HashMap<>(); private Map<Integer,Integer> heroLevleCountMap = new HashMap<>();
/** // private Map<Integer,Integer> storyFightCountMap=new HashMap<>(); // 不同副本挑战次数 key:副本类型 value:战斗次数
* key: value:
*/
// private Map<Integer,Integer> storyFightCountMap=new HashMap<>(); // 不同副本挑战次数
/** /**
* *

View File

@ -185,6 +185,7 @@ public enum MissionType {
QIJIE_INSTANCE_ZONES_NUM(163),//进行num次七界试炼 QIJIE_INSTANCE_ZONES_NUM(163),//进行num次七界试炼
XIAOYAOYOU_CONSUME_NUM(164),//逍遥游消耗云游值num点 XIAOYAOYOU_CONSUME_NUM(164),//逍遥游消耗云游值num点
FABAO_DRAW_NUM(165),//法宝抽卡次数 FABAO_DRAW_NUM(165),//法宝抽卡次数
SOLDIER_LAYER(166),//小兵层数
; ;
private int missionType; private int missionType;

View File

@ -16,6 +16,7 @@ public class DataManagerDistributor {
public static void init(){ public static void init(){
judges.put(MissionType.RECRUITMENT_RANDOM_HEROES,new RandomHeroDataManager()); judges.put(MissionType.RECRUITMENT_RANDOM_HEROES,new RandomHeroDataManager());
judges.put(MissionType.FABAO_DRAW_NUM,new FabaoDrawTaskManager()); judges.put(MissionType.FABAO_DRAW_NUM,new FabaoDrawTaskManager());
judges.put(MissionType.SOLDIER_LAYER,new SoldierLayerManager());
judges.put(MissionType.ELEMENT_RANDOM_TIMES,new RandomHeroDataManager()); judges.put(MissionType.ELEMENT_RANDOM_TIMES,new RandomHeroDataManager());
judges.put(MissionType.COLLECT_QUALITY_HERO,new GetHeroManager()); judges.put(MissionType.COLLECT_QUALITY_HERO,new GetHeroManager());
judges.put(MissionType.COLLECT_DIFFERENT_HEROS,new GetHeroManager()); judges.put(MissionType.COLLECT_DIFFERENT_HEROS,new GetHeroManager());

View File

@ -0,0 +1,23 @@
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;
public class SoldierLayerManager extends AbstractDataManager {
@Override
public boolean isFinish(User user, CumulationData data, int[][] cfgValue, Object... parm) {
return user.getMainLevelManager().getSoldierLayerId() >= cfgValue[1][0];
}
@Override
public int getProcess(User user, CumulationData data, int[] missionSubType) {
return user.getMainLevelManager().getSoldierLayerId();
}
@Override
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
return new CumulationData.Result(missionType);
}
}

View File

@ -6,13 +6,14 @@ import com.ljsd.jieling.exception.ErrorCodeException;
import com.ljsd.jieling.exception.ErrorTableException; import com.ljsd.jieling.exception.ErrorTableException;
import com.ljsd.jieling.globals.BIReason; import com.ljsd.jieling.globals.BIReason;
import com.ljsd.jieling.handler.map.MapLogic; import com.ljsd.jieling.handler.map.MapLogic;
import com.ljsd.jieling.logic.activity.event.FightMainEvent;
import com.ljsd.jieling.logic.activity.event.Poster; import com.ljsd.jieling.logic.activity.event.Poster;
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent; import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
import com.ljsd.jieling.logic.activity.event.SoldierMainEvent; import com.ljsd.jieling.logic.activity.event.SoldierMainEvent;
import com.ljsd.jieling.logic.dao.*; import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.logic.dao.root.User; import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.hero.HeroLogic; import com.ljsd.jieling.logic.hero.HeroLogic;
import com.ljsd.jieling.logic.mission.GameEvent;
import com.ljsd.jieling.logic.mission.MissionType;
import com.ljsd.jieling.logic.rank.RankContext; import com.ljsd.jieling.logic.rank.RankContext;
import com.ljsd.jieling.logic.rank.RankEnum; import com.ljsd.jieling.logic.rank.RankEnum;
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank; import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
@ -323,6 +324,7 @@ public class SoldierLogic {
AbstractRank rank = RankContext.getRankEnum(RankEnum.MAIN_LEVEL_RANK.getType()); AbstractRank rank = RankContext.getRankEnum(RankEnum.MAIN_LEVEL_RANK.getType());
rank.addRank(user.getId(), "", stageConfig.getId(), user.getPlayerInfoManager().getMaxForce()); rank.addRank(user.getId(), "", stageConfig.getId(), user.getPlayerInfoManager().getMaxForce());
Poster.getPoster().dispatchEvent(new SoldierMainEvent(user.getId())); Poster.getPoster().dispatchEvent(new SoldierMainEvent(user.getId()));
user.getUserMissionManager().onGameEvent(user, GameEvent.ONE_MISSION_TYPE_CONSUME, MissionType.SOLDIER_LAYER, 1);
} }
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.SoldierFightCheckResponse_VALUE, builder.build(), true); MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.SoldierFightCheckResponse_VALUE, builder.build(), true);