鸿蒙阵3.0,成就任务
parent
6084f9aa96
commit
a1eb022f14
|
@ -64,6 +64,7 @@ public enum FunctionIdEnum {
|
|||
Car_Delay(73,new CarDelayFunction()),
|
||||
Situation_challenge(74,null),
|
||||
Multiple_Arena(82,null),
|
||||
HongMeng(86,null),
|
||||
;
|
||||
|
||||
private int functionType;
|
||||
|
|
|
@ -168,6 +168,11 @@ public class CumulationData {
|
|||
//日常任务活跃度达到num
|
||||
private int daily_task_remove_item;
|
||||
|
||||
// 鸿蒙阵开启格子数
|
||||
public int hongmeng_resonance_lattice;
|
||||
// 鸿蒙碑等级
|
||||
public int hongmeng_tablet_level;
|
||||
|
||||
public Result updateData(MissionType missionType, Object...parm) throws Exception {
|
||||
return DataManagerDistributor.updateData(this, missionType,parm);
|
||||
}
|
||||
|
@ -378,4 +383,20 @@ public class CumulationData {
|
|||
public void setDaily_task_remove_item(int daily_task_remove_item) {
|
||||
this.daily_task_remove_item = daily_task_remove_item;
|
||||
}
|
||||
|
||||
public int getHongmeng_resonance_lattice() {
|
||||
return hongmeng_resonance_lattice;
|
||||
}
|
||||
|
||||
public void setHongmeng_resonance_lattice(int hongmeng_resonance_lattice) {
|
||||
this.hongmeng_resonance_lattice = hongmeng_resonance_lattice;
|
||||
}
|
||||
|
||||
public int getHongmeng_tablet_level() {
|
||||
return hongmeng_tablet_level;
|
||||
}
|
||||
|
||||
public void setHongmeng_tablet_level(int hongmeng_tablet_level) {
|
||||
this.hongmeng_tablet_level = hongmeng_tablet_level;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@ package com.ljsd.jieling.logic.hero;
|
|||
import com.ljsd.jieling.chat.logic.ChatLogic;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.HeroStaticConfig;
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
|
@ -3457,8 +3459,11 @@ public class HeroLogic{
|
|||
*/
|
||||
public void addOrUpdateHongmeng(ISession session) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
||||
// 鸿蒙阵开启条件
|
||||
if (user.getPlayerInfoManager().getLevel() < SSpecialConfig.getIntegerValue(SSpecialConfig.HONGMENG_OPENLEVEL)) {
|
||||
SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.HongMeng.getFunctionType());
|
||||
boolean open = HandlerLogicThread.checkOpen(user, sGlobalSystemConfig);
|
||||
if (!open) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3488,6 +3493,8 @@ public class HeroLogic{
|
|||
if (!resonances.containsKey(1)) {
|
||||
resonances.put(1, "");
|
||||
heroManager.setResonances(resonances);
|
||||
// 成就任务
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.HONGMENG_RESONANCE_LATTICE,resonances.size());
|
||||
}
|
||||
|
||||
// 获取玩家全部英雄
|
||||
|
@ -3812,6 +3819,10 @@ public class HeroLogic{
|
|||
}
|
||||
resonances.put(graidId, "");
|
||||
heroManager.setResonances(resonances);
|
||||
|
||||
// 成就任务
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.HONGMENG_RESONANCE_LATTICE,resonances.size());
|
||||
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), null);
|
||||
}
|
||||
|
||||
|
@ -4004,6 +4015,8 @@ public class HeroLogic{
|
|||
|
||||
// 战力改变
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
// 成就任务
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.HONGMENG_TABLET_LEVEL,heroManager.getHongmengTablet());
|
||||
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), null);
|
||||
}
|
||||
|
|
|
@ -105,4 +105,7 @@ public enum GameEvent {
|
|||
JADE_DYNASTY_REFRESH,//破阵诛仙任务日刷新
|
||||
JADE_DYNASTY_WEEK_REFRESH,//破阵诛仙周刷新
|
||||
JADE_DYNASTY_MISSION_REWARD,//破阵诛仙周刷新
|
||||
|
||||
HONGMENG_RESONANCE_LATTICE,//鸿蒙阵共鸣格子
|
||||
HONGMENG_TABLET_LEVEL,//鸿蒙碑等级
|
||||
}
|
||||
|
|
|
@ -367,6 +367,7 @@ public class MissionLoigc {
|
|||
CumulationData achievementdata = userMissionManager.getAchievementMap();
|
||||
Set<Integer> doingMissionIds = achievementMissionTypMap.getDoingMissionIds();
|
||||
Set<Integer> finishMissionIds = achievementMissionTypMap.getFinishMissionIds();
|
||||
BitSet rewardedMissionIds = achievementMissionTypMap.getRewardedMissionIds();
|
||||
for (SAchievementConfig sAchievementConfig : STableManager.getConfig(SAchievementConfig.class).values()) {
|
||||
int state = 2;
|
||||
int missionId = sAchievementConfig.getId();
|
||||
|
@ -376,6 +377,9 @@ public class MissionLoigc {
|
|||
state = 0;
|
||||
} else if (finishMissionIds.contains(missionId)) {
|
||||
state = 1;
|
||||
} else if (!rewardedMissionIds.get(missionId)){
|
||||
progrss = getDoingProgress(user, achievementdata, sAchievementConfig.getType(), sAchievementConfig.getValues()[0]);
|
||||
state = 0;
|
||||
}
|
||||
missionList.add(CommonProto.UserMissionInfo.newBuilder().setMissionId(missionId).setState(state).setType(GameMisionType.ACHIEVEMISSION.getType()).setProgress(progrss).build());
|
||||
}
|
||||
|
@ -579,6 +583,12 @@ public class MissionLoigc {
|
|||
case LEVEL_STORY_PASS:
|
||||
count = checkMainLevel(user,missionSubType[0])?1:0;
|
||||
break;
|
||||
case HONGMENG_RESONANCE_LATTICE:
|
||||
count = cumulationData.getHongmeng_resonance_lattice();
|
||||
break;
|
||||
case HONGMENG_TABLET_LEVEL:
|
||||
count = cumulationData.getHongmeng_tablet_level();
|
||||
break;
|
||||
case GENERAL_STORY_PASS:
|
||||
Map<Integer, CrossInfo> crossInfoGenMap = user.getMapManager().getCrossInfoMap();
|
||||
for(Map.Entry<Integer,CrossInfo> item : crossInfoGenMap.entrySet()){
|
||||
|
|
|
@ -123,6 +123,9 @@ public enum MissionType {
|
|||
CHAMPIONSHIP_RANK(113),//巅峰联赛中达到num名
|
||||
GOT_SOUL_MARK(115),//获得指定品质魂印数量
|
||||
RECHARGE_TIMES(117),//充值任意金额次数
|
||||
|
||||
HONGMENG_RESONANCE_LATTICE(119),//鸿蒙阵共鸣格子
|
||||
HONGMENG_TABLET_LEVEL(120),// 鸿蒙碑等级
|
||||
;
|
||||
|
||||
private int missionType;
|
||||
|
|
|
@ -142,6 +142,8 @@ public class DataManagerDistributor {
|
|||
judges.put(MissionType.CHAMPIONSHIP_RANK, new ChampionshipRankManager());
|
||||
judges.put(MissionType.PLAY_MINI_GAME_TIMES, new PlayMiniGameTimesManager());
|
||||
|
||||
judges.put(MissionType.HONGMENG_RESONANCE_LATTICE, new HongMengResonanceDataManager());
|
||||
judges.put(MissionType.HONGMENG_TABLET_LEVEL, new HongMengLevelDataManager());
|
||||
}
|
||||
|
||||
public static CumulationData.Result updateData(CumulationData data, MissionType missionType, Object...parm) throws Exception {
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.ljsd.jieling.logic.mission.data;
|
||||
|
||||
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
|
||||
/**
|
||||
* 鸿蒙碑等级
|
||||
*/
|
||||
public class HongMengLevelDataManager implements BaseDataManager {
|
||||
@Override
|
||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
int nums = (int)parm[0];
|
||||
data.setHongmeng_tablet_level(nums);
|
||||
return new CumulationData.Result(missionType);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ljsd.jieling.logic.mission.data;
|
||||
|
||||
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
|
||||
/**
|
||||
* 鸿蒙阵共鸣格子
|
||||
*/
|
||||
public class HongMengResonanceDataManager implements BaseDataManager {
|
||||
@Override
|
||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
int nums = (int)parm[0];
|
||||
data.setHongmeng_resonance_lattice(nums);
|
||||
return new CumulationData.Result(missionType);
|
||||
}
|
||||
}
|
|
@ -417,6 +417,16 @@ public class MissionEventDistributor {
|
|||
eventEnumListMap.put(GameEvent.PLAY_MINI_GAME, typeList);
|
||||
eventProcessor.put(GameEvent.PLAY_MINI_GAME, new CumulationDataEventProcessor());
|
||||
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(MissionType.HONGMENG_RESONANCE_LATTICE);
|
||||
eventEnumListMap.put(GameEvent.HONGMENG_RESONANCE_LATTICE, typeList);
|
||||
eventProcessor.put(GameEvent.HONGMENG_RESONANCE_LATTICE, new CumulationDataEventProcessor());
|
||||
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(MissionType.HONGMENG_TABLET_LEVEL);
|
||||
eventEnumListMap.put(GameEvent.HONGMENG_TABLET_LEVEL, typeList);
|
||||
eventProcessor.put(GameEvent.HONGMENG_TABLET_LEVEL, new CumulationDataEventProcessor());
|
||||
|
||||
}
|
||||
|
||||
public static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
||||
|
|
|
@ -69,7 +69,6 @@ public class SSpecialConfig implements BaseConfig {
|
|||
public static final String GUILD_WAR_ISOPEN = "Guild_war_isopen";//老公会战是否开启
|
||||
public static final String LUCKYTURNDAILYLIMIT = "LuckyTurnDailyLimit";//幸运探宝每日上限
|
||||
|
||||
public static final String HONGMENG_OPENLEVEL = "Hongmeng_OpenLevel";//鸿蒙阵开启等级
|
||||
public static final String HONGMENG_LATTICE_WAIT_TIME = "Hongmeng_Lattice_Waitingtime";//鸿蒙阵每个格子冷却时间(s)
|
||||
public static final String HONGMENG_LATTICE_PRICE = "Hongmeng_Lattice_Price";//鸿蒙阵格子刷新价格s
|
||||
public static final String HONGMENG_UPGRADE_LIMIT = "Hongmeng_upgrade_limit";//鸿蒙阵升级开启限制
|
||||
|
|
Loading…
Reference in New Issue