家园任务bug

back_recharge
jiahuiwen 2022-01-17 18:58:56 +08:00
parent 6bd1bb83ee
commit fc6bf6f613
4 changed files with 25 additions and 5 deletions

View File

@ -5340,9 +5340,11 @@ public class HeroLogic {
if (judge) {
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.HONGMENG_GET_INFO_RESPONSE_VALUE, hongmengInfoIndication.build(), true);
} else {
if (hongmengInfoIndication.getHongmengGuardsCount() > 0 && hongmengInfoIndication.getHongmengAdditionsCount() > 0 && hongmengInfoIndication.getHongmengResonacnesCount() > 0) {
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.HONGMENG_INFO_INDICATION_VALUE, hongmengInfoIndication.build(), true);
}
}
}
/**
* 鸿

View File

@ -45,8 +45,12 @@ public class HomeMissionType extends AbstractMissionType {
// 进行中得任务
Set<Integer> doingMissionIds = getDoingMissionIds();
Collection<SHomeLandTask> values = STableManager.getConfig(SHomeLandTask.class).values();
for (SHomeLandTask homeTask : values) {
List<SHomeLandTask> landTasks = SHomeLandTask.getMap().get(result.subType.getMissionTypeValue());
if(landTasks == null){
return;
}
for (SHomeLandTask homeTask : landTasks) {
// 任务子id
int id = homeTask.getId();
// 不在执行中

View File

@ -3,6 +3,7 @@ package com.ljsd.jieling.util;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.google.protobuf.GeneratedMessage;
import com.googlecode.protobuf.format.JsonFormat;
import com.ljsd.GameApplication;
import com.ljsd.SkyEyeService;
import com.ljsd.jieling.chat.messge.MessageCache;
@ -189,6 +190,7 @@ public class MessageUtil {
byte[] byteBuf = wrappedBuffer(session.getUid(), session.getToken(), indicationIndex,result, msgId, generatedMessage);
session.write(byteBuf,flush);
session.putBackIndicationToMap(indicationIndex,byteBuf);
LOGGER.info("sendIndicationMessage uid={} indication={}", session.getUid(), JsonFormat.printToString(generatedMessage));
}
/**

View File

@ -3,6 +3,9 @@ package config;
import manager.STableManager;
import manager.Table;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Table(name ="HomeLandTask")
@ -16,12 +19,21 @@ public class SHomeLandTask implements BaseConfig {
private int[][] reward;
private static HashMap<Integer, List<SHomeLandTask>> map = new HashMap<>();
@Override
public void init() throws Exception {
Map<Integer, SHomeLandTask> config = STableManager.getConfig(SHomeLandTask.class);
for (SHomeLandTask value : config.values()) {
List<SHomeLandTask> tasks = map.getOrDefault(value.getType(), new ArrayList<>());
tasks.add(value);
map.put(value.getType(),tasks);
}
}
public static HashMap<Integer, List<SHomeLandTask>> getMap() {
return map;
}
public int getId() {
return id;