家园任务bug
parent
6bd1bb83ee
commit
fc6bf6f613
|
@ -5340,7 +5340,9 @@ public class HeroLogic {
|
||||||
if (judge) {
|
if (judge) {
|
||||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.HONGMENG_GET_INFO_RESPONSE_VALUE, hongmengInfoIndication.build(), true);
|
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.HONGMENG_GET_INFO_RESPONSE_VALUE, hongmengInfoIndication.build(), true);
|
||||||
} else {
|
} else {
|
||||||
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.HONGMENG_INFO_INDICATION_VALUE, hongmengInfoIndication.build(), true);
|
if (hongmengInfoIndication.getHongmengGuardsCount() > 0 && hongmengInfoIndication.getHongmengAdditionsCount() > 0 && hongmengInfoIndication.getHongmengResonacnesCount() > 0) {
|
||||||
|
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.HONGMENG_INFO_INDICATION_VALUE, hongmengInfoIndication.build(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,12 @@ public class HomeMissionType extends AbstractMissionType {
|
||||||
// 进行中得任务
|
// 进行中得任务
|
||||||
Set<Integer> doingMissionIds = getDoingMissionIds();
|
Set<Integer> doingMissionIds = getDoingMissionIds();
|
||||||
|
|
||||||
Collection<SHomeLandTask> values = STableManager.getConfig(SHomeLandTask.class).values();
|
List<SHomeLandTask> landTasks = SHomeLandTask.getMap().get(result.subType.getMissionTypeValue());
|
||||||
for (SHomeLandTask homeTask : values) {
|
if(landTasks == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (SHomeLandTask homeTask : landTasks) {
|
||||||
// 任务子id
|
// 任务子id
|
||||||
int id = homeTask.getId();
|
int id = homeTask.getId();
|
||||||
// 不在执行中
|
// 不在执行中
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.util;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.protobuf.GeneratedMessage;
|
import com.google.protobuf.GeneratedMessage;
|
||||||
|
import com.googlecode.protobuf.format.JsonFormat;
|
||||||
import com.ljsd.GameApplication;
|
import com.ljsd.GameApplication;
|
||||||
import com.ljsd.SkyEyeService;
|
import com.ljsd.SkyEyeService;
|
||||||
import com.ljsd.jieling.chat.messge.MessageCache;
|
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);
|
byte[] byteBuf = wrappedBuffer(session.getUid(), session.getToken(), indicationIndex,result, msgId, generatedMessage);
|
||||||
session.write(byteBuf,flush);
|
session.write(byteBuf,flush);
|
||||||
session.putBackIndicationToMap(indicationIndex,byteBuf);
|
session.putBackIndicationToMap(indicationIndex,byteBuf);
|
||||||
|
LOGGER.info("sendIndicationMessage uid={} indication={}", session.getUid(), JsonFormat.printToString(generatedMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,6 +3,9 @@ package config;
|
||||||
import manager.STableManager;
|
import manager.STableManager;
|
||||||
import manager.Table;
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Table(name ="HomeLandTask")
|
@Table(name ="HomeLandTask")
|
||||||
|
@ -16,14 +19,23 @@ public class SHomeLandTask implements BaseConfig {
|
||||||
|
|
||||||
private int[][] reward;
|
private int[][] reward;
|
||||||
|
|
||||||
|
private static HashMap<Integer, List<SHomeLandTask>> map = new HashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
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() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue