山河社稷任务
parent
d01dcff730
commit
fecbddb920
|
@ -171,6 +171,14 @@ public class StartHardStageRequestHandler extends BaseHandler<PlayerInfoProto.Ha
|
||||||
//成就任务
|
//成就任务
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.HARSTAGE_STARS,starSum);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.HARSTAGE_STARS,starSum);
|
||||||
}
|
}
|
||||||
|
//大关卡通过成就+1
|
||||||
|
if(nodeConfig.getStageType() == 1){
|
||||||
|
//nodeConfig
|
||||||
|
int bigStageNumber = SHardStage.getBigStageNumberById(nodeConfig.getId());
|
||||||
|
if( bigStageNumber>0 ){
|
||||||
|
user.getUserMissionManager().onGameEvent(user, GameEvent.HARSTAGE_NODE,bigStageNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//排行榜章节
|
//排行榜章节
|
||||||
|
@ -186,7 +194,6 @@ public class StartHardStageRequestHandler extends BaseHandler<PlayerInfoProto.Ha
|
||||||
fightStartResponse.setStars(node.getState());
|
fightStartResponse.setStars(node.getState());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.HARSTAGE_NODE,hardStageId);
|
|
||||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.HARD_STAGE_FIGHT_START_RESPONSE.getNumber(), fightStartResponse.build(), true);
|
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.HARD_STAGE_FIGHT_START_RESPONSE.getNumber(), fightStartResponse.build(), true);
|
||||||
//更新消息
|
//更新消息
|
||||||
HardStageLogic.sendHardStageIndication(user);
|
HardStageLogic.sendHardStageIndication(user);
|
||||||
|
|
|
@ -10,7 +10,9 @@ public class HardStageNodeDataManager implements BaseDataManager {
|
||||||
@Override
|
@Override
|
||||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
int nums = (int)parm[0];
|
int nums = (int)parm[0];
|
||||||
data.setHardstage_node(nums);
|
if(data.getHardstage_node()< nums){
|
||||||
|
data.setHardstage_node(nums);
|
||||||
|
}
|
||||||
return new CumulationData.Result(missionType);
|
return new CumulationData.Result(missionType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@ public class SHardStage implements BaseConfig {
|
||||||
|
|
||||||
private int section;
|
private int section;
|
||||||
|
|
||||||
|
private int bigStageNumber;
|
||||||
|
|
||||||
private String picture;
|
private String picture;
|
||||||
|
|
||||||
private int repeat;
|
private int repeat;
|
||||||
|
@ -44,6 +46,7 @@ public class SHardStage implements BaseConfig {
|
||||||
private static Map<Integer, SHardStage> configMap;
|
private static Map<Integer, SHardStage> configMap;
|
||||||
private static Map<Integer, List<SHardStage>> preConfigMap;
|
private static Map<Integer, List<SHardStage>> preConfigMap;
|
||||||
private static Map<Integer, Map<Integer,SHardStage>> chapterNodeMapConfig;//<章节id,<节点id,数据>>
|
private static Map<Integer, Map<Integer,SHardStage>> chapterNodeMapConfig;//<章节id,<节点id,数据>>
|
||||||
|
private static Map<Integer, Integer> bigMap;//<表id,第几个大关卡>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,6 +55,7 @@ public class SHardStage implements BaseConfig {
|
||||||
Map<Integer, SHardStage> tempConfig = STableManager.getConfig(SHardStage.class);
|
Map<Integer, SHardStage> tempConfig = STableManager.getConfig(SHardStage.class);
|
||||||
Map<Integer, List<SHardStage>> tempPreConfigMap = new HashMap<>();
|
Map<Integer, List<SHardStage>> tempPreConfigMap = new HashMap<>();
|
||||||
Map<Integer, Map<Integer,SHardStage>> chapterNodeMap = new HashMap<Integer, Map<Integer,SHardStage>>();
|
Map<Integer, Map<Integer,SHardStage>> chapterNodeMap = new HashMap<Integer, Map<Integer,SHardStage>>();
|
||||||
|
Map<Integer, Integer> bmap = new HashMap<>();
|
||||||
for (SHardStage stage : tempConfig.values()) {
|
for (SHardStage stage : tempConfig.values()) {
|
||||||
if (stage.getNextLevel() > 0) {
|
if (stage.getNextLevel() > 0) {
|
||||||
if (tempPreConfigMap.containsKey(stage.getNextLevel())) {
|
if (tempPreConfigMap.containsKey(stage.getNextLevel())) {
|
||||||
|
@ -66,11 +70,16 @@ public class SHardStage implements BaseConfig {
|
||||||
Map<Integer,SHardStage> chapterMap = chapterNodeMap.computeIfAbsent(stage.getChapter(),k-> new HashMap<Integer,SHardStage>());
|
Map<Integer,SHardStage> chapterMap = chapterNodeMap.computeIfAbsent(stage.getChapter(),k-> new HashMap<Integer,SHardStage>());
|
||||||
chapterMap.computeIfAbsent(stage.getSection(),k ->stage);
|
chapterMap.computeIfAbsent(stage.getSection(),k ->stage);
|
||||||
|
|
||||||
|
if(!bmap.containsKey(stage.getId())&& stage.getBigStageNumber()!=0){
|
||||||
|
bmap.put(stage.getId(),stage.getBigStageNumber());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (null == configMap) {
|
if (null == configMap) {
|
||||||
configMap = tempConfig;
|
configMap = tempConfig;
|
||||||
preConfigMap = tempPreConfigMap;
|
preConfigMap = tempPreConfigMap;
|
||||||
chapterNodeMapConfig = chapterNodeMap;
|
chapterNodeMapConfig = chapterNodeMap;
|
||||||
|
bigMap = bmap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +157,15 @@ public class SHardStage implements BaseConfig {
|
||||||
return preConfigMap.get(id);
|
return preConfigMap.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getStageIdByChapterAndSection(int chapter,int section){
|
public int getBigStageNumber() {
|
||||||
|
return bigStageNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBigStageNumber(int bigStageNumber) {
|
||||||
|
this.bigStageNumber = bigStageNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getStageIdByChapterAndSection(int chapter, int section){
|
||||||
if(chapterNodeMapConfig.containsKey(chapter)){
|
if(chapterNodeMapConfig.containsKey(chapter)){
|
||||||
if(chapterNodeMapConfig.get(chapter).containsKey(section)){
|
if(chapterNodeMapConfig.get(chapter).containsKey(section)){
|
||||||
return chapterNodeMapConfig.get(chapter).get(section).getId();
|
return chapterNodeMapConfig.get(chapter).get(section).getId();
|
||||||
|
@ -156,4 +173,10 @@ public class SHardStage implements BaseConfig {
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
public static int getBigStageNumberById(int id){
|
||||||
|
if(bigMap.containsKey(id)){
|
||||||
|
return bigMap.get(id);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue