家园任务bug
parent
6bd1bb83ee
commit
fc6bf6f613
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 鸿蒙阵对神将等级加成
|
||||
|
|
|
@ -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();
|
||||
// 不在执行中
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue