Commit 9f09e60b by 周君强

1.推理项目第三版:整合了关卡请求,建议系统问题修复

parent d4c7ebca
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="FieldCanBeLocal" enabled="true" level="WARNING" enabled_by_default="true">
<option name="EXCLUDE_ANNOS">
<value>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="org.springframework.beans.factory.annotation.Autowired" />
</list>
</value>
</option>
<option name="IGNORE_FIELDS_USED_IN_MULTIPLE_METHODS" value="true" />
</inspection_tool>
</profile>
</component>
\ No newline at end of file
...@@ -122,6 +122,16 @@ ...@@ -122,6 +122,16 @@
<artifactId>poi-ooxml</artifactId> <artifactId>poi-ooxml</artifactId>
<version>4.1.2</version> <version>4.1.2</version>
</dependency> </dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>4.6</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>2.6.5</version>
</dependency>
</dependencies> </dependencies>
<properties> <properties>
......
package com.qiwu.inference; package com.qiwu.inference;
import com.qiwu.inference.common.cache.ExpireThread; import com.qiwu.inference.common.cache.ExpireThread;
import com.qiwu.inference.common.cache.TaskTipsThread;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
......
...@@ -103,8 +103,34 @@ public class Constants { ...@@ -103,8 +103,34 @@ public class Constants {
*/ */
public static final String OPERATE_ASK = "询问操作"; public static final String OPERATE_ASK = "询问操作";
/**
* 查看地址操作标签
*/
public static final int CHECK_LOCATION = 3004;
/** /**
* 线索-关系类型-5 * 线索-关系类型-5
*/ */
public static final Integer RELATION_TYPE = 5; public static final Integer RELATION_TYPE = 5;
/**
* 物品类型-伙伴
*/
public static final Integer ITEM_PARTNER = 1;
/**
* 物品类型-道具
*/
public static final Integer ITEM_PROPS = 2;
/**
* 物品类型-普通物品
*/
public static final Integer ITEM_NOR = 3;
/**
* 结束文本标识
*/
public static final String END_TEXT = "►打开:当前作品:已完成当前推理作品哈喽◄";
} }
...@@ -2,12 +2,15 @@ package com.qiwu.inference.common; ...@@ -2,12 +2,15 @@ package com.qiwu.inference.common;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.qiwu.inference.common.utils.CacheUtil;
import com.qiwu.inference.common.utils.MD5Util;
import com.qiwu.inference.common.utils.PersistenceUtil; import com.qiwu.inference.common.utils.PersistenceUtil;
import com.qiwu.inference.common.utils.SpeechUtil; import com.qiwu.inference.common.utils.SpeechUtil;
import com.qiwu.inference.dao.*; import com.qiwu.inference.dao.*;
import com.qiwu.inference.dto.BarrierTaskKeyDto; import com.qiwu.inference.dto.BarrierTaskKeyDto;
import com.qiwu.inference.dto.Person; import com.qiwu.inference.dto.Person;
import com.qiwu.inference.dto.Player; import com.qiwu.inference.dto.Player;
import com.qiwu.inference.dto.ReputationDto;
import com.qiwu.inference.pojo.*; import com.qiwu.inference.pojo.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -15,22 +18,26 @@ import org.springframework.beans.factory.InitializingBean; ...@@ -15,22 +18,26 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.PriorityBlockingQueue;
@Component @Component
public class InitSysServlet implements InitializingBean { public class InitSysServlet implements InitializingBean {
Logger log = LoggerFactory.getLogger(InitSysServlet.class); Logger log = LoggerFactory.getLogger(InitSysServlet.class);
@Value("${offlineTime}")
private String offlineTime;
@Value("${userFilePath}") @Value("${userFilePath}")
private String userFilePath; private String userFilePath;
@Value("${configFilePath}") @Value("${configFilePath}")
private String configFilePath; private String configFilePath;
@Value("${speechFilePath}") @Value("${dataFilePath}")
private String speechFilePath; private String dataFilePath;
@Autowired @Autowired
private SystemConfigMapper systemConfigMapper; private SystemConfigMapper systemConfigMapper;
...@@ -52,140 +59,69 @@ public class InitSysServlet implements InitializingBean { ...@@ -52,140 +59,69 @@ public class InitSysServlet implements InitializingBean {
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
//--------------------------缓存关卡数据--------------------- //--------------------------缓存关卡数据---------------------
log.info("开始缓存关卡数据"); log.info("开始缓存关卡数据");
String gateInfo = PersistenceUtil.getConfigFromFile(configFilePath, "results.json"); PersistenceUtil.getDataFromFile(configFilePath);
Map<String, List<Person>> gateInfoMap = JSON.parseObject(gateInfo, new TypeReference<Map<String, List<Person>>>(){});
TimingAcquisition.gateInfoMap.putAll(gateInfoMap);
log.info("关卡数据缓存完成"); log.info("关卡数据缓存完成");
Map<String, List<Person>> gateInfoMap = TimingAcquisition.gateInfoMap;
//--------------------------缓存关卡NPC数据---------------------
log.info("开始缓存关卡NPC数据");
Map<String, Map<Integer, Person>> gatePersonMap = new ConcurrentHashMap<>();
for (Map.Entry<String, List<Person>> entry : gateInfoMap.entrySet()) { for (Map.Entry<String, List<Person>> entry : gateInfoMap.entrySet()) {
String gateNo = entry.getKey(); List<Person> personList = entry.getValue();
//-------------------------缓存关卡攻略数据--------------------- Map<Integer, Person> personMap = new ConcurrentHashMap<>();
log.info("开始缓存关卡攻略数据"); for (Person person : personList) {
String barrierTaskKey = PersistenceUtil.getConfigFromFile(configFilePath, "results_final_task.json"); personMap.put(person.getId(), person);
List<BarrierTaskKeyDto> barrierTaskKeyList = JSON.parseObject(barrierTaskKey, new TypeReference<List<BarrierTaskKeyDto>>(){}); }
Map<String, List<BarrierTaskKeyDto>> barrierTaskKeyMap = new ConcurrentHashMap<>(); gatePersonMap.put(entry.getKey(), personMap);
barrierTaskKeyMap.put(gateNo, barrierTaskKeyList);
TimingAcquisition.barrierTaskKeyMap.putAll(barrierTaskKeyMap);
log.info("关卡攻略数据缓存完成");
} }
TimingAcquisition.gatePersonMap.putAll(gatePersonMap);
log.info("关卡NPC数据缓存完成");
//--------------------加载配置目录下的所有话术----------------
PersistenceUtil.getSpeechFromFile(configFilePath);
//-----------------缓存系列的配置信息------------------
PersistenceUtil.getConfigFromFile(configFilePath);
//--------------------------加载玩家数据---------------------- //--------------------------加载玩家数据----------------------
log.info("开始加载玩家数据"); log.info("开始加载玩家数据");
//从yml配置文件中取出存放玩家数据的地址 //从yml配置文件中取出存放玩家数据的地址
File file = new File(userFilePath); File file = new File(userFilePath);
File[] files = file.listFiles(); //一级目录
if (files == null) { File[] file1List = file.listFiles();
log.info("路径" + userFilePath+ "下没有文件"); if (!StringUtils.isEmpty(file1List)) {
return; for (File file1 : file1List) {
} //二级目录
Map<String, Player> playerMap = new ConcurrentHashMap<>(); File[] file2List = file1.listFiles();
for (File f : files) { if (!StringUtils.isEmpty(file2List)) {
if (f.isFile()) { for (File file2 : file2List) {
String s = PersistenceUtil.getDataFromFile(String.valueOf(f)); //三级目录
//JSON转map对象 File[] file3List = file2.listFiles();
Player player = JSON.parseObject(s, new TypeReference<Player>(){}); if (!StringUtils.isEmpty(file3List)) {
String fileName = f.getName().replace(".json", ""); for (File file3 : file3List) {
playerMap.put(fileName, player); //四级目录
TimingAcquisition.playerMap.putAll(playerMap); File[] file4List = file3.listFiles();
if (!StringUtils.isEmpty(file4List)) {
for (File file4 : file4List) {
//用户uid目录
String uid = file4.getName();
//保存所有玩家的uid
TimingAcquisition.uidList.add(uid);
//加载系列声望
// PersistenceUtil.loadSeriesReputation(uid, file4.getAbsolutePath());
}
}
}
}
}
}
} }
} }
log.info("玩家数据缓存完成"); log.info("玩家数据缓存完成");
//--------------------加载话术----------------- //--------------------------加载系列玩家数据----------------------
TimingAcquisition.speechLoading(speechFilePath); // log.info("开始加载玩家系列数据");
//--------------------加载闲聊话术的excel表---------------- // PersistenceUtil.loadSeriesPlayer(dataFilePath);
log.info("加载闲聊话术"); // log.info("玩家系列数据加载完成");
Map<Integer, List<ChatSpeech>> chatSpeechMap = SpeechUtil.getChatSpeechModel(speechFilePath);
TimingAcquisition.chatSpeechMap.putAll(chatSpeechMap);
log.info("闲聊话术加载完成");
//--------------------加载线索成功话术的excel表----------------
log.info("加载线索成功话术");
Map<Integer, List<ClueSpeech>> clueSpeechMap = SpeechUtil.getClueSpeechModel(speechFilePath);
TimingAcquisition.successClueSpeechMap.putAll(clueSpeechMap);
log.info("线索成功话术加载完成");
//--------------------加载任务成功话术的excel表----------------
log.info("加载任务成功话术");
Map<Integer, List<TaskSpeech>> taskSpeechMap = SpeechUtil.getTaskSpeechModel(speechFilePath);
TimingAcquisition.successTaskSpeechMap.putAll(taskSpeechMap);
log.info("任务成功话术加载完成");
//--------------------加载任务成功话术的excel表----------------
log.info("加载任务提示话术");
Map<Integer, List<TipSpeech>> tipSpeechMap = SpeechUtil.getTipSpeechModel(speechFilePath);
TimingAcquisition.tipSpeechMap.putAll(tipSpeechMap);
log.info("任务提示话术加载完成");
//--------------------加载人物见面话术的excel表----------------
log.info("加载人物见面话术");
Map<String, List<PersonSpeech>> personSpeechMap = SpeechUtil.getPersonSpeechModel(speechFilePath);
TimingAcquisition.personSpeechMap.putAll(personSpeechMap);
log.info("人物见面话术加载完成");
//-----------------缓存场所信息------------------
Map<String, Location> locationMap = new ConcurrentHashMap<>();
List<Location> locationList = locationMapper.findAll();
for (Location location : locationList) {
locationMap.put(location.getId().toString(), location);
}
TimingAcquisition.locationMap.putAll(locationMap);
log.info("场所配置信息缓存完成");
//-----------------缓存线索信息------------------
Map<Integer, Clue> clueMap = new ConcurrentHashMap<>();
List<Clue> clueList = clueMapper.findAll();
for (Clue clue : clueList) {
clueMap.put(clue.getId(), clue);
}
TimingAcquisition.clueMap.putAll(clueMap);
log.info("线索配置信息缓存完成");
//-----------------缓存线索类型信息------------------
Map<Integer, String> clueTypeMap = new ConcurrentHashMap<>();
List<ClueType> clueTypeList = clueMapper.getTypeInfo();
for (ClueType clueType : clueTypeList) {
clueTypeMap.put(clueType.getId(), clueType.getName());
}
TimingAcquisition.clueTypeMap.putAll(clueTypeMap);
log.info("线索类型配置信息缓存完成");
//-----------------缓存需求任务配置信息------------------
Map<Integer, DemandTask> demandTaskMap = new ConcurrentHashMap<>();
List<DemandTask> demandTaskList = demandTaskMapper.findAll();
for (DemandTask demandTask : demandTaskList) {
demandTaskMap.put(demandTask.getId(), demandTask);
}
TimingAcquisition.demandTaskMap.putAll(demandTaskMap);
log.info("需求任务配置信息缓存完成");
//-----------------缓存性格信息------------------
Map<Integer, Disposition> dispositionMap = new ConcurrentHashMap<>();
List<Disposition> dispositionList = dispositionMapper.findAll();
for (Disposition disposition : dispositionList) {
dispositionMap.put(disposition.getId(), disposition);
}
TimingAcquisition.dispositionMap.putAll(dispositionMap);
log.info("性格配置信息缓存完成");
//-----------------缓存系统配置信息------------------
Map<String, SystemConfigPojo> systemConfigMap = new ConcurrentHashMap<>();
List<SystemConfigPojo> systemConfigList = systemConfigMapper.findAll();
for (SystemConfigPojo systemConfig : systemConfigList) {
systemConfigMap.put(systemConfig.getName(), systemConfig);
}
TimingAcquisition.systemConfigMap.putAll(systemConfigMap);
log.info("系统配置信息缓存完成");
//-----------------缓存结局目标配置信息------------------
Map<Integer, EndGoal> endGoalMap = new ConcurrentHashMap<>();
List<EndGoal> endGoalList = endGoalMapper.findAll();
for (EndGoal endGoal : endGoalList) {
endGoalMap.put(endGoal.getId(), endGoal);
}
TimingAcquisition.endGoalMap.putAll(endGoalMap);
log.info("结局目标配置信息缓存完成");
} }
} }
package com.qiwu.inference.common; package com.qiwu.inference.common;
import com.qiwu.inference.common.utils.PersistenceUtil; import com.qiwu.inference.common.utils.PersistenceUtil;
import com.qiwu.inference.dto.BarrierTaskKeyDto; import com.qiwu.inference.dto.*;
import com.qiwu.inference.dto.Person;
import com.qiwu.inference.dto.Player;
import com.qiwu.inference.pojo.*; import com.qiwu.inference.pojo.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -12,16 +10,21 @@ import org.springframework.util.StringUtils; ...@@ -12,16 +10,21 @@ import org.springframework.util.StringUtils;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.PriorityBlockingQueue;
@Component @Component
public class TimingAcquisition { public class TimingAcquisition {
static Logger log = LoggerFactory.getLogger(TimingAcquisition.class); static Logger log = LoggerFactory.getLogger(TimingAcquisition.class);
/** /**
* 关卡信息,Map<gateNo, List<Person>> * 关卡信息,Map<关卡编号, List<Person>>
*/ */
public volatile static Map<String, List<Person>> gateInfoMap = new ConcurrentHashMap<>(); public volatile static Map<String, List<Person>> gateInfoMap = new ConcurrentHashMap<>();
/** /**
* 关卡信息,Map<关卡编号, Map<Integer, Person>>
*/
public volatile static Map<String, Map<Integer, Person>> gatePersonMap = new ConcurrentHashMap<>();
/**
* 关卡攻略信息,Map<关卡编号, List<攻略任务>> * 关卡攻略信息,Map<关卡编号, List<攻略任务>>
*/ */
public volatile static Map<String, List<BarrierTaskKeyDto>> barrierTaskKeyMap = new ConcurrentHashMap<>(); public volatile static Map<String, List<BarrierTaskKeyDto>> barrierTaskKeyMap = new ConcurrentHashMap<>();
...@@ -33,78 +36,209 @@ public class TimingAcquisition { ...@@ -33,78 +36,209 @@ public class TimingAcquisition {
* 玩家信息,Map<sid, Player> * 玩家信息,Map<sid, Player>
*/ */
public volatile static Map<String, Player> playerMap = new ConcurrentHashMap<>(); public volatile static Map<String, Player> playerMap = new ConcurrentHashMap<>();
/**
* 所有在线玩家的uid数组。用于是否加载玩家数据的判断
*/
public volatile static List<String> uidList = new ArrayList<>();
/**
* 系列名和关卡编号的对应关系
*/
public volatile static Map<String, List<String>> seriesGateNosMap = new ConcurrentHashMap<>();
/**
* 关卡名称和关卡编号对应关系
*/
public volatile static Map<String, String> gateNameToNoMap = new ConcurrentHashMap<>();
/**
* 玩家在系列里的用户数据,Map<系列, Map<uid, 系列数据>>
*/
public volatile static Map<String, Map<String, PlayerSeriesDto>> seriesPlayerMap = new ConcurrentHashMap<>();
/**
* 玩家在关卡里的总声望值,Map<关卡编号, Map<uid, 声望>>
*/
public volatile static Map<String, Map<String, ReputationDto>> gateNoUidReputationMap = new ConcurrentHashMap<>();
/**
* 系列里总声望值降序排列,Map<系列, 声望>
*/
public volatile static Map<String, PriorityBlockingQueue<ReputationDto>> seriesReputationQueueMap = new ConcurrentHashMap<>();
/**
* 系列里总声望值降序排列,Map<关卡编号, 声望>
*/
public volatile static Map<String, PriorityBlockingQueue<ReputationDto>> gateNoReputationQueueMap = new ConcurrentHashMap<>();
/**
* 场所配置信息,Map<系列名称, Map<String, Location>>
*/
public volatile static Map<String, Map<String, Location>> seriesLocationMap = new ConcurrentHashMap<>();
/**
* 线索配置信息,Map<系列名称, Map<Integer, Clue>>
*/
public volatile static Map<String, Map<Integer, Clue>> seriesClueMap = new ConcurrentHashMap<>();
/**
* 线索类型配置信息,Map<系列名称, Map<Integer, String>>
*/
public volatile static Map<String, Map<Integer, String>> seriesClueTypeMap = new ConcurrentHashMap<>();
/**
* 性格配置信息,Map<系列名称, Map<Integer, Disposition>>
*/
public volatile static Map<String, Map<Integer, Disposition>> seriesDispositionMap = new ConcurrentHashMap<>();
/**
* 系统配置信息,Map<系列名称, Map<String, SystemConfigPojo>>
*/
public volatile static Map<String, Map<String, SystemConfigPojo>> seriesSystemConfigMap = new ConcurrentHashMap<>();
/**
* 任务条件配置信息,Map<系列名称, Map<Integer, SystemConfigPojo>>
*/
public volatile static Map<String, Map<Integer, TaskConditionPojo>> seriesTaskConditionMap = new ConcurrentHashMap<>();
/**
* 伙伴物品配置信息,Map<系列名称, Map<uid, PartnerItem>>
*/
public volatile static Map<String, Map<Integer, PartnerItem>> seriesPartnerItemMap = new ConcurrentHashMap<>();
/**
* 背包数量配置信息,Map<系列名称, Map<物品类型, Map<序号, BackpackNum>>>
*/
public volatile static Map<String, Map<Integer, Map<Integer, BackpackNum>>> seriesBackpackNumMap = new ConcurrentHashMap<>();
/**
* 伙伴NPC信息,Map<系列名称, Map<Integer, PersonPojo>>
*/
public volatile static Map<String, Map<Integer, PersonPojo>> seriesPersonMap = new ConcurrentHashMap<>();
/**
* 所有系列的询问模块话术,Map<系列名称, Map<意图, List<话术配置>>>
*/
public volatile static Map<String, Map<String, Map<Integer, List<String>>>> seriesAskSpeechMap = new ConcurrentHashMap<>();
/**
* 关卡的询问模块话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/
public volatile static Map<String, Map<String, Map<Integer, List<String>>>> gateNoAskSpeechMap = new ConcurrentHashMap<>();
/** /**
* 场所配置信息 * 所有系列的任务模块话术,Map<系列名称, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<String, Location> locationMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, Map<Integer, List<String>>>> seriesTaskSpeechMap = new ConcurrentHashMap<>();
/** /**
* 线索配置信息 * 关卡的询问模块话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<Integer, Clue> clueMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, Map<Integer, List<String>>>> gateNoTaskSpeechMap = new ConcurrentHashMap<>();
/** /**
* 线索类型配置信息 * 所有系列的查看模块话术,Map<系列名称, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<Integer, String> clueTypeMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, Map<Integer, List<String>>>> seriesCheckSpeechMap = new ConcurrentHashMap<>();
/** /**
* 需求任务配置信息 * 关卡的查看模块话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<Integer, DemandTask> demandTaskMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, Map<Integer, List<String>>>> gateNoCheckSpeechMap = new ConcurrentHashMap<>();
/** /**
* 性格配置信息 * 所有系列的查看模块话术,Map<系列名称, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<Integer, Disposition> dispositionMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, Map<Integer, List<String>>>> seriesBarrierSpeechMap = new ConcurrentHashMap<>();
/** /**
* 系统配置信息 * 关卡的查看模块话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<String, SystemConfigPojo> systemConfigMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, Map<Integer, List<String>>>> gateNoBarrierSpeechMap = new ConcurrentHashMap<>();
/** /**
* 结局目标配置信息 * 所有系列的查看模块话术,Map<系列名称, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<Integer, EndGoal> endGoalMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, Map<Integer, List<String>>>> seriesPartnerItemSpeechMap = new ConcurrentHashMap<>();
/**
* 关卡的查看模块话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/
public volatile static Map<String, Map<String, Map<Integer, List<String>>>> gateNoPartnerItemSpeechMap = new ConcurrentHashMap<>();
/**
* 所有系列的闲聊模块话术,Map<系列名称, Map<意图, List<话术配置>>>
*/
public volatile static Map<String, Map<Integer, List<ChatSpeech>>> seriesChatSpeechMap = new ConcurrentHashMap<>();
/**
* 关卡的闲聊模块话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/
public volatile static Map<String, Map<Integer, List<ChatSpeech>>> gateNoChatSpeechMap = new ConcurrentHashMap<>();
/**
* 所有系列的线索成功话术,Map<系列名称, Map<意图, List<话术配置>>>
*/
public volatile static Map<String, Map<Integer, List<ClueSpeech>>> seriesSuccessClueSpeechMap = new ConcurrentHashMap<>();
/**
* 关卡的线索成功话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/
public volatile static Map<String, Map<Integer, List<ClueSpeech>>> gateNoSuccessClueSpeechMap = new ConcurrentHashMap<>();
/**
* 所有系列的任务成功话术,Map<系列名称, Map<意图, List<话术配置>>>
*/
public volatile static Map<String, Map<Integer, List<TaskSpeech>>> seriesSuccessTaskSpeechMap = new ConcurrentHashMap<>();
/** /**
* 询问模块话术 * 关卡的任务成功话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<String, Map<Integer, List<String>>> askSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<Integer, List<TaskSpeech>>> gateNoSuccessTaskSpeechMap = new ConcurrentHashMap<>();
/** /**
* 任务模块话术 * 所有系列的任务提示话术,Map<系列名称, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<String, Map<Integer, List<String>>> taskSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<Integer, List<TipSpeech>>> seriesTipSpeechMap = new ConcurrentHashMap<>();
/** /**
* 查看模块话术 * 关卡的任务提示话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<String, Map<Integer, List<String>>> checkSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<Integer, List<TipSpeech>>> gateNoTipSpeechMap = new ConcurrentHashMap<>();
/** /**
* 查看模块话术 * 所有系列的人物见面话术,Map<系列名称, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<String, Map<Integer, List<String>>> barrierSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, List<PersonSpeech>>> seriesPersonSpeechMap = new ConcurrentHashMap<>();
/** /**
* 闲聊模块话术,Map<意图, List<话术配置>> * 关卡的人物见面话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<Integer, List<ChatSpeech>> chatSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<String, List<PersonSpeech>>> gateNoPersonSpeechMap = new ConcurrentHashMap<>();
/** /**
* 线索成功话术,Map<线索id, List<话术配置>> * 所有系列的操作提示话术,Map<系列名称, Map<意图, 话术配置>>
*/ */
public volatile static Map<Integer, List<ClueSpeech>> successClueSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<Integer, OperateSpeech>> seriesOperateSpeechMap = new ConcurrentHashMap<>();
/** /**
* 任务成功话术,Map<任务id, List<话术配置>> * 关卡的操作提示话术,Map<关卡编号, Map<意图, 话术配置>>
*/ */
public volatile static Map<Integer, List<TaskSpeech>> successTaskSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<Integer, OperateSpeech>> gateNoOperateSpeechMap = new ConcurrentHashMap<>();
/** /**
* 任务提示话术,Map<任务id, List<话术配置>> * 所有系列的操作提示话术,Map<系列名称, Map<意图, 话术配置>>
*/ */
public volatile static Map<Integer, List<TipSpeech>> tipSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<Integer, TaskExceptionSpeech>> seriesTaskExceptionSpeechMap = new ConcurrentHashMap<>();
/** /**
* 人物见面话术,Map<人物名称, List<话术配置>> * 关卡的任务异常话术,Map<关卡编号, Map<意图, List<话术配置>>>
*/ */
public volatile static Map<String, List<PersonSpeech>> personSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, Map<Integer, TaskExceptionSpeech>> gateNoTaskExceptionSpeechMap = new ConcurrentHashMap<>();
/**
* 线索前因话术,Map<人物名称, List<话术配置>>
*/
public volatile static Map<Integer, List<PreReasonSpeech>> preReasonSpeechMap = new ConcurrentHashMap<>();
/**
* 通过yaml文件加载所有话术到系列中
*/
public static void speechLoading(String seriesName, String speechFilePath) {
log.info("---------开始加载话术到系列中---------");
Map<String, Map<Integer, List<String>>> askSpeech = new HashMap<>();
Map<String, Map<Integer, List<String>>> taskSpeech = new HashMap<>();
Map<String, Map<Integer, List<String>>> checkSpeech = new HashMap<>();
Map<String, Map<Integer, List<String>>> barrierSpeech = new HashMap<>();
Map<String, Map<Integer, List<String>>> partnerItemSpeech = new HashMap<>();
try {
askSpeech = PersistenceUtil.loadSpeechToMap(speechFilePath,"ask.yaml");
taskSpeech = PersistenceUtil.loadSpeechToMap(speechFilePath,"task.yaml");
checkSpeech = PersistenceUtil.loadSpeechToMap(speechFilePath,"check.yaml");
barrierSpeech = PersistenceUtil.loadSpeechToMap(speechFilePath,"barrier.yaml");
partnerItemSpeech = PersistenceUtil.loadSpeechToMap(speechFilePath,"partnerItem.yaml");
} catch (Exception e) {
e.printStackTrace();
}
seriesAskSpeechMap.put(seriesName, askSpeech);
seriesTaskSpeechMap.put(seriesName, taskSpeech);
seriesCheckSpeechMap.put(seriesName, checkSpeech);
seriesBarrierSpeechMap.put(seriesName, barrierSpeech);
seriesPartnerItemSpeechMap.put(seriesName, partnerItemSpeech);
log.info("---------加载话术到系列的操作完成---------");
}
/** /**
* 通过yaml文件加载所有话术到缓存中 * 通过yaml文件加载所有话术到关卡中
*/ */
public static void speechLoading(String speechFilePath) { public static void speechLoadingToGate(String gateNo, String speechFilePath) {
log.info("---------开始加载话术到缓存中---------"); log.info("---------开始加载话术到关卡中---------");
Map<String, Map<Integer, List<String>>> askSpeech = new HashMap<>(); Map<String, Map<Integer, List<String>>> askSpeech = new HashMap<>();
Map<String, Map<Integer, List<String>>> taskSpeech = new HashMap<>(); Map<String, Map<Integer, List<String>>> taskSpeech = new HashMap<>();
Map<String, Map<Integer, List<String>>> checkSpeech = new HashMap<>(); Map<String, Map<Integer, List<String>>> checkSpeech = new HashMap<>();
...@@ -117,19 +251,20 @@ public class TimingAcquisition { ...@@ -117,19 +251,20 @@ public class TimingAcquisition {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
//JSON转map对象 gateNoAskSpeechMap.put(gateNo, askSpeech);
askSpeechMap.putAll(askSpeech); gateNoTaskSpeechMap.put(gateNo, taskSpeech);
taskSpeechMap.putAll(taskSpeech); gateNoCheckSpeechMap.put(gateNo, checkSpeech);
checkSpeechMap.putAll(checkSpeech); gateNoBarrierSpeechMap.put(gateNo, barrierSpeech);
barrierSpeechMap.putAll(barrierSpeech);
log.info("---------加载话术到缓存的操作完成---------"); log.info("---------加载话术到关卡的操作完成---------");
} }
/** /**
* 通过线索类型获取对应id * 通过线索类型获取对应id
*/ */
public static Integer getClueTypeIdByName(String name) { public static Integer getClueTypeIdByName(String uid, String name) {
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries(); //系列名称
Map<Integer, String> clueTypeMap = seriesClueTypeMap.get(seriesName);
for (Map.Entry<Integer, String> entry : clueTypeMap.entrySet()) { for (Map.Entry<Integer, String> entry : clueTypeMap.entrySet()) {
if (name.equals(entry.getValue())) { if (name.equals(entry.getValue())) {
return entry.getKey(); return entry.getKey();
...@@ -141,7 +276,9 @@ public class TimingAcquisition { ...@@ -141,7 +276,9 @@ public class TimingAcquisition {
/** /**
* 通过场所名称获取对应id * 通过场所名称获取对应id
*/ */
public static String getLocationIdByName(String name) { public static String getLocationIdByName(String uid, String name) {
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries(); //系列名称
Map<String, Location> locationMap = seriesLocationMap.get(seriesName);
for (Map.Entry<String, Location> entry : locationMap.entrySet()) { for (Map.Entry<String, Location> entry : locationMap.entrySet()) {
if (name.equals(entry.getValue().getName())) { if (name.equals(entry.getValue().getName())) {
return entry.getKey(); return entry.getKey();
......
...@@ -3,15 +3,20 @@ package com.qiwu.inference.common.cache; ...@@ -3,15 +3,20 @@ package com.qiwu.inference.common.cache;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.utils.DateUtil; import com.qiwu.inference.common.utils.*;
import com.qiwu.inference.common.utils.PersistenceUtil;
import com.qiwu.inference.dto.Player; import com.qiwu.inference.dto.Player;
import com.qiwu.inference.dto.response.CallResponse;
import com.qiwu.inference.factory.RemoteCallFactory;
import lombok.SneakyThrows;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.Map; import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** /**
...@@ -20,8 +25,22 @@ import java.util.concurrent.TimeUnit; ...@@ -20,8 +25,22 @@ import java.util.concurrent.TimeUnit;
@EnableAsync @EnableAsync
@Component @Component
public class ExpireThread implements Runnable{ public class ExpireThread implements Runnable{
Logger log = LoggerFactory.getLogger(ExpireThread.class);
//用户数据路径
public static String userFilePath;
@Value("${userFilePath}") @Value("${userFilePath}")
private String userFilePath; public void setUserFilePath(String userFilePath) {
ExpireThread.userFilePath = userFilePath;
}
//redis的key过期时间
public static String redisExpireTime;
@Value("${redisExpireTime}")
public void setRedisExpireTime(String redisExpireTime) {
ExpireThread.redisExpireTime = redisExpireTime;
}
@Autowired
private RedisUtil redisUtil;
@Override @Override
public void run() { public void run() {
...@@ -38,26 +57,47 @@ public class ExpireThread implements Runnable{ ...@@ -38,26 +57,47 @@ public class ExpireThread implements Runnable{
/** /**
* 清除全局缓存对象中过期缓存 * 清除全局缓存对象中过期缓存
*/ */
public void expireCache() { public void expireCache() throws IOException {
for (String key : CacheGlobal.concurrentMap.keySet()) { for (String key : CacheGlobal.concurrentMap.keySet()) {
MyCache myCache = CacheGlobal.concurrentMap.get(key); MyCache myCache = CacheGlobal.concurrentMap.get(key);
long timeoutTime = System.currentTimeMillis() - myCache.getWriteTime(); long timeoutTime = System.currentTimeMillis() - myCache.getWriteTime();
//未过期
if (timeoutTime < myCache.getExpireTime()) { if (timeoutTime < myCache.getExpireTime()) {
//---redis中该用户的汇总信息续期---
if (key.contains("%#%online%#%")) {
String uid = key.replace("%#%online%#%", "");
Player player = TimingAcquisition.playerMap.get(uid);
if (!StringUtils.isEmpty(player)) {
String series = player.getSeries();
String k = series + "::"+ uid;
redisUtil = SpringContextUtil.getApplicationContext().getBean(RedisUtil.class);
//玩家该系列的汇总数据过期,延长时间
if (!redisUtil.keyIsExists(k)) {
//该用户续期
redisUtil.renewalStr(k, Long.parseLong(redisExpireTime), TimeUnit.MILLISECONDS);
}
}
}
continue; continue;
} }
//规定时间内玩家无操作默认下线 //规定时间内玩家无操作默认下线
if (key.contains("%#%online%#%")) { if (key.contains("%#%online%#%")) {
String uid = key.replace("%#%online%#%", ""); String uid = key.replace("%#%online%#%", "");
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
//更新玩家为离线状态 if (!StringUtils.isEmpty(player)) {
player.setStatus(Constants.OFFLINE); if (player.getStatus() == Constants.ONLINE) {
//修改下线时间 String initMoney = TimingAcquisition.seriesSystemConfigMap.get(player.getSeries()).get("init_money").getValue();
player.setOfflineTime(DateUtil.getCurrentTime()); if (StringUtils.isEmpty(initMoney)) {
//--------------持久化该园丁信息--------------- String series = player.getSeries();
Map<String, Player> playerMap = new ConcurrentHashMap<>(); if (!StringUtils.isEmpty(TimingAcquisition.seriesPlayerMap.get(series))) {
playerMap.put(uid, TimingAcquisition.playerMap.get(uid)); //-----------存入redis缓存中-------------
String playerStr = JSON.toJSONString(playerMap); redisUtil.setStr(series + "::"+ uid, JSON.toJSONString(TimingAcquisition.seriesPlayerMap.get(series).get(uid)));
PersistenceUtil.saveDataToFile(userFilePath, uid, playerStr); RemoteCallFactory.getInstance().updateItems(uid, "gardenSys");
}
}
}
PlayerUtil.offLine(uid);
}
} }
//清除过期缓存 //清除过期缓存
CacheGlobal.concurrentMap.remove(key); CacheGlobal.concurrentMap.remove(key);
......
...@@ -37,9 +37,10 @@ public class TaskTipsThread implements Runnable{ ...@@ -37,9 +37,10 @@ public class TaskTipsThread implements Runnable{
public void checkTaskTips() throws ParseException { public void checkTaskTips() throws ParseException {
Map<String, Player> playerMap = TimingAcquisition.playerMap; Map<String, Player> playerMap = TimingAcquisition.playerMap;
String nowTime = DateUtil.getCurrentTime(); String nowTime = DateUtil.getCurrentTime();
String tipTime = TimingAcquisition.systemConfigMap.get("tipTime").getValue();
for (Map.Entry<String, Player> entry : playerMap.entrySet()) { for (Map.Entry<String, Player> entry : playerMap.entrySet()) {
Player player = entry.getValue(); Player player = entry.getValue();
String seriesName = player.getSeries(); //系列名称
String tipTime = TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("tipTime").getValue();
//在线玩家 //在线玩家
if (player.getStatus().equals(Constants.ONLINE)) { if (player.getStatus().equals(Constants.ONLINE)) {
//上次提示时间已超过规定时间 //上次提示时间已超过规定时间
......
package com.qiwu.inference.common.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
@Configuration
public class RedisConfig extends CachingConfigurerSupport {
@Bean
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(redisConnectionFactory);
Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.activateDefaultTyping(LaissezFaireSubTypeValidator.instance ,
ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);
jackson2JsonRedisSerializer.setObjectMapper(om);
StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
// key采用String的序列化方式
redisTemplate.setKeySerializer(stringRedisSerializer);
// hash的key也采用String的序列化方式
redisTemplate.setHashKeySerializer(stringRedisSerializer);
// value序列化方式采用jackson
redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
// hash的value序列化方式采用jackson
redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);
redisTemplate.afterPropertiesSet();
return redisTemplate;
}
@Bean
public StringRedisTemplate stringRedisTemplate(RedisConnectionFactory redisConnectionFactory){
StringRedisTemplate stringRedisTemplate = new StringRedisTemplate();
stringRedisTemplate.setConnectionFactory(redisConnectionFactory);
return stringRedisTemplate;
}
}
package com.qiwu.inference.common.config;
import jodd.util.concurrent.ThreadFactoryBuilder;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import java.util.concurrent.*;
@Configuration
@EnableAsync
public class ThreadPoolConfig {
@Bean(value = "threadPoolInstance")
public Executor myThreadPool() {
//核心线程数
int corePoolSize = 5;
//最大线程数
int maxPoolSize = 7;
//设置工作队列大小
int queueCapacity = 1000;
//最大存活时间
long keepAliveTime = 30;
//设置线程名称前缀
String threadNamePrefix = "threadPool-->";
//设置自定义拒绝策略
RejectedExecutionHandler rejectedExecutionHandler = new RejectedExecutionHandler() {
@Override
public void rejectedExecution(Runnable runnable, ThreadPoolExecutor threadPoolExecutor) {
throw new RuntimeException("线程数已超过最大线程数");
}
};
//自定义线程工厂
ThreadFactory threadFactory = new ThreadFactory() {
private int i = 1;
@Override
public Thread newThread(@NotNull Runnable runnable) {
Thread thread = new Thread(runnable);
thread.setName(threadNamePrefix + i);
i++;
return thread;
}
};
//初始化线程
return new ThreadPoolExecutor(corePoolSize, maxPoolSize, keepAliveTime,
TimeUnit.SECONDS, new LinkedBlockingQueue<>(queueCapacity), threadFactory, rejectedExecutionHandler);
}
}
...@@ -22,7 +22,7 @@ public class CacheUtil { ...@@ -22,7 +22,7 @@ public class CacheUtil {
MyCache myCache = CacheGlobal.concurrentMap.get(key); MyCache myCache = CacheGlobal.concurrentMap.get(key);
myCache.setHitCount(myCache.getHitCount() + 1); myCache.setHitCount(myCache.getHitCount() + 1);
myCache.setLastTime(System.currentTimeMillis()); myCache.setLastTime(System.currentTimeMillis());
myCache.setExpireTime(System.currentTimeMillis()); myCache.setExpireTime(expire);
myCache.setValue(value); myCache.setValue(value);
} else { } else {
MyCache myCache = new MyCache(); MyCache myCache = new MyCache();
......
package com.qiwu.inference.common.utils;
import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.dto.ItemDto;
import com.qiwu.inference.dto.ItemNumDto;
import com.qiwu.inference.dto.PartnerItemDto;
import com.qiwu.inference.dto.PlayerSeriesDto;
import com.qiwu.inference.pojo.BackpackNum;
import com.qiwu.inference.pojo.PartnerItem;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.*;
@Component
public class ConfigDataUtil {
/**
* 人数上限增加的下一声望值
*/
public static BackpackNum getNextPartnerNum(String uid) {
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
//当前伙伴数量上限
int partnerNumMax = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getPartnerItemMap().get(Constants.ITEM_PARTNER).getMax();
Map<Integer, BackpackNum> partnerNumMap = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(Constants.ITEM_PARTNER);
for (Map.Entry<Integer, BackpackNum> entry : partnerNumMap.entrySet()) {
BackpackNum partnerNum = entry.getValue();
if (partnerNum.getMax() > partnerNumMax) {
return partnerNum;
}
}
return null;
}
/**
* 当前声望值对应的伙伴人数上限。返回-1表示不用更新
*/
public static int getPartnerNumMax(String uid) {
int result = -1;
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
PlayerSeriesDto playerSeries = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid);
//玩家当前人数上限
if (StringUtils.isEmpty(playerSeries.getPartnerItemMap().get(Constants.ITEM_PARTNER))) {
PartnerItemDto partnerItemDto =new PartnerItemDto();
int max = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(Constants.ITEM_PARTNER).get(1).getMax();
partnerItemDto.setMax(max);
partnerItemDto.setItemInfoMap(new HashMap<>());
playerSeries.getPartnerItemMap().put(Constants.ITEM_PARTNER, partnerItemDto);
}
int partnerNumMax = playerSeries.getPartnerItemMap().get(Constants.ITEM_PARTNER).getMax();
//玩家当前声望值
Integer reputation = playerSeries.getTotalReputation().getReputation();
int id = 0;
//伙伴人数上限配置
Map<Integer, BackpackNum> partnerNumMap = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(Constants.ITEM_PARTNER);
for (Map.Entry<Integer, BackpackNum> entry : partnerNumMap.entrySet()) {
BackpackNum partnerNum = entry.getValue();
if (partnerNum.getMax().equals(partnerNumMax)) {
id = entry.getKey();
break;
}
}
if (id == partnerNumMap.size()) {
return result;
}
if (partnerNumMap.get(id + 1).getReputation() > reputation) {
return result;
}
return partnerNumMap.get(id + 1).getMax();
}
/**
* 背包道具上限增加的下一声望值
*/
public static BackpackNum getNextItemNum(String uid) {
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
//当前道具数量上限
int itemNumMax = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getPartnerItemMap().get(Constants.ITEM_PROPS).getMax();
Map<Integer, BackpackNum> propNumMap = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(Constants.ITEM_PROPS);
for (Map.Entry<Integer, BackpackNum> entry : propNumMap.entrySet()) {
BackpackNum propNum = entry.getValue();
if (propNum.getMax() > itemNumMax) {
return propNum;
}
}
return null;
}
/**
* 当前声望值对应的背包道具数量上限。返回-1表示不用更新
*/
public static int getItemNumMax(String uid) {
int result = -1;
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
PlayerSeriesDto playerSeries = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid);
//玩家当前人数上限
if (StringUtils.isEmpty(playerSeries.getPartnerItemMap().get(Constants.ITEM_PROPS))) {
PartnerItemDto partnerItemDto = new PartnerItemDto();
int max = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(Constants.ITEM_PROPS).get(1).getMax();
partnerItemDto.setMax(max);
partnerItemDto.setItemInfoMap(new HashMap<>());
playerSeries.getPartnerItemMap().put(Constants.ITEM_PROPS, partnerItemDto);
}
//玩家当前背包道具上限
int itemNumMax = playerSeries.getPartnerItemMap().get(Constants.ITEM_PROPS).getMax();
//玩家当前声望值
Integer reputation = playerSeries.getTotalReputation().getReputation();
int id = 0;
//背包上限配置
Map<Integer, BackpackNum> propNumMap = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(Constants.ITEM_PROPS);
for (Map.Entry<Integer, BackpackNum> entry : propNumMap.entrySet()) {
BackpackNum propNum = entry.getValue();
if (propNum.getMax().equals(itemNumMax)) {
id = entry.getKey();
break;
}
}
if (id == propNumMap.size()) {
return result;
}
if (propNumMap.get(id + 1).getReputation() > reputation) {
return result;
}
result = propNumMap.get(id + 1).getMax();
return result;
}
/**
* 根据NPC名称找到对应伙伴ID
* @param uid
* @param name
*/
public static Integer getPartnerItemIdByName(String uid, String name) {
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
Map<Integer, PartnerItem> partnerMap = TimingAcquisition.seriesPartnerItemMap.get(seriesName);
for (Map.Entry<Integer, PartnerItem> entry : partnerMap.entrySet()) {
if (name.equals(entry.getValue().getName())) {
return entry.getValue().getId();
}
}
return Constants.REQ_NON;
}
/**
* 获取伙伴的名称
*/
public static String getPartnerItemName(String uid, Integer partnerItemId) {
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
return TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(partnerItemId).getName();
}
/**
* 获取已加入伙伴的名称
*/
public static String getPartnerNames(String uid) {
StringBuilder result = new StringBuilder();
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
if (StringUtils.isEmpty(TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getPartnerItemMap().get(Constants.ITEM_PARTNER))) {
return result.toString();
}
Map<Integer, ItemNumDto> partnerNumMap = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getPartnerItemMap().
get(Constants.ITEM_PARTNER).getItemInfoMap();
for (Map.Entry<Integer, ItemNumDto> entry : partnerNumMap.entrySet()) {
result.append(getPartnerItemName(uid, entry.getKey())).append("、");
}
if (result.length() != 0) {
result.deleteCharAt(result.length() - 1);
}
return result.toString();
}
/**
* 掉落物品是否已拥有
*/
public static Boolean checkItemExist(String uid, Integer partnerItemId) {
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
//伙伴物品配置数据
PartnerItem partnerItem = TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(partnerItemId);
//物品类型
int type = partnerItem.getType();
//系列的玩家汇总数据
Map<Integer, PartnerItemDto> partnerItemMap = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getPartnerItemMap();
//没有这类物品
if (StringUtils.isEmpty(partnerItemMap.get(type))) {
return false;
}
int max = partnerItemMap.get(type).getMax();
Map<Integer, ItemNumDto> itemInfoMap = partnerItemMap.get(type).getItemInfoMap();
//对应的包已满
if (itemInfoMap.size() >= max) {
return false;
}
//已有该物品
if (!StringUtils.isEmpty(itemInfoMap.get(partnerItemId))) {
//伙伴和道具有且仅有一个
if (type == Constants.ITEM_PARTNER || type == Constants.ITEM_PROPS) {
return false;
}
}
return true;
}
/**
* 根据概率掉落获得
*/
public static Boolean getPartnerItemByPro(String uid, Integer partnerItemId) {
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
//伙伴物品配置数据
PartnerItem partnerItem = TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(partnerItemId);
//掉落概率
Double prob = partnerItem.getProbability();
Random random = new Random();
double randomProb = random.nextDouble();
if (randomProb <= prob) {
return true;
}
return false;
}
/**
* 伙伴/物品掉落
*/
public static Map<Integer, Integer> getDropItems(String uid, String drops) {
Map<Integer, Integer> result = new HashMap<>();
String[] dropList = drops.split(";");
for (String drop : dropList) {
String[] dropNum = drop.split("\\|");
//--------------背包中还没有该物品---------------
if (!checkItemExist(uid, Integer.valueOf(dropNum[0]))) {
//是否掉落该物品
if (getPartnerItemByPro(uid, Integer.valueOf(dropNum[0]))) {
result.put(Integer.valueOf(dropNum[0]), Integer.valueOf(dropNum[1]));
}
}
}
return result;
}
/**
* 获取关卡已有的物品
* @param uid
* @param items
* @return
*/
public static Map<Integer, PartnerItemDto> getItemMap(String uid, List<ItemDto> items) {
Map<Integer, PartnerItemDto> partnerItemMap = new HashMap<>();
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
Map<Integer, PartnerItem> partnerItemPojoMap = TimingAcquisition.seriesPartnerItemMap.get(seriesName);
if (items.size() > 0) {
//遍历所有物品
for (ItemDto item : items) {
//关卡有该物品
if (!StringUtils.isEmpty(partnerItemPojoMap.get(item.getItemId()))) {
Integer type = partnerItemPojoMap.get(item.getItemId()).getType();
//物品类型数量上限
int itemNumMax = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(type).get(1).getMax();
//还没有这类物品
if (StringUtils.isEmpty(partnerItemMap.get(type))) {
PartnerItemDto partnerItem = new PartnerItemDto();
Map<Integer, ItemNumDto> itemInfoMap = new HashMap<>();
ItemNumDto itemNumDto = new ItemNumDto();
partnerItem.setMax(itemNumMax);
itemNumDto.setId(item.getItemId());
itemNumDto.setNum(item.getItemNum());
itemInfoMap.put(item.getItemId(), itemNumDto);
partnerItem.setItemInfoMap(itemInfoMap);
partnerItemMap.put(type, partnerItem);
continue;
}
if (partnerItemMap.get(type).getItemInfoMap().size() >= itemNumMax) {
continue;
}
ItemNumDto itemNumDto = new ItemNumDto();
itemNumDto.setId(item.getItemId());
itemNumDto.setNum(item.getItemNum());
partnerItemMap.get(type).getItemInfoMap().put(item.getItemId(), itemNumDto);
}
}
}
return partnerItemMap;
}
/**
* 关卡同步背包物品的数据
*/
public static void synItems(String uid, List<ItemDto> itemList) {
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
Map<Integer, PartnerItem> partnerItemPojoMap = TimingAcquisition.seriesPartnerItemMap.get(seriesName);
Map<Integer, PartnerItemDto> partnerItemMap = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getPartnerItemMap();
if (itemList.size() != 0) {
for (ItemDto item : itemList) {
PartnerItem partnerItemPojo = partnerItemPojoMap.get(item.getItemId());
//关卡中没有该物品
if (StringUtils.isEmpty(partnerItemPojo)) {
continue;
}
Integer type = partnerItemPojo.getType();
PartnerItemDto partnerItem = partnerItemMap.get(type);
//背包中没有这类物品
if (StringUtils.isEmpty(partnerItem)) {
PartnerItemDto partnerItemNew = new PartnerItemDto();
Map<Integer, ItemNumDto> itemInfoMap = new HashMap<>();
ItemNumDto itemNumDto = new ItemNumDto();
//物品类型数量初始上限
int itemNumMax = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(type).get(1).getMax();
partnerItemNew.setMax(itemNumMax);
itemNumDto.setId(item.getItemId());
itemNumDto.setNum(item.getItemNum());
itemInfoMap.put(item.getItemId(), itemNumDto);
partnerItemNew.setItemInfoMap(itemInfoMap);
continue;
}
//该类物品的上限
int numMax = partnerItem.getMax();
Map<Integer, ItemNumDto> itemInfoMap = partnerItem.getItemInfoMap();
//该类物品已达到上限
if (itemInfoMap.size() >= numMax) {
continue;
}
//还没有该物品
if (StringUtils.isEmpty(itemInfoMap.get(item.getItemId()))) {
ItemNumDto itemNumDto = new ItemNumDto();
itemNumDto.setId(item.getItemId());
itemNumDto.setNum(item.getItemNum());
itemInfoMap.put(item.getItemId(), itemNumDto);
continue;
}
ItemNumDto itemNum = itemInfoMap.get(item.getItemId());
//物品数量变动,更新数据
if (!itemNum.getNum().equals(item.getItemNum())) {
itemNum.setNum(item.getItemNum());
}
}
}
}
}
package com.qiwu.inference.common.utils;
import com.opencsv.CSVReader;
import com.opencsv.bean.CsvToBeanBuilder;
import com.opencsv.bean.CsvToBeanFilter;
import com.opencsv.bean.HeaderColumnNameMappingStrategy;
import org.springframework.util.StringUtils;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.List;
public class CsvUtil<T> {
public List<T> read(String filePath, Class<T> clazz) {
try {
CSVReader reader = new CSVReader(new InputStreamReader(new FileInputStream(filePath), StandardCharsets.UTF_8));
HeaderColumnNameMappingStrategy<T> mapper = new HeaderColumnNameMappingStrategy<>();
mapper.setType(clazz);
return new CsvToBeanBuilder<T>(reader)
.withMappingStrategy(mapper)
.withIgnoreLeadingWhiteSpace(true)
.withFilter(new MyFilter())
.build()
.parse();
} catch (FileNotFoundException e) {
e.printStackTrace();
System.out.printf("csv文件: {%s} 读取异常%n", filePath);
}
return null;
}
private static class MyFilter implements CsvToBeanFilter {
public boolean allowLine(String[] line) {
String id = line[0];
return !StringUtils.isEmpty(id) && !id.equals("");
}
}
}
...@@ -79,7 +79,22 @@ public class DataTrimUtil { ...@@ -79,7 +79,22 @@ public class DataTrimUtil {
if (StringUtils.isEmpty(data.getVars().get后台附加返回2())) { if (StringUtils.isEmpty(data.getVars().get后台附加返回2())) {
data.getVars().set后台附加返回2("无效返回"); data.getVars().set后台附加返回2("无效返回");
} }
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
//搭档名称
String partnerName = TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("partnerName").getValue();
//替换话术词汇
String text = data.getVars().get反馈文本();
if (!StringUtils.isEmpty(text)) {
//替换话术的【搭档名称@正常】
if (text.contains("【搭档名称@正常】")) {
text = text.replace("【搭档名称@正常】", "【" + partnerName + "@正常】");
}
//替换话术的【搭档名称】
if (text.contains("【搭档名称】")) {
text = text.replace("【搭档名称】", partnerName);
}
data.getVars().set反馈文本(text);
}
String feedContent = "后台返回参数 = [" + String feedContent = "后台返回参数 = [" +
"code:" + result.getCode() + "code:" + result.getCode() +
", msg:" + result.getMessage() + ", msg:" + result.getMessage() +
...@@ -90,10 +105,13 @@ public class DataTrimUtil { ...@@ -90,10 +105,13 @@ public class DataTrimUtil {
"]"; "]";
//需要给玩家提示任务线索 //需要给玩家提示任务线索
// if (TimingAcquisition.playerMap.get(uid).isTipFlag()) { // if (TimingAcquisition.playerMap.get(uid).isTipFlag()) {
// //搭档名称
// String partnerName = TimingAcquisition.systemConfigMap.get("partnerName").getValue();
// String addText = PlayerUtil.getClueFromTaskKey(uid); // String addText = PlayerUtil.getClueFromTaskKey(uid);
// addText = SpeechUtil.addHeader(addText, partnerName);
// if (!StringUtils.isEmpty(addText)) { // if (!StringUtils.isEmpty(addText)) {
// TimingAcquisition.playerMap.get(uid).setTipFlag(false); // TimingAcquisition.playerMap.get(uid).setTipFlag(false);
// data.getVars().set反馈文本(data.getVars().get反馈文本() + "【寒烟@正常】" + addText); // data.getVars().set反馈文本(data.getVars().get反馈文本() + addText);
// } // }
// } // }
log.info(feedContent); log.info(feedContent);
......
package com.qiwu.inference.common.utils; package com.qiwu.inference.common.utils;
import java.io.File; import com.qiwu.inference.pojo.*;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class FileUtil { public class FileUtil {
/**
* 加载系列的场所表
*/
public static Map<String, Location> getLocationModel(String filePath) {
String locationPath = filePath + "location.csv";
CsvUtil<Location> csvUtil = new CsvUtil<>();
List<Location> locationList = csvUtil.read(locationPath, Location.class);
Map<String, Location> locationMap = new ConcurrentHashMap<>();
for (Location location : locationList) {
locationMap.put(location.getId().toString(), location);
}
return locationMap;
}
/**
* 加载系列的线索表
*/
public static Map<Integer, Clue> getClueModel(String filePath) {
String cluePath = filePath + "clue.csv";
CsvUtil<Clue> csvUtil = new CsvUtil<>();
List<Clue> clueList = csvUtil.read(cluePath, Clue.class);
Map<Integer, Clue> clueMap = new ConcurrentHashMap<>();
for (Clue clue : clueList) {
clueMap.put(clue.getId(), clue);
}
return clueMap;
}
public static InputStream getResourcesFileInputStream(String fileName) { /**
return Thread.currentThread().getContextClassLoader().getResourceAsStream("" + fileName); * 加载系列的线索表
*/
public static Map<Integer, String> getClueTypeModel(String filePath) {
String clueTypePath = filePath + "clueType.csv";
CsvUtil<ClueType> csvUtil = new CsvUtil<>();
List<ClueType> clueTypeList = csvUtil.read(clueTypePath, ClueType.class);
Map<Integer, String> clueTypeMap = new ConcurrentHashMap<>();
for (ClueType clueType : clueTypeList) {
clueTypeMap.put(clueType.getId(), clueType.getName());
}
return clueTypeMap;
} }
public static String getPath() { /**
return FileUtil.class.getResource("/").getPath(); * 加载系列的性格表
*/
public static Map<Integer, Disposition> getDispositionModel(String filePath) {
String dispositionPath = filePath + "disposition.csv";
CsvUtil<Disposition> csvUtil = new CsvUtil<>();
List<Disposition> dispositionList = csvUtil.read(dispositionPath, Disposition.class);
Map<Integer, Disposition> dispositionMap = new ConcurrentHashMap<>();
for (Disposition disposition : dispositionList) {
dispositionMap.put(disposition.getId(), disposition);
}
return dispositionMap;
} }
public static File createNewFile(String pathName) { /**
File file = new File(getPath() + pathName); * 加载系列的系统配置表
if (file.exists()) { */
file.delete(); public static Map<String, SystemConfigPojo> getSystemConfigModel(String filePath) {
} else { String systemConfigPath = filePath + "systemConfig.csv";
if (!file.getParentFile().exists()) { CsvUtil<SystemConfigPojo> csvUtil = new CsvUtil<>();
file.getParentFile().mkdirs(); List<SystemConfigPojo> systemConfigList = csvUtil.read(systemConfigPath, SystemConfigPojo.class);
} Map<String, SystemConfigPojo> systemConfigMap = new ConcurrentHashMap<>();
for (SystemConfigPojo systemConfig : systemConfigList) {
systemConfigMap.put(systemConfig.getName(), systemConfig);
} }
return file; return systemConfigMap;
} }
public static File readFile(String pathName) { /**
return new File(getPath() + pathName); * 加载任务条件和操作id,以及类型对应表
*/
public static Map<Integer, TaskConditionPojo> getTaskConditionModel(String filePath) {
String taskConditionPath = filePath + "taskCondition.csv";
CsvUtil<TaskConditionPojo> csvUtil = new CsvUtil<>();
List<TaskConditionPojo> taskConditionList = csvUtil.read(taskConditionPath, TaskConditionPojo.class);
Map<Integer, TaskConditionPojo> taskConditionMap = new ConcurrentHashMap<>();
for (TaskConditionPojo taskCondition : taskConditionList) {
taskConditionMap.put(taskCondition.getId(), taskCondition);
}
return taskConditionMap;
}
/**
* 加载伙伴配置表
*/
public static Map<Integer, PartnerItem> getPartnerItemModel(String filePath) {
String partnerItemPath = filePath + "partnerItem.csv";
CsvUtil<PartnerItem> csvUtil = new CsvUtil<>();
List<PartnerItem> partnerItemList = csvUtil.read(partnerItemPath, PartnerItem.class);
Map<Integer, PartnerItem> partnerItemMap = new ConcurrentHashMap<>();
for (PartnerItem partnerItem : partnerItemList) {
partnerItemMap.put(partnerItem.getId(), partnerItem);
}
return partnerItemMap;
} }
public static File readUserHomeFile(String pathName) { /**
return new File(System.getProperty("user.home") + File.separator + pathName); * 加载伙伴人数上限表
*/
public static Map<Integer, BackpackNum> getPartnerNumModel(String filePath) {
String partnerNumPath = filePath + "partnerNum.csv";
CsvUtil<BackpackNum> csvUtil = new CsvUtil<>();
List<BackpackNum> partnerNumList = csvUtil.read(partnerNumPath, BackpackNum.class);
Map<Integer, BackpackNum> partnerNumMap = new ConcurrentHashMap<>();
for (BackpackNum partnerNum : partnerNumList) {
partnerNumMap.put(partnerNum.getId(), partnerNum);
}
return partnerNumMap;
}
/**
* 加载背包数量上限表
*/
public static Map<Integer, BackpackNum> getBackpackNumModel(String filePath) {
String propNumPath = filePath + "propNum.csv";
CsvUtil<BackpackNum> csvUtil = new CsvUtil<>();
List<BackpackNum> propNumList = csvUtil.read(propNumPath, BackpackNum.class);
Map<Integer, BackpackNum> propNumMap = new ConcurrentHashMap<>();
for (BackpackNum propNum : propNumList) {
propNumMap.put(propNum.getId(), propNum);
}
return propNumMap;
}
/**
* 加载普通数量上限表
*/
public static Map<Integer, BackpackNum> getItemNumModel(String filePath) {
String itemNumPath = filePath + "itemNum.csv";
CsvUtil<BackpackNum> csvUtil = new CsvUtil<>();
List<BackpackNum> itemNumList = csvUtil.read(itemNumPath, BackpackNum.class);
Map<Integer, BackpackNum> itemNumMap = new ConcurrentHashMap<>();
for (BackpackNum itemNum : itemNumList) {
itemNumMap.put(itemNum.getId(), itemNum);
}
return itemNumMap;
}
/**
* 加载NPC配置表
*/
public static Map<Integer, PersonPojo> getPersonModel(String filePath) {
String personPath = filePath + "person.csv";
CsvUtil<PersonPojo> csvUtil = new CsvUtil<>();
List<PersonPojo> personList = csvUtil.read(personPath, PersonPojo.class);
Map<Integer, PersonPojo> personMap = new ConcurrentHashMap<>();
for (PersonPojo person : personList) {
personMap.put(person.getId(), person);
}
return personMap;
} }
} }
package com.qiwu.inference.common.utils;
import com.qiwu.inference.common.cache.ExpireThread;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@Component
public class MD5Util {
//玩家数据路径
public static String userFilePath;
@Value("${userFilePath}")
public void setUserFilePath(String userFilePath) {
MD5Util.userFilePath = userFilePath;
}
//玩家系列汇总数据路径
public static String dataFilePath;
@Value("${dataFilePath}")
public void setDataFilePath(String dataFilePath) {
MD5Util.dataFilePath = dataFilePath;
}
/**
* 使用md5进行加密
*/
public static String md5(String text) {
byte[] secretBytes = null;
try {
secretBytes = MessageDigest.getInstance("md5").digest(text.getBytes());
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("没有md5的算法");
}
StringBuilder sb = new StringBuilder(40);
for(byte x:secretBytes) {
if((x & 0xff)>>4 == 0) {
sb.append("0").append(Integer.toHexString(x & 0xff));
} else {
sb.append(Integer.toHexString(x & 0xff));
}
}
return sb.toString();
}
/**
* 将uid转成对应的路径
*/
public static String changeToPath(String uid, String seriesName) {
//创建玩家数据路径
String md5 = md5(uid);
String front = md5.substring(0,2);
String second = md5.substring(2, 4);
String three = md5.substring(4, 6);
return userFilePath + "/" + front + "/" + second+ "/" + three+ "/" + uid + "/" + seriesName + "/";
}
/**
* 将uid转成系列汇总数据的路径
*/
public static String changeToDataPath(String uid, String seriesName) {
//创建玩家数据路径
String md5 = md5(uid);
String front = md5.substring(0,2);
String second = md5.substring(2, 4);
String three = md5.substring(4, 6);
return dataFilePath+ "/" + seriesName + "/" + front + "/" + second+ "/" + three+ "/";
}
public static void main(String[] args) {
String uid = "Test12321211123";
System.out.println("路径是:" + changeToPath(uid, "测试"));
}
}
package com.qiwu.inference.common.utils; package com.qiwu.inference.common.utils;
import org.springframework.beans.factory.annotation.Value; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.dto.*;
import com.qiwu.inference.pojo.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.Yaml;
import java.io.*; import java.io.*;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.PriorityBlockingQueue;
public class PersistenceUtil { public class PersistenceUtil {
static Logger log = LoggerFactory.getLogger(PersistenceUtil.class);
/** /**
* 保存玩家数据到json文件 * 保存玩家数据到json文件
* @param fileName * @param fileName
...@@ -16,45 +28,143 @@ public class PersistenceUtil { ...@@ -16,45 +28,143 @@ public class PersistenceUtil {
* @return void * @return void
*/ */
public static void saveDataToFile(String path, String fileName, String data) { public static void saveDataToFile(String path, String fileName, String data) {
BufferedWriter writer = null; FileWriter fw = null;
File file = new File(path + fileName + ".json"); File file = new File(path);
if (!file.exists()) { if (!file.exists()) {
try { try {
file.createNewFile(); file.mkdirs();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
try { try {
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, false), "UTF-8")); fw = new FileWriter(path + "/" + fileName + ".json", false);
writer.write(data); fw.write(data);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
try { try {
if (writer != null) { if (fw != null) {
writer.close(); fw.close();
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
/** /**
* 从json文件中读取玩家数据 * 从配置文件夹的关卡中读取关卡数据和关卡话术
* @param filePath * @param filePath
* @return String * @return String
*/ */
public static String getDataFromFile(String filePath) { public static void getDataFromFile(String filePath) {
BufferedReader reader = null; BufferedReader reader = null;
String lastStr = ""; File file = new File(filePath);
try { try {
FileInputStream fileInputStream = new FileInputStream(filePath); if (file.exists()) {
InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8"); File[] fileList = file.listFiles();
reader = new BufferedReader(inputStreamReader); if (!StringUtils.isEmpty(fileList)) {
String stringTmp = null; if (fileList.length != 0) {
while ((stringTmp = reader.readLine()) != null) { //遍历所有系列名称
lastStr += stringTmp; for (File series : fileList) {
String seriesName = series.getName(); //系列名称
String gateFilePath = series.getAbsolutePath() + "/关卡数据/"; //关卡数据路径
File gateFile = new File(gateFilePath); //关卡数据目录下的所有关卡
File[] gateNosList = gateFile.listFiles(); //所有关卡目录
List<String> gateNoList = new ArrayList<>(); //记录该系列所有的关卡编号
if (!StringUtils.isEmpty(gateNosList)) {
//遍历系列下的所有目录
for (File value : gateNosList) {
String gateName = value.getName(); //关卡名称
StringBuilder result = new StringBuilder();
FileInputStream fileInputStream = new FileInputStream(value.getAbsolutePath() + "/data/results.json");
InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8");
reader = new BufferedReader(inputStreamReader);
String stringTmp = null;
while ((stringTmp = reader.readLine()) != null) {
result.append(stringTmp);
}
Map<String, List<Person>> gateInfoMap = JSON.parseObject(result.toString(), new TypeReference<Map<String, List<Person>>>(){});
TimingAcquisition.gateInfoMap.putAll(gateInfoMap);
//-------------------------缓存关卡攻略数据---------------------
String gateNo = null;
for (Map.Entry<String, List<Person>> entry : gateInfoMap.entrySet()) {
gateNo = entry.getKey();
}
gateNoList.add(gateNo);
//缓存关卡名称和编号的对应关系
TimingAcquisition.gateNameToNoMap.put(gateName, gateNo);
log.info("开始缓存关卡攻略数据");
String barrierTaskKey = getConfigFromFile(value.getAbsolutePath() + "/data/", "results_final_task.json");
List<BarrierTaskKeyDto> barrierTaskKeyList = JSON.parseObject(barrierTaskKey, new TypeReference<List<BarrierTaskKeyDto>>(){});
Map<String, List<BarrierTaskKeyDto>> barrierTaskKeyMap = new ConcurrentHashMap<>();
barrierTaskKeyMap.put(gateNo, barrierTaskKeyList);
TimingAcquisition.barrierTaskKeyMap.putAll(barrierTaskKeyMap);
log.info("关卡攻略数据缓存完成");
String speechFilePath = value.getAbsolutePath() + "/speech/";
File speechFile = new File(speechFilePath);
if (speechFile.exists()) {
File[] speechFileList = speechFile.listFiles(); //所有配置的话术
if (!StringUtils.isEmpty(speechFileList)) {
if (speechFileList.length != 0) {
//--------------------加载后台配置的话术到关卡中-----------------
TimingAcquisition.speechLoadingToGate(gateNo, speechFilePath);
//--------------------加载闲聊话术到关卡中----------------
log.info("加载闲聊话术到关卡中");
Map<Integer, List<ChatSpeech>> chatSpeechMap = SpeechUtil.getChatSpeechModel(speechFilePath);
TimingAcquisition.gateNoChatSpeechMap.put(gateNo, chatSpeechMap);
log.info("闲聊话术加载到关卡中完成");
//--------------------加载线索成功话术到关卡中----------------
log.info("加载线索成功话术到关卡中");
Map<Integer, List<ClueSpeech>> clueSpeechMap = SpeechUtil.getClueSpeechModel(speechFilePath);
TimingAcquisition.gateNoSuccessClueSpeechMap.put(gateNo, clueSpeechMap);
log.info("线索成功话术加载到关卡中完成");
//--------------------加载任务成功话术到关卡中----------------
log.info("加载任务成功话术到关卡中");
Map<Integer, List<TaskSpeech>> taskSpeechMap = SpeechUtil.getTaskSpeechModel(speechFilePath);
TimingAcquisition.gateNoSuccessTaskSpeechMap.put(gateNo, taskSpeechMap);
log.info("任务成功话术加载到关卡中完成");
//--------------------加载任务成功话术到关卡中----------------
log.info("加载任务提示话术到关卡中");
Map<Integer, List<TipSpeech>> tipSpeechMap = SpeechUtil.getTipSpeechModel(speechFilePath);
TimingAcquisition.gateNoTipSpeechMap.put(gateNo, tipSpeechMap);
log.info("任务提示话术加载到关卡中完成");
//--------------------加载人物见面话术到关卡中----------------
log.info("加载人物见面话术到关卡中");
Map<String, List<PersonSpeech>> personSpeechMap = SpeechUtil.getPersonSpeechModel(speechFilePath);
TimingAcquisition.gateNoPersonSpeechMap.put(gateNo, personSpeechMap);
log.info("人物见面话术加载到关卡中完成");
//--------------------加载操作提示话术到关卡中----------------
log.info("加载操作提示话术到关卡中");
Map<Integer, OperateSpeech> operateSpeechMap = SpeechUtil.getOperateSpeechModel(speechFilePath);
TimingAcquisition.gateNoOperateSpeechMap.put(gateNo, operateSpeechMap);
log.info("操作提示话术加载到关卡中完成");
//--------------------加载任务异常话术到关卡中----------------
log.info("加载任务异常话术到关卡中");
Map<Integer, TaskExceptionSpeech> taskExceptionSpeechMap = SpeechUtil.getTaskExceptionSpeechModel(speechFilePath);
TimingAcquisition.gateNoTaskExceptionSpeechMap.put(gateNo, taskExceptionSpeechMap);
log.info("任务异常话术加载到关卡中完成");
}
}
}
}
}
log.info("开始缓存系列名和关卡编号对应关系");
Map<String, List<String>> seriesGateNosMap = new ConcurrentHashMap<>();
seriesGateNosMap.put(seriesName, gateNoList);
TimingAcquisition.seriesGateNosMap.putAll(seriesGateNosMap);
log.info("系列名和关卡编号对应关系完成");
}
}
}
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -67,7 +177,162 @@ public class PersistenceUtil { ...@@ -67,7 +177,162 @@ public class PersistenceUtil {
e.printStackTrace(); e.printStackTrace();
} }
} }
return lastStr; }
/**
* 从配置文件的系列话术中加载话术表到系列中
* @param filePath
* @return String
*/
public static void getSpeechFromFile(String filePath) {
File file = new File(filePath);
try {
if (file.exists()) {
File[] fileList = file.listFiles();
if (!StringUtils.isEmpty(fileList)) {
if (fileList.length != 0) {
//遍历所有系列名称
for (File series : fileList) {
String seriesName = series.getName(); //系列名称
String speechFilePath = series.getAbsolutePath() + "/speech/";
//--------------------加载后台配置的话术-----------------
TimingAcquisition.speechLoading(seriesName, speechFilePath);
//--------------------加载闲聊话术的csv表----------------
log.info("加载闲聊话术到系列");
Map<Integer, List<ChatSpeech>> chatSpeechMap = SpeechUtil.getChatSpeechModel(speechFilePath);
TimingAcquisition.seriesChatSpeechMap.put(seriesName, chatSpeechMap);
log.info("闲聊话术加载到系列完成");
//--------------------加载线索成功话术的csv表----------------
log.info("加载线索成功话术到系列");
Map<Integer, List<ClueSpeech>> clueSpeechMap = SpeechUtil.getClueSpeechModel(speechFilePath);
TimingAcquisition.seriesSuccessClueSpeechMap.put(seriesName, clueSpeechMap);
log.info("线索成功话术加载到系列完成");
//--------------------加载任务成功话术的csv表----------------
log.info("加载任务成功话术到系列");
Map<Integer, List<TaskSpeech>> taskSpeechMap = SpeechUtil.getTaskSpeechModel(speechFilePath);
TimingAcquisition.seriesSuccessTaskSpeechMap.put(seriesName, taskSpeechMap);
log.info("任务成功话术加载到系列完成");
//--------------------加载任务成功话术的csv表----------------
log.info("加载任务提示话术到系列");
Map<Integer, List<TipSpeech>> tipSpeechMap = SpeechUtil.getTipSpeechModel(speechFilePath);
TimingAcquisition.seriesTipSpeechMap.put(seriesName, tipSpeechMap);
log.info("任务提示话术加载到系列完成");
//--------------------加载人物见面话术的csv表----------------
log.info("加载人物见面话术到系列");
Map<String, List<PersonSpeech>> personSpeechMap = SpeechUtil.getPersonSpeechModel(speechFilePath);
TimingAcquisition.seriesPersonSpeechMap.put(seriesName, personSpeechMap);
log.info("人物见面话术加载到系列完成");
//--------------------加载操作提示话术的csv表----------------
log.info("加载操作提示话术到系列");
Map<Integer, OperateSpeech> operateSpeechMap = SpeechUtil.getOperateSpeechModel(speechFilePath);
TimingAcquisition.seriesOperateSpeechMap.put(seriesName, operateSpeechMap);
log.info("操作提示话术加载到系列完成");
//--------------------加载任务异常话术的csv表----------------
log.info("加载任务异常话术到系列");
Map<Integer, TaskExceptionSpeech> taskExceptionSpeechMap = SpeechUtil.getTaskExceptionSpeechModel(speechFilePath);
TimingAcquisition.seriesTaskExceptionSpeechMap.put(seriesName, taskExceptionSpeechMap);
log.info("任务异常话术加载到系列中完成");
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 从配置文件的系列配置中加载配置表到系列中
* @param filePath
* @return String
*/
public static void getConfigFromFile(String filePath) {
File file = new File(filePath);
try {
if (file.exists()) {
File[] fileList = file.listFiles();
if (!StringUtils.isEmpty(fileList)) {
if (fileList.length != 0) {
//遍历所有系列名称
for (File series : fileList) {
String seriesName = series.getName(); //系列名称
String configFilePath = series.getAbsolutePath() + "/config/";
//--------------------加载场所表到系列中----------------
log.info("加载场所表到系列:" + seriesName);
Map<String, Location> locationMap = FileUtil.getLocationModel(configFilePath);
TimingAcquisition.seriesLocationMap.put(seriesName, locationMap);
log.info("场所表加载到系列完成");
//--------------------加载线索表到系列中----------------
log.info("加载线索表到系列:" + seriesName);
Map<Integer, Clue> clueMap = FileUtil.getClueModel(configFilePath);
TimingAcquisition.seriesClueMap.put(seriesName, clueMap);
log.info("线索表加载到系列完成");
//--------------------加载线索类型表到系列中----------------
log.info("加载线索类型表到系列:" + seriesName);
Map<Integer, String> clueTypeMap = FileUtil.getClueTypeModel(configFilePath);
TimingAcquisition.seriesClueTypeMap.put(seriesName, clueTypeMap);
log.info("线索类型表加载到系列完成");
//--------------------加载性格表到系列中----------------
log.info("加载性格表到系列:" + seriesName);
Map<Integer, Disposition> dispositionMap = FileUtil.getDispositionModel(configFilePath);
TimingAcquisition.seriesDispositionMap.put(seriesName, dispositionMap);
log.info("性格表加载到系列完成");
//--------------------加载系统配置表到系列中----------------
log.info("加载系统配置表到系列:" + seriesName);
Map<String, SystemConfigPojo> systemConfigMap = FileUtil.getSystemConfigModel(configFilePath);
TimingAcquisition.seriesSystemConfigMap.put(seriesName, systemConfigMap);
log.info("系统配置表加载到系列完成");
//--------------------加载任务条件表到系列中----------------
log.info("加载任务条件表到系列:" + seriesName);
Map<Integer, TaskConditionPojo> taskConditionMap = FileUtil.getTaskConditionModel(configFilePath);
TimingAcquisition.seriesTaskConditionMap.put(seriesName, taskConditionMap);
log.info("任务条件表加载到系列完成");
//--------------------加载伙伴配置表到系列中----------------
log.info("加载伙伴配置表到系列:" + seriesName);
Map<Integer, PartnerItem> partnerItemMap = FileUtil.getPartnerItemModel(configFilePath);
TimingAcquisition.seriesPartnerItemMap.put(seriesName, partnerItemMap);
log.info("伙伴配置表加载到系列完成");
Map<Integer, Map<Integer, BackpackNum>> result = new HashMap<>();
//--------------------加载伙伴人数上限表到系列中----------------
log.info("加载伙伴人数上限表到系列:" + seriesName);
Map<Integer, BackpackNum> partnerNumMap = FileUtil.getPartnerNumModel(configFilePath);
result.put(Constants.ITEM_PARTNER, partnerNumMap);
//--------------------加载背包数量上限表到系列中----------------
log.info("加载道具数量上限表到系列:" + seriesName);
Map<Integer, BackpackNum> propNumMap = FileUtil.getBackpackNumModel(configFilePath);
result.put(Constants.ITEM_PROPS, propNumMap);
//--------------------加载普通物品数量上限表到系列中----------------
log.info("加载普通物品数量上限表到系列:" + seriesName);
Map<Integer, BackpackNum> itemNumMap = FileUtil.getItemNumModel(configFilePath);
result.put(Constants.ITEM_NOR, itemNumMap);
TimingAcquisition.seriesBackpackNumMap.put(seriesName, result);
log.info("背包数量上限表加载到系列完成");
//--------------------加载NPC配置表到系列中----------------
log.info("加载NPC配置表到系列:" + seriesName);
Map<Integer, PersonPojo> personMap = FileUtil.getPersonModel(configFilePath);
TimingAcquisition.seriesPersonMap.put(seriesName, personMap);
log.info("NPC配置表加载到系列完成");
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
} }
/** /**
...@@ -102,6 +367,35 @@ public class PersistenceUtil { ...@@ -102,6 +367,35 @@ public class PersistenceUtil {
} }
/** /**
* 读取json文件数据
* @param path json文件路径
* @param fileName
* @return 字符串
*/
public static String readJson(String path, String fileName) {
String jsonPath = path + fileName;
File jsonFile = new File(jsonPath);
try {
FileReader fileReader = new FileReader(jsonFile);
BufferedReader reader = new BufferedReader(fileReader);
StringBuilder sb = new StringBuilder();
while (true) {
int ch = reader.read();
if (ch != -1) {
sb.append((char) ch);
} else {
break;
}
}
fileReader.close();
reader.close();
return sb.toString();
} catch (IOException e) {
return "";
}
}
/**
* 将话术转成map格式 * 将话术转成map格式
* @param * @param
* @return Map<String, Map<String, List<String>>> * @return Map<String, Map<String, List<String>>>
...@@ -117,4 +411,154 @@ public class PersistenceUtil { ...@@ -117,4 +411,154 @@ public class PersistenceUtil {
} }
return speechMap; return speechMap;
} }
/**
* 读取玩家json文件的数据
* @param path json文件路径
* @param gateNo
* @return 字符串
*/
public static String loadPlayerData(String path, String gateNo) {
BufferedReader reader = null;
String fileName = gateNo + ".json";
String lastStr = "";
File file = new File(path + fileName);
if (!file.exists()) {
return lastStr;
}
try {
FileInputStream fileInputStream = new FileInputStream(path + fileName);
InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8");
reader = new BufferedReader(inputStreamReader);
String stringTmp = null;
while ((stringTmp = reader.readLine()) != null) {
lastStr += stringTmp;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (reader != null) {
reader.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return lastStr;
}
/**
* 读取json文件的数据
* @param path json文件路径
* @param fileName
* @return 字符串
*/
public static String readJsonFile(String path, String fileName) {
BufferedReader reader = null;
String lastStr = "";
File file = new File(path + "/" + fileName);
if (!file.exists()) {
return lastStr;
}
try {
FileInputStream fileInputStream = new FileInputStream(path + "/" + fileName);
InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8");
reader = new BufferedReader(inputStreamReader);
String stringTmp = null;
while ((stringTmp = reader.readLine()) != null) {
lastStr += stringTmp;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (reader != null) {
reader.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return lastStr;
}
/**
* 加载玩家所有关卡的声望值
*/
public static void loadSeriesReputation(String uid, String filePath) {
File file = new File(filePath);
ReputationDto reputation = new ReputationDto();
try {
if (file.exists()) {
File[] fileList = file.listFiles(); //玩家的所有系列
if (!StringUtils.isEmpty(fileList)) {
if (fileList.length != 0) {
//遍历所有系列
for (File series : fileList) {
String seriesName = series.getName(); //系列名称
String playerFilePath = series.getAbsolutePath();
File[] gateNoList = series.listFiles(); //玩家该系列的所有关卡
if (!StringUtils.isEmpty(gateNoList)) {
if (gateNoList.length != 0) {
int count = 0; //统计声望值
reputation.setUid(uid);
//遍历系列下的所有关卡
for (File gate : gateNoList) {
String gateNo = gate.getName(); //关卡编号
String playerStr = readJsonFile(playerFilePath, gateNo);
Player player = JSON.parseObject(playerStr, new TypeReference<Player>(){});
reputation.setReputation(player.getReputation());
//更新关卡排行榜
PlayerUtil.updateGateNoReputation(player, reputation);
count += player.getReputation();
}
reputation.setReputation(count);
//更新关卡排行榜
PlayerUtil.updateSeriesReputation(uid, seriesName, reputation);
}
}
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 加载玩家系列数据
*/
public static void loadSeriesPlayer(String uid, String seriesName) {
String dataPath = MD5Util.changeToDataPath(uid, seriesName);
Map<String, PriorityBlockingQueue<ReputationDto>> seriesReputationQueueMap = TimingAcquisition.seriesReputationQueueMap;
//取出存放玩家系列数据
String playerSeriesStr = readJsonFile(dataPath, uid + ".json");
if (!StringUtils.isEmpty(playerSeriesStr)) {
PlayerSeriesDto playerSeries = JSON.parseObject(playerSeriesStr, new TypeReference<PlayerSeriesDto>(){});
//还没有该玩家的系列汇总数据
if (StringUtils.isEmpty(TimingAcquisition.seriesPlayerMap.get(seriesName))) {
Map<String, PlayerSeriesDto> playerSeriesMap = new HashMap<>();
playerSeriesMap.put(uid, playerSeries);
TimingAcquisition.seriesPlayerMap.put(seriesName, playerSeriesMap);
} else {
if (StringUtils.isEmpty(TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid))) {
TimingAcquisition.seriesPlayerMap.get(seriesName).put(uid, playerSeries);
}
}
//更新系列排行榜
if (!StringUtils.isEmpty(playerSeries)) {
if (StringUtils.isEmpty(seriesReputationQueueMap.get(seriesName))) {
//新增系列排行榜
PriorityBlockingQueue<ReputationDto> seriesReputationQueue = new PriorityBlockingQueue<>();
seriesReputationQueue.add(playerSeries.getTotalReputation());
seriesReputationQueueMap.put(seriesName, seriesReputationQueue);
} else {
//更新系列排行榜中用户的旧声望
seriesReputationQueueMap.get(seriesName).add(playerSeries.getTotalReputation());
}
}
}
}
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.qiwu.inference.common.utils;
import com.alibaba.fastjson.JSON;
import com.qiwu.inference.common.TimingAcquisition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.concurrent.TimeUnit;
@Component
public class RedisUtil {
@Value("${redisExpireTime}")
private String redisExpireTime;
@Autowired
private RedisTemplate<String, Object> redisTemplate;
public void setStr(String key, String value) {
//存入redis缓存中,设置过期时间
redisTemplate.opsForValue().set(key, value, Long.parseLong(redisExpireTime), TimeUnit.MILLISECONDS);
}
public String getStr(String key) {
//存redis缓存中根据key取出value
return (String) redisTemplate.opsForValue().get(key);
}
public void setHash(String key, String hk, String hv) {
//存入redis缓存中
redisTemplate.opsForHash().put(key, hk, hv);
//设置过期时间
redisTemplate.opsForHash().getOperations().expire(key, Long.parseLong(redisExpireTime), TimeUnit.MILLISECONDS);
}
public String getHash(String key, String hk) {
//存入redis缓存中
return (String) redisTemplate.opsForHash().get(key, hk);
}
public void delHash(String key, String hk) {
redisTemplate.opsForHash().delete(key, hk);
}
//判断key是否存在
public boolean keyIsExists(String key) {
return Boolean.TRUE.equals(redisTemplate.hasKey(key));
}
//key续期
public void renewalStr(String key, long times, TimeUnit timeUnit) {
if (!StringUtils.isEmpty(getStr(key))) {
//设置过期时间
redisTemplate.opsForValue().getOperations().expire(key, times, timeUnit);
}
}
//key续期
public void renewalHash(String key, String hk, long times, TimeUnit timeUnit) {
if (!StringUtils.isEmpty(getHash(key, hk))) {
//设置过期时间
redisTemplate.opsForHash().getOperations().expire(key, times, timeUnit);
}
}
}
package com.qiwu.inference.common.utils; package com.qiwu.inference.common.utils;
import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.dto.request.CallRequest; import com.qiwu.inference.dto.request.CallRequest;
import com.qiwu.inference.dto.request.CommonRequest; import com.qiwu.inference.dto.request.CommonRequest;
...@@ -18,12 +19,23 @@ public class RequestConversionUtil { ...@@ -18,12 +19,23 @@ public class RequestConversionUtil {
public static OperationRequest request2Operation(CommonRequest commonRequest) { public static OperationRequest request2Operation(CommonRequest commonRequest) {
OperationRequest operationRequest = new OperationRequest(); OperationRequest operationRequest = new OperationRequest();
CallRequest callRequest = commonRequest.getVars(); CallRequest callRequest = commonRequest.getVars();
operationRequest.setUid(commonRequest.getUid()); String uid = commonRequest.getUid();
operationRequest.setUid(uid);
//---------------------存在"系列名称"-----------------------
String series = callRequest.get系列名称();
if (!StringUtils.isEmpty(series)) {
operationRequest.setSeries(series.trim());
}
//---------------------存在"关卡名称"-----------------------
String gateName = callRequest.get关卡名称();
if (!StringUtils.isEmpty(gateName)) {
operationRequest.setGateName(gateName.trim());
}
//---------------------存在"方法编号"----------------------- //---------------------存在"方法编号"-----------------------
String methodId = callRequest.get方法编号(); String methodId = callRequest.get方法编号();
if (!StringUtils.isEmpty(methodId)) { if (!StringUtils.isEmpty(methodId)) {
operationRequest.setMethodId(methodId); operationRequest.setMethodId(methodId.trim());
} }
//---------------------存在"人物名称1"----------------------- //---------------------存在"人物名称1"-----------------------
String subjectName = callRequest.get人物名称1(); String subjectName = callRequest.get人物名称1();
...@@ -63,56 +75,73 @@ public class RequestConversionUtil { ...@@ -63,56 +75,73 @@ public class RequestConversionUtil {
//---------------------存在"性格类型"----------------------- //---------------------存在"性格类型"-----------------------
String dispositionType = callRequest.get性格类型(); String dispositionType = callRequest.get性格类型();
if (!StringUtils.isEmpty(dispositionType)) { if (!StringUtils.isEmpty(dispositionType)) {
operationRequest.setDispositionType(dispositionType); operationRequest.setDispositionType(dispositionType.trim());
} }
//---------------------存在"性格名称"----------------------- //---------------------存在"性格名称"-----------------------
String dispositionName = callRequest.get性格名称(); String dispositionName = callRequest.get性格名称();
if (!StringUtils.isEmpty(dispositionName)) { if (!StringUtils.isEmpty(dispositionName)) {
operationRequest.setDispositionName(dispositionName); operationRequest.setDispositionName(dispositionName.trim());
} }
//---------------------存在"关系名称"----------------------- //---------------------存在"关系名称"-----------------------
String relationName = callRequest.get关系名称(); String relationName = callRequest.get关系名称();
if (!StringUtils.isEmpty(relationName)) { if (!StringUtils.isEmpty(relationName)) {
operationRequest.setRelationName(relationName); operationRequest.setRelationName(relationName.trim());
} }
//---------------------存在"行为名称"----------------------- //---------------------存在"行为名称"-----------------------
String behaviourName = callRequest.get行为名称(); String behaviourName = callRequest.get行为名称();
if (!StringUtils.isEmpty(behaviourName)) { if (!StringUtils.isEmpty(behaviourName)) {
operationRequest.setBehaviourName(behaviourName); operationRequest.setBehaviourName(behaviourName.trim());
} }
//---------------------存在"任务名称"----------------------- //---------------------存在"任务名称"-----------------------
String taskName = callRequest.get任务名称(); String taskName = callRequest.get任务名称();
if (!StringUtils.isEmpty(taskName)) { if (!StringUtils.isEmpty(taskName)) {
operationRequest.setTaskName(taskName); operationRequest.setTaskName(taskName.trim());
} }
//---------------------存在"身份名称"----------------------- //---------------------存在"身份名称"-----------------------
String identityName = callRequest.get身份名称(); String identityName = callRequest.get身份名称();
if (!StringUtils.isEmpty(identityName)) { if (!StringUtils.isEmpty(identityName)) {
operationRequest.setIdentityName(identityName); operationRequest.setIdentityName(identityName.trim());
} }
//---------------------存在"场所名称"----------------------- //---------------------存在"场所名称"-----------------------
String locationName = callRequest.get场所名称(); String locationName = callRequest.get场所名称();
if (!StringUtils.isEmpty(locationName)) { if (!StringUtils.isEmpty(locationName)) {
String locationId = TimingAcquisition.getLocationIdByName(locationName); Integer num = TypeConvertUtil.change2Integer(locationName);
operationRequest.setLocationName(locationName); if (num == 0) {
operationRequest.setLocationId(locationId); //中文中不包含中文数字时,提取阿拉伯数字
num = TypeConvertUtil.extractNum(locationName);
if (num != Constants.REQ_NON) {
operationRequest.setLocationId(num.toString());
} else {
String locationId = TimingAcquisition.getLocationIdByName(uid, locationName);
operationRequest.setLocationName(locationName);
operationRequest.setLocationId(locationId);
}
} else {
operationRequest.setLocationId(num.toString());
}
} }
//---------------------存在"人物名称ID"----------------------- //---------------------存在"人物名称ID"-----------------------
String subjectId = callRequest.get人物名称ID(); String subjectId = callRequest.get人物名称ID();
if (!StringUtils.isEmpty(subjectId)) { if (!StringUtils.isEmpty(subjectId)) {
operationRequest.setSubjectId(Integer.valueOf(subjectId)); operationRequest.setSubjectId(Integer.valueOf(subjectId.trim()));
} }
//---------------------存在"任务条件"----------------------- //---------------------存在"任务条件"-----------------------
String taskConditionId = callRequest.get任务条件(); String taskConditionId = callRequest.get任务条件();
if (!StringUtils.isEmpty(taskConditionId)) { if (!StringUtils.isEmpty(taskConditionId)) {
operationRequest.setTaskConditionId(taskConditionId); operationRequest.setTaskConditionId(taskConditionId.trim());
} }
//---------------------存在"线索类型"----------------------- //---------------------存在"线索类型"-----------------------
String clueType = callRequest.get线索类型(); String clueType = callRequest.get线索类型();
if (!StringUtils.isEmpty(clueType)) { if (!StringUtils.isEmpty(clueType)) {
Integer clueTypeId = TimingAcquisition.getClueTypeIdByName(clueType); Integer clueTypeId = TimingAcquisition.getClueTypeIdByName(uid, clueType);
operationRequest.setClueTypeId(clueTypeId); operationRequest.setClueTypeId(clueTypeId);
} }
//---------------------存在"道具名称"-----------------------
String partnerItem = callRequest.get伙伴物品名称();
if (!StringUtils.isEmpty(partnerItem)) {
Integer partnerItemId = ConfigDataUtil.getPartnerItemIdByName(uid, partnerItem.trim());
operationRequest.setPartnerItemId(partnerItemId);
}
return operationRequest; return operationRequest;
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.qiwu.inference.common.utils; package com.qiwu.inference.common.utils;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -303,27 +304,29 @@ public class TypeConvertUtil { ...@@ -303,27 +304,29 @@ public class TypeConvertUtil {
} }
/** /**
* 选择的序号 * 通过序号找到对应内容
*/ */
public static Object getNumFromList(List<Object> list, Integer num) { public static <T> T getNumFromList(List<T> list, Integer num) {
Object result = new Object();
//第一个物品 //第一个物品
if (num == Constants.REQ_FIRST) { if (num == Constants.REQ_FIRST) {
result = list.get(0); return list.get(0);
} }
//中间物品 //中间物品
if (num == Constants.REQ_MIDDLE) { if (num == Constants.REQ_MIDDLE) {
result = list.get(list.size() / 2); return list.get(list.size() / 2);
} }
//最后一个物品 //最后一个物品
if (num == Constants.REQ_LAST) { if (num == Constants.REQ_LAST) {
result = list.get(list.size() - 1); return list.get(list.size() - 1);
} }
//随机一个物品 //随机一个物品
if (num == Constants.REQ_RANDOM) { if (num == Constants.REQ_RANDOM) {
int random = RandomUtil.randomInt(list.size()); int random = RandomUtil.randomInt(list.size());
result = list.get(random); return list.get(random);
} }
return result; if (num > 0 && num < list.size()) {
return list.get(num - 1);
}
return null;
} }
} }
...@@ -3,10 +3,16 @@ package com.qiwu.inference.controller; ...@@ -3,10 +3,16 @@ package com.qiwu.inference.controller;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.cache.CacheGlobal;
import com.qiwu.inference.common.utils.CacheUtil;
import com.qiwu.inference.common.utils.DataTrimUtil; import com.qiwu.inference.common.utils.DataTrimUtil;
import com.qiwu.inference.common.utils.PlayerUtil;
import com.qiwu.inference.common.utils.RequestConversionUtil; import com.qiwu.inference.common.utils.RequestConversionUtil;
import com.qiwu.inference.dto.DemandTaskDto;
import com.qiwu.inference.dto.ReplyDto;
import com.qiwu.inference.dto.request.CommonRequest; import com.qiwu.inference.dto.request.CommonRequest;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.CallResponse;
import com.qiwu.inference.dto.response.ResultResponse; import com.qiwu.inference.dto.response.ResultResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
import com.qiwu.inference.service.ask.AskService; import com.qiwu.inference.service.ask.AskService;
...@@ -14,6 +20,7 @@ import com.qiwu.inference.service.barrier.BarrierService; ...@@ -14,6 +20,7 @@ import com.qiwu.inference.service.barrier.BarrierService;
import com.qiwu.inference.service.chat.ChatService; import com.qiwu.inference.service.chat.ChatService;
import com.qiwu.inference.service.check.CheckService; import com.qiwu.inference.service.check.CheckService;
import com.qiwu.inference.service.login.LoginService; import com.qiwu.inference.service.login.LoginService;
import com.qiwu.inference.service.partner.PartnerService;
import com.qiwu.inference.service.task.TaskService; import com.qiwu.inference.service.task.TaskService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -26,6 +33,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -26,6 +33,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@RestController @RestController
@RequestMapping("/inference") @RequestMapping("/inference")
...@@ -53,20 +63,38 @@ public class CommonController { ...@@ -53,20 +63,38 @@ public class CommonController {
@Autowired @Autowired
private ChatService chatService; private ChatService chatService;
@Autowired
private PartnerService partnerService;
@PostMapping(value = "/ask", produces = "application/json;charset=UTF-8") @PostMapping(value = "/ask", produces = "application/json;charset=UTF-8")
public CommonResult<ResultVarsResponse> startGame(@RequestBody CommonRequest commonRequest) throws ParseException { public CommonResult<ResultVarsResponse> startGame(@RequestBody CommonRequest commonRequest) throws ParseException {
log.info(commonRequest.getUid() + "当前操作的原始请求参数:" + commonRequest.getVars()); log.info(commonRequest.getUid() + "当前操作的原始请求参数:" + commonRequest.getVars() + ",原始话语:" + commonRequest.getOriginText());
CommonResult<ResultVarsResponse> result = null; CommonResult<ResultVarsResponse> result = null;
String uid = commonRequest.getUid(); String uid = commonRequest.getUid();
boolean login = false; boolean login = false;
//玩家第一次登录 //玩家已经存在
if (StringUtils.isEmpty(TimingAcquisition.playerMap.get(uid))) { if (TimingAcquisition.uidList.contains(uid)) {
loginService.login(uid); //玩家已经下线,重新加载
if (StringUtils.isEmpty(TimingAcquisition.playerMap.get(uid))) {
loginService.loadPlayerData(commonRequest);
login = true;
}
} else {
//玩家第一次登录
if (StringUtils.isEmpty(TimingAcquisition.playerMap.get(uid))) {
loginService.login(commonRequest);
login = true;
}
}
//玩家切换关卡后,保存上一关卡的数据,重新加载关卡数据
String gateNo = TimingAcquisition.gateNameToNoMap.get(commonRequest.getVars().get关卡名称()); //玩家玩的当前的关卡
if (!TimingAcquisition.playerMap.get(uid).getGateNo().equals(gateNo)) {
loginService.reloadPlayerData(commonRequest);
login = true; login = true;
} }
//请求参数转换 //请求参数转换
OperationRequest operationReq = RequestConversionUtil.request2Operation(commonRequest); OperationRequest operationReq = RequestConversionUtil.request2Operation(commonRequest);
//非新登录玩家,修改在线状态 //玩家操作后,修改在线状态和延长下线时间
if (!login && !StringUtils.isEmpty(uid)) { if (!login && !StringUtils.isEmpty(uid)) {
DataTrimUtil.AdjustStatus(commonRequest.getUid(), offlineTime); DataTrimUtil.AdjustStatus(commonRequest.getUid(), offlineTime);
} }
...@@ -76,17 +104,28 @@ public class CommonController { ...@@ -76,17 +104,28 @@ public class CommonController {
if (StringUtils.isEmpty(operateName)) { if (StringUtils.isEmpty(operateName)) {
log.info(operationReq.getUid() + "未提供操作名,无法操作"); log.info(operationReq.getUid() + "未提供操作名,无法操作");
ResultVarsResponse resultVarsResponse = new ResultVarsResponse(); ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();; ResultResponse resultResponse = new ResultResponse();
resultResponse.set反馈ID(100000); resultResponse.set反馈ID(100000);
resultResponse.set反馈文本("【旁白@正常】你想做什么呢?"); resultResponse.set反馈文本("【旁白@正常】你想做什么呢?");
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//玩家对话的当前NPC或者要找的NPC已经死亡
int life = PlayerUtil.checkPersonLife(uid, operateName, operationReq);
if (life < 0) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
resultResponse.set反馈ID(100000);
resultResponse.set反馈文本("【旁白@正常】人不在了,去找其他人吧");
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//统计玩家闲聊次数 //统计玩家闲聊次数
if ("闲聊".equals(operateName)) { if ("闲聊".equals(operateName)) {
int chatTimes = TimingAcquisition.playerMap.get(uid).getChatTimes(); int chatTimes = TimingAcquisition.playerMap.get(uid).getChatTimes();
int times = Integer.parseInt(TimingAcquisition.systemConfigMap.get("chatTimes").getValue()); String seriesName = TimingAcquisition.playerMap.get(uid).getSeries(); //系列名称
if (chatTimes > times) { int times = Integer.parseInt(TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("chatTimes").getValue());
if (chatTimes >= times - 1) {
TimingAcquisition.playerMap.get(uid).setChatTimes(0); TimingAcquisition.playerMap.get(uid).setChatTimes(0);
} else { } else {
TimingAcquisition.playerMap.get(uid).setChatTimes(TimingAcquisition.playerMap.get(uid).getChatTimes() + 1); TimingAcquisition.playerMap.get(uid).setChatTimes(TimingAcquisition.playerMap.get(uid).getChatTimes() + 1);
...@@ -94,9 +133,30 @@ public class CommonController { ...@@ -94,9 +133,30 @@ public class CommonController {
} else { } else {
TimingAcquisition.playerMap.get(uid).setChatTimes(0); TimingAcquisition.playerMap.get(uid).setChatTimes(0);
} }
String unique = uid + gateNo; //用户uid和关卡编号组成唯一标识
//当前玩家上一轮保存的数据
ReplyDto reply = (ReplyDto) CacheUtil.get(unique);
//其他操作意图,清除缓存
if (!StringUtils.isEmpty(reply)) {
Integer subjectId = reply.getSubjectId();
Integer demandTaskId = reply.getDemandTaskId();
//找到对应任务
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, demandTaskId);
if (!StringUtils.isEmpty(demandTask)) {
//为一次性任务
int disposableLabel = demandTask.getDisposableLabel();
if (disposableLabel != 0) {
List<String> allowTask = Arrays.asList("任务同意操作", "任务拒绝操作", "任务中断操作", "伙伴操作");
if (!allowTask.contains(operateName)) {
CacheGlobal.concurrentMap.remove(unique);
PlayerUtil.updateTaskStatus(uid, subjectId, demandTaskId, 6);
}
}
}
}
switch (operateName) { switch (operateName) {
case "开始游戏": case "开始游戏":
result = loginService.startGame(operationReq); result = loginService.startGame(commonRequest);
break; break;
case "询问操作": case "询问操作":
result = askService.ask(operationReq); result = askService.ask(operationReq);
...@@ -104,18 +164,39 @@ public class CommonController { ...@@ -104,18 +164,39 @@ public class CommonController {
case "任务操作": case "任务操作":
result = taskService.execute(operationReq); result = taskService.execute(operationReq);
break; break;
case "任务同意操作":
result = taskService.agree(operationReq);
break;
case "任务拒绝操作":
result = taskService.refuse(operationReq);
break;
case "任务中断操作":
result = taskService.interrupt(operationReq);
break;
case "查看操作": case "查看操作":
result = checkService.check(operationReq); result = checkService.check(operationReq);
break; break;
case "二次回复":
result = checkService.secondAnswer(operationReq);
break;
case "查看排行榜":
result = checkService.checkRanking(operationReq);
break;
case "关卡操作": case "关卡操作":
result = barrierService.operate(operationReq); result = barrierService.operate(operationReq);
break; break;
case "取消操作指令": case "取消操作指令":
result = barrierService.cancel(operationReq); result = barrierService.cancel(operationReq);
break; break;
case "切换场景":
result = barrierService.changePlace(operationReq);
break;
case "闲聊": case "闲聊":
result = chatService.operate(operationReq); result = chatService.operate(operationReq);
break; break;
case "伙伴操作":
result = partnerService.operate(operationReq);
break;
} }
log.info(uid + "已完成操作:【" + operateName + "】"); log.info(uid + "已完成操作:【" + operateName + "】");
return DataTrimUtil.AdjustParams(uid, result); return DataTrimUtil.AdjustParams(uid, result);
......
...@@ -8,15 +8,18 @@ import com.qiwu.inference.common.api.CommonResult; ...@@ -8,15 +8,18 @@ import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.utils.*; import com.qiwu.inference.common.utils.*;
import com.qiwu.inference.dto.Player; import com.qiwu.inference.dto.Player;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
import com.qiwu.inference.service.PersonRecordService; import com.qiwu.inference.service.PersonRecordService;
import com.qiwu.inference.service.player.PlayerService; import com.qiwu.inference.service.player.PlayerService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
...@@ -46,74 +49,79 @@ public class PlayerController { ...@@ -46,74 +49,79 @@ public class PlayerController {
int index = RandomUtil.randomInt(gateNoList.size()); int index = RandomUtil.randomInt(gateNoList.size());
Player player = new Player(); Player player = new Player();
player.setGateNo(gateNoList.get(index)); player.setGateNo(gateNoList.get(index));
String sid = UUID.fastUUID().toString(); String uid = UUID.fastUUID().toString();
player.setSid(sid); player.setUid(uid);
PersistenceUtil.saveDataToFile(userFilePath, sid, JSON.toJSONString(player)); PersistenceUtil.saveDataToFile(userFilePath, uid, JSON.toJSONString(player));
//ThreadLocalUtil.add(sid,player); //ThreadLocalUtil.add(uid,player);
return CommonResult.success(player); return CommonResult.success(player);
} }
@RequestMapping(value = "/operate", method = RequestMethod.POST) @RequestMapping(value = "/getPlayerInfo", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public CommonResult<ResultVarsResponse> operate(@RequestBody OperationRequest request) throws Exception{ public CommonResult<ResultVarsResponse> operate(String uid) throws Exception{
String methodId = request.getMethodId(); ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
switch (methodId){ ResultResponse resultResponse = new ResultResponse();
case "1001":
case "1002": Player player = TimingAcquisition.playerMap.get(uid);
return playerService.askDisposition(request); //总人数
case "1003": int totalNum = TimingAcquisition.uidList.size();
case "1004": //在线人数
case "1005": int onlineNum = TimingAcquisition.playerMap.size();
case "1006": StringBuilder text = new StringBuilder();
return playerService.askRelation(request); text.append("总人数:").append(totalNum).append("<br>").append("在线人数:").append(onlineNum).append("<br>");
case "1007": if (!TimingAcquisition.uidList.contains(uid)) {
case "1008": text.append(uid).append("玩家不存在");
case "1009": resultResponse.set反馈ID(100001);
case "1010": resultResponse.set反馈文本(text.toString());
case "1011": resultVarsResponse.setVars(resultResponse);
return playerService.askBehaviour(request); return CommonResult.success(resultVarsResponse);
case "1012": }
case "1013": if (StringUtils.isEmpty(player)) {
case "1014": text.append(uid).append("下线了");
case "1015": resultResponse.set反馈ID(100002);
case "1016": resultResponse.set反馈文本(text.toString());
case "1017": resultVarsResponse.setVars(resultResponse);
case "1018": return CommonResult.success(resultVarsResponse);
case "1019": }
case "1020": String gateNo = player.getGateNo();
case "1021": String gateName = "";
case "1022": for (Map.Entry<String, String> entry : TimingAcquisition.gateNameToNoMap.entrySet()) {
return playerService.askTask(request); if (entry.getValue().equals(gateNo)) {
case "1023": gateName = entry.getKey();
case "1024": break;
return playerService.askIdentity(request); }
case "1025":
case "1026":
return playerService.askLocation(request);
case "1027":
return playerService.askPrompt(request);
case "2001":
case "2003":
case "2002":
case "2004":
case "2005":
case "2006":
case "2007":
case "2008":
case "2009":
case "2010":
case "2011":
case "2012":
case "2013":
case "2014":
case "2015":
case "2016":
case "2017":
case "2018":
case "2019":
return playerService.performTask(request);
} }
return null; //当前系列
text.append("当前系列:").append(player.getSeries()).append("<br>");
//当前系列
text.append("当前关卡:").append(gateName).append("<br>");
//上线时间
text.append("上线时间:").append(player.getOnlineTime()).append("<br>");
//上线时间
text.append("下线时间:").append(player.getOfflineTime()).append("<br>");
//所在场所
text.append("所在场所:").append(player.getLocation()).append("<br>");
//当前对话的人物
text.append("当前对话的人物:").append(player.getId2NameMap().get(player.getPersonId())).append("<br>");
//当前系列的货币
// text.append("当前系列的货币:").append(player.getCurrency()).append("<br>");
//声望值
text.append("声望值:").append(player.getReputation()).append("<br>");
//已完成任务个数
text.append("已完成任务个数:").append(player.getFinishedTaskNum()).append("<br>");
//场所表
text.append("场所表:").append(player.getLocationMap()).append("<br>");
//已获得的线索
text.append("已获得的线索:").append(player.getClueMap()).append("<br>");
//所有任务状态
text.append("任务状态:").append(player.getTaskMap()).append("<br>");
//伙伴名称
String partnerNames = ConfigDataUtil.getPartnerNames(uid);
text.append(partnerNames).append("<br>");
resultResponse.set反馈ID(100003);
resultResponse.set反馈文本(text.toString());
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
} }
} }
...@@ -19,7 +19,7 @@ public class BehaviourDto implements Serializable { ...@@ -19,7 +19,7 @@ public class BehaviourDto implements Serializable {
/** /**
* 行为名称 * 行为名称
*/ */
private String name; // private String name;
/** /**
* 行为id * 行为id
*/ */
...@@ -27,7 +27,7 @@ public class BehaviourDto implements Serializable { ...@@ -27,7 +27,7 @@ public class BehaviourDto implements Serializable {
/** /**
* 行为描述 * 行为描述
*/ */
private String description; // private String description;
/** /**
* 主体 * 主体
*/ */
...@@ -35,7 +35,7 @@ public class BehaviourDto implements Serializable { ...@@ -35,7 +35,7 @@ public class BehaviourDto implements Serializable {
/** /**
* 主体名称 * 主体名称
*/ */
private String subjectName; // private String subjectName;
/** /**
* 客体 * 客体
*/ */
...@@ -43,6 +43,6 @@ public class BehaviourDto implements Serializable { ...@@ -43,6 +43,6 @@ public class BehaviourDto implements Serializable {
/** /**
* 客体名称 * 客体名称
*/ */
private String objectName; // private String objectName;
} }
...@@ -38,7 +38,7 @@ public class ClueDto implements Serializable { ...@@ -38,7 +38,7 @@ public class ClueDto implements Serializable {
/** /**
* 描述 * 描述
*/ */
private String description; // private String description;
/** /**
* 类型: 1:身份 2:场所 3:性格爱好 4:行为 5:关系 6:任务 9: 关键线索 * 类型: 1:身份 2:场所 3:性格爱好 4:行为 5:关系 6:任务 9: 关键线索
*/ */
...@@ -54,7 +54,7 @@ public class ClueDto implements Serializable { ...@@ -54,7 +54,7 @@ public class ClueDto implements Serializable {
/** /**
* 线索模板 * 线索模板
*/ */
private String clueTemplate; // private String clueTemplate;
/** /**
* 信任度 * 信任度
......
package com.qiwu.inference.dto;
import lombok.Data;
import java.util.List;
import java.util.Objects;
@Data
public class ClueInfoDto {
private static final long serialVersionUID = 1L;
/**
* id
*/
private int id;
/**
* 线索id
*/
private int clueId;
/**
* 主体
*/
private int subject;
/**
* 客体
*/
private int object;
/**
* 类型: 1:身份 2:场所 3:性格爱好 4:行为 5:关系 6:任务 9: 关键线索
*/
private int type;
}
...@@ -31,7 +31,7 @@ public class DemandTaskDto implements Serializable { ...@@ -31,7 +31,7 @@ public class DemandTaskDto implements Serializable {
/** /**
* 描述 * 描述
*/ */
private String description; // private String description;
/** /**
* 主体 * 主体
...@@ -81,9 +81,29 @@ public class DemandTaskDto implements Serializable { ...@@ -81,9 +81,29 @@ public class DemandTaskDto implements Serializable {
private String condition1; private String condition1;
/** /**
* 条件2|次数 * 消费数量|是否限制此时
*/ */
private String condition2; private String cost;
/**
* 开启条件时间阈值
*/
private String timeThreshold;
/**
* 开启条件任务id
*/
private int conditionTaskId;
/**
* 消耗时间
*/
private int costTime;
/**
* 一次性标签
*/
private int disposableLabel;
/** /**
* 信任度增减 * 信任度增减
...@@ -100,9 +120,17 @@ public class DemandTaskDto implements Serializable { ...@@ -100,9 +120,17 @@ public class DemandTaskDto implements Serializable {
*/ */
private String completionReward; private String completionReward;
/** /**
* 掉落人物或物品
*/
private String dropItems;
/**
* NPC生命状态
*/
private int lifeState;
/**
* 完成反馈 * 完成反馈
*/ */
private String completionFeedback; // private String completionFeedback;
/** /**
* 有效次数 * 有效次数
*/ */
...@@ -124,10 +152,20 @@ public class DemandTaskDto implements Serializable { ...@@ -124,10 +152,20 @@ public class DemandTaskDto implements Serializable {
private int infoLevel; private int infoLevel;
/** /**
* 任务标签 1普通任务 2关键任务 3目标任 * 任务标签 1普通任务 2关键任务 3目标任务
*/ */
private int taskLabel; private int taskLabel;
/**
* 自动触发: 0-不自动触发,1-自动触发
*/
private int isAuto;
/**
* 声望值
*/
private int reputation;
@Override @Override
......
...@@ -27,11 +27,11 @@ public class DispositionDto implements Serializable { ...@@ -27,11 +27,11 @@ public class DispositionDto implements Serializable {
/** /**
* 性格名称 * 性格名称
*/ */
private String name; // private String name;
/** /**
* 性格描述 * 性格描述
*/ */
private String description; // private String description;
/** /**
* 类型 * 类型
*/ */
......
package com.qiwu.inference.dto.response; package com.qiwu.inference.dto;
import lombok.Data; import lombok.Data;
@Data @Data
public class DataResponse { public class ItemDto {
/** /**
* 消息id * 物品id
*/ */
public Integer id; private Integer itemId;
/** /**
* 消息文本 * 物品个数
*/ */
public String text; private Integer itemNum;
} }
package com.qiwu.inference.dto;
import lombok.Data;
@Data
public class ItemNumDto {
/**
* 伙伴物品id
*/
private Integer id;
/**
* 伙伴物品个数
*/
private Integer num;
/**
* 伙伴物品使用次数。-1:次数已用完,0:不限次数,大于0:次数
*/
private int times;
}
package com.qiwu.inference.dto;
import java.util.*;
public enum OperateEnum {
/**
* 询问性格操作
*/
askDisposition(Arrays.asList("1001", "1002"), "询问性格操作"),
/**
* 询问关系操作
*/
askRelation(Arrays.asList("1003", "1004", "1005", "1006"), "询问关系操作"),
/**
* 询问行为操作
*/
askBehaviour(Arrays.asList("1007", "1008", "1009", "1010", "1011"), "询问行为操作"),
/**
* 询问任务操作
*/
askTask(Arrays.asList("1012", "1013", "1014", "1015", "1016", "1017", "1017", "1019", "1020", "1021", "1022"), "询问任务操作"),
/**
* 询问身份操作
*/
askIdentity(Arrays.asList("1023", "1024"), "询问身份操作"),
/**
* 询问场所操作
*/
askLocation(Arrays.asList("1025", "1026"), "询问场所操作"),
/**
* 询问提示操作
*/
askPrompt(Arrays.asList("1027", "1028", "1029"), "询问提示操作"),
/**
* 询问最终线索操作
*/
askFinalClue(Collections.singletonList("1030"), "询问最终线索操作"),
/**
* 执行任务操作
*/
performTask(Arrays.asList("2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011",
"2012", "2013", "2014", "2015", "2016", "2017", "2018", "2018", "2019", "2020", "2021", "2022", "2023",
"2024", "2025", "2026", "2027", "2028", "2029", "2030", "2031", "2032", "2033", "2034", "2035", "2036",
"2037", "2038", "2039", "2040", "2041", "2042", "2043", "204301", "204302", "204303", "204304", "204305",
"2044", "2101", "2102", "2104", "2106", "2107", "2108", "2109",
"2045", "2046", "2047", "2048", "2049", "2050", "2051", "2052", "2053", "2054", "2055", "2056", "2057",
"2058", "2059", "2060", "2061", "2062", "2063",
"6002", "6003", "6006", "6013","6032", "6033", "6034", "6035", "6036",
"6037", "6038", "6039", "6040", "6041", "6042", "6043", "6044", "6045", "6046", "6047", "6048", "6049",
"6050", "6051", "6052", "6053", "6054", "6059", "6060", "6061", "6062", "6063", "6064", "6065", "6066",
"6067", "6068", "6069", "6070", "6070", "6071", "6072", "6073", "6074", "6075", "6076", "6077", "6078",
"6079", "6080", "6081", "6082",
"60001", "60002", "60004", "60005", "60006", "60007", "60008", "60009", "60010", "60011", "60012", "60013",
"60014", "60015", "60016", "60017", "60018", "60019", "60020", "60021", "60022", "60023", "60024", "60026",
"60027", "60028", "60029", "60030", "60031", "60032", "60034", "60035", "60037", "60038", "60040", "60042",
"60104", "60045", "60046", "60048", "60050", "60051", "60053", "60054", "60056", "60058", "60059", "60062",
"60063", "60065", "60067", "60068", "60070", "60071", "60073", "60075", "60076", "60078", "60079", "60081",
"60083", "60084", "60086", "60087", "60089", "60091", "60092", "60094", "60095", "60100", "60101", "60102",
"60103", "60105", "61001", "61002", "61003", "61004", "61005"), "执行任务操作");
private static final Map<String, String> operateMap = new HashMap<>();
static {
for (OperateEnum operateEnum : OperateEnum.values()) {
operateEnum.methodIds.forEach(val->{
if (OperateEnum.askDisposition.equals(operateEnum)) {
operateMap.put(val, "askDisposition");
return;
}
if (OperateEnum.askRelation.equals(operateEnum)) {
operateMap.put(val, "askRelation");
return;
}
if (OperateEnum.askBehaviour.equals(operateEnum)) {
operateMap.put(val, "askBehaviour");
return;
}
if (OperateEnum.askTask.equals(operateEnum)) {
operateMap.put(val, "askTask");
return;
}
if (OperateEnum.askIdentity.equals(operateEnum)) {
operateMap.put(val, "askIdentity");
return;
}
if (OperateEnum.askLocation.equals(operateEnum)) {
operateMap.put(val, "askLocation");
return;
}
if (OperateEnum.askPrompt.equals(operateEnum)) {
operateMap.put(val, "askPrompt");
return;
}
if (OperateEnum.askFinalClue.equals(operateEnum)) {
operateMap.put(val, "askFinalClue");
return;
}
if (OperateEnum.performTask.equals(operateEnum)) {
operateMap.put(val, "performTask");
}
});
}
}
private final List<String> methodIds;
private String name;
OperateEnum(List<String> methodIds, String name) {
this.methodIds = methodIds;
this.name = name;
}
public static String getOperateName(String methodId) {
return operateMap.get(methodId);
}
}
package com.qiwu.inference.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
@Data
public class PartnerItemDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 数量上限
*/
private int max;
/**
* 背包已有物品
*/
private Map<Integer, ItemNumDto> itemInfoMap = new HashMap<>();
}
...@@ -17,6 +17,11 @@ public class Person implements Serializable { ...@@ -17,6 +17,11 @@ public class Person implements Serializable {
private Integer id; private Integer id;
/** /**
* 人物ID
*/
private Integer personId;
/**
* 人物名称 * 人物名称
*/ */
private String name; private String name;
......
...@@ -2,7 +2,39 @@ package com.qiwu.inference.dto; ...@@ -2,7 +2,39 @@ package com.qiwu.inference.dto;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@Data @Data
public class PersonInfoDto { public class PersonInfoDto {
/**
* 人物编号
*/
private Integer id;
/**
* 人物掌握的线索, Map<线索id, 线索来源>,其中"线索来源"记录的是线索从哪个人物获得
*/
private Map<Integer, List<Integer>> clueSourceMap = new ConcurrentHashMap<>();
/**
* 人物的需求任务, Map<任务id, 线索开关>,其中“线索开关”标记任务状态-2/-1/0/1/2/5
*/
private Map<Integer, Integer> demandTaskSwitchMap = new ConcurrentHashMap<>();
/**
* 信任度
*/
private Integer trustDegree = 50;
/**
* 威胁
*/
private Integer deterrenceDegree = 50;
/**
* 人物生命状态,0-活着,1-死亡
*/
private int lifeState = 0;
/**
* 起过作用的伙伴物品id
*/
List<Integer> partnerItemIdList = new ArrayList<>();
} }
package com.qiwu.inference.dto; package com.qiwu.inference.dto;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.utils.FastJsonUtil;
import com.qiwu.inference.common.utils.RandomUtil;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
...@@ -11,7 +8,6 @@ import java.io.BufferedReader; ...@@ -11,7 +8,6 @@ import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileReader; import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.math.BigInteger;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -21,21 +17,17 @@ import java.util.Map; ...@@ -21,21 +17,17 @@ import java.util.Map;
public class Player { public class Player {
/** /**
* 会话id * 玩家id
*/ */
private String sid; private String uid;
/** /**
* 关卡编号 * 系列名称
*/
private String gateNo;
/**
* 关卡等级
*/ */
private String level; private String series;
/** /**
* 当前等级通关总次数 * 关卡编号
*/ */
private String total; private String gateNo;
/** /**
* 当前关卡完成状态:0-未完成,1-已完成 * 当前关卡完成状态:0-未完成,1-已完成
*/ */
...@@ -63,34 +55,33 @@ public class Player { ...@@ -63,34 +55,33 @@ public class Player {
/** /**
* 人物集合 * 人物集合
*/ */
private Map<Integer,Person> personMap = new HashMap<>(); private Map<Integer, PersonInfoDto> personInfoMap = new HashMap<>();
/** /**
* 人物的姓名和编号转换 map * 人物的姓名和编号转换 map
*/ */
private Map<String,Integer> name2IdMap = new HashMap<>(); private Map<String,Integer> name2IdMap = new HashMap<>();
/** /**
* 当前关卡的货币 * 人物的编号和姓名转换 map
*/ */
private Double currency = 3000.0; private Map<Integer, String> id2NameMap = new HashMap<>();
/** /**
* 当前关卡的积分 * 当前关卡已消耗的货币
*/ */
private Integer point = 0; private Double currency;
/** /**
* 总货币 * 当前关卡声望值
*/ */
private Double totalCurrency = 0.0; private int reputation = 0;
/** /**
* 总积分 * 当前关卡的积分
*/ */
private Integer totalPoint = 0; private Integer point = 0;
/** /**
* 已获得人物线索: Map<人物id, Map<线索类型id, List<线索>>。没有线索则仅仅对话过 * 已获得人物线索: Map<人物id, Map<线索类型id, List<线索>>。没有线索则仅仅对话过
*/ */
private Map<Integer,Map<Integer,List<ClueDto>>> clueMap = new HashMap<>(); private Map<Integer,Map<Integer,List<ClueInfoDto>>> clueMap = new HashMap<>();
/** /**
* 场所表 * 场所表
...@@ -127,6 +118,21 @@ public class Player { ...@@ -127,6 +118,21 @@ public class Player {
*/ */
private int chatTimes = 0; private int chatTimes = 0;
/**
* 记录玩家操作提示的序号
*/
private int operateTextNum = 1;
/**
* 记录玩家询问操作的每个操作对应线索的序号
*/
private Map<String, Integer> askAndNumMap = new HashMap<>();
/**
* 初始时间值
*/
private int initTime;
// public Player(){ // public Player(){
// //初始化推理游戏人物 // //初始化推理游戏人物
// List<String> keys = new ArrayList<>(TimingAcquisition.gateInfoMap.keySet()); // List<String> keys = new ArrayList<>(TimingAcquisition.gateInfoMap.keySet());
......
package com.qiwu.inference.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
@Data
public class PlayerSeriesDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 关卡等级
*/
private int level = 1;
/**
* 当前等级通关总次数
*/
private int clearanceNum = 0;
/**
* 总货币
*/
private int money;
/**
* 系列总声望值
*/
private ReputationDto totalReputation;
/**
* Map<物品类型, 物品信息>
*/
private Map<Integer, PartnerItemDto> partnerItemMap = new HashMap<>();
}
...@@ -11,7 +11,7 @@ public class PostTaskDto { ...@@ -11,7 +11,7 @@ public class PostTaskDto {
*/ */
private Integer personId; private Integer personId;
/** /**
* 后置任务的前置任务完成情况: Map<后置任务id, Map<前置任务id, 完成状态>> * 后置任务的前置任务完成情况: Map<后置任务id, 对象{前置任务id, 前置任务完成状态}>
*/ */
Map<Integer, TaskStatusDto> taskStatusMap; Map<Integer, TaskStatusDto> taskStatusMap;
} }
...@@ -20,12 +20,12 @@ public class RelationDto implements Serializable { ...@@ -20,12 +20,12 @@ public class RelationDto implements Serializable {
/** /**
* 关系名称 * 关系名称
*/ */
private String name; // private String name;
/** /**
* 关系描述 * 关系描述
*/ */
private String description; // private String description;
/** /**
* 类型 * 类型
......
package com.qiwu.inference.dto;
import lombok.Data;
import java.util.Map;
@Data
public class ReplyDto {
/**
* 主体id
*/
private Integer subjectId;
/**
* 客体id
*/
private Integer objectId;
/**
* 任务id
*/
private Integer demandTaskId;
/**
* 响应方式:1-闲聊,2-发布任务,3-执行任务
*/
private int type;
/**
* 序号,按顺序取对应话术
*/
private int num = 0;
/**
* 掉落的人或物
*/
private Map<Integer, Integer> idNumMap;
}
package com.qiwu.inference.dto;
import lombok.Data;
import org.jetbrains.annotations.NotNull;
import java.io.Serializable;
@Data
public class ReputationDto implements Comparable, Serializable {
private static final long serialVersionUID = 1L;
/**
* 玩家uid
*/
private String uid;
/**
* 声望值
*/
private int reputation = 0;
@Override
public int compareTo(@NotNull Object o) {
ReputationDto reputationDto = (ReputationDto) o;
return reputationDto.getReputation() - reputation;
}
}
...@@ -10,6 +10,14 @@ public class CallRequest { ...@@ -10,6 +10,14 @@ public class CallRequest {
*/ */
private String 操作名; private String 操作名;
/** /**
* 系列名称
*/
private String 系列名称;
/**
* 关卡名称
*/
private String 关卡名称;
/**
* 方法编号 * 方法编号
*/ */
private String 方法编号; private String 方法编号;
...@@ -65,4 +73,8 @@ public class CallRequest { ...@@ -65,4 +73,8 @@ public class CallRequest {
* 线索类型 * 线索类型
*/ */
private String 线索类型; private String 线索类型;
/**
* 伙伴物品名称
*/
private String 伙伴物品名称;
} }
package com.qiwu.inference.dto.request; package com.qiwu.inference.dto.request;
import com.qiwu.inference.dto.ClueDto; import com.qiwu.inference.dto.ClueDto;
import com.qiwu.inference.dto.ClueInfoDto;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
import lombok.Data; import lombok.Data;
...@@ -13,6 +14,18 @@ public class OperationRequest { ...@@ -13,6 +14,18 @@ public class OperationRequest {
*/ */
private String operate; private String operate;
/** /**
* 操作标签
*/
private int operateLabel;
/**
* 系列名称
*/
private String series;
/**
* 关卡名称
*/
private String gateName;
/**
* 方法编号 * 方法编号
*/ */
private String methodId; private String methodId;
...@@ -73,9 +86,13 @@ public class OperationRequest { ...@@ -73,9 +86,13 @@ public class OperationRequest {
*/ */
private Integer clueTypeId; private Integer clueTypeId;
/** /**
* 道具名称,即伙伴物品名称
*/
private Integer partnerItemId;
/**
* 玩家获得某人的线索集合 * 玩家获得某人的线索集合
*/ */
private List<ClueDto> clueList; private List<ClueInfoDto> clueList;
/** /**
* 集合待查看的索引 * 集合待查看的索引
*/ */
...@@ -88,4 +105,8 @@ public class OperationRequest { ...@@ -88,4 +105,8 @@ public class OperationRequest {
* 序号 * 序号
*/ */
private Integer num; private Integer num;
/**
* String集合
*/
private List<String> strList;
} }
...@@ -5,7 +5,9 @@ import lombok.Data; ...@@ -5,7 +5,9 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
public class InferenceResponse implements Serializable { public class CallResponse implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 返回状态码 * 返回状态码
*/ */
...@@ -17,5 +19,5 @@ public class InferenceResponse implements Serializable { ...@@ -17,5 +19,5 @@ public class InferenceResponse implements Serializable {
/** /**
* 返回内容 * 返回内容
*/ */
private DataResponse data; private String data;
} }
...@@ -25,4 +25,8 @@ public class ResultResponse { ...@@ -25,4 +25,8 @@ public class ResultResponse {
* 保存附加返回 * 保存附加返回
*/ */
private String 保存附加返回; private String 保存附加返回;
/**
* 当前对话角色身份
*/
private String 当前对话角色身份;
} }
package com.qiwu.inference.factory;
import com.qiwu.inference.dto.response.CallResponse;
import com.qiwu.inference.service.remote.RemoteService;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@Component
public class RemoteCallFactory implements ApplicationContextAware {
/**
* 存储策略
*/
private final static Map<String, RemoteService> remoteServiceMap = new HashMap<>();
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
Map<String, RemoteService> serviceMap = applicationContext.getBeansOfType(RemoteService.class);
serviceMap.values().forEach(remoteService -> remoteServiceMap.put(remoteService.getResource(), remoteService));
}
private static class createFactorySingleton {
private static final RemoteCallFactory remoteCallFactory = new RemoteCallFactory();
}
public static RemoteCallFactory getInstance() {
return createFactorySingleton.remoteCallFactory;
}
public CallResponse getRemoteResult(String uid, String resource) {
RemoteService remoteService = remoteServiceMap.get(resource);
if (Objects.isNull(remoteService)) {
throw new RuntimeException("远程服务配置异常");
}
return remoteService.getItems(uid);
}
public CallResponse updateItems(String uid, String resource) throws IOException {
RemoteService remoteService = remoteServiceMap.get(resource);
if (Objects.isNull(remoteService)) {
throw new RuntimeException("远程服务配置异常");
}
return remoteService.updateItems(uid);
}
}
package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import lombok.Data;
import java.io.Serializable;
@Data
public class BackpackNum implements Serializable {
private static final long serialVersionUID = 1L;
@CsvBindByName(column = "ID")
private Integer id;
@CsvBindByName(column = "声望值")
private Integer reputation;
@CsvBindByName(column = "数量上限")
private Integer max;
}
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindAndJoinByName;
import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -9,36 +11,42 @@ import java.io.Serializable; ...@@ -9,36 +11,42 @@ import java.io.Serializable;
public class ChatSpeech implements Serializable { public class ChatSpeech implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("意图反馈") @CsvBindByName(column = "意图反馈")
private Integer methodId; private Integer methodId;
@ApiModelProperty("身份") @CsvBindByName(column = "身份")
private String identity; private String identity;
@ApiModelProperty("人物ID") @CsvBindByName(column = "人物名称")
private Integer personId; private String personName;
@ApiModelProperty("性别") @CsvBindByName(column = "性别")
private String gender; private String gender;
@ApiModelProperty("年龄段") @CsvBindByName(column = "年龄段")
private String age; private String age;
@ApiModelProperty("性格A") @CsvBindByName(column = "性格A")
private String dispositionIds; private String dispositionIds;
@ApiModelProperty("行为") @CsvBindByName(column = "行为")
private String behaviour; private String behaviour;
@ApiModelProperty("任务状态") @CsvBindByName(column = "任务状态")
private String taskStatus; private String taskStatus;
@ApiModelProperty("关系") @CsvBindByName(column = "信任值")
private String degree; private String trust;
@ApiModelProperty("文本内容") @CsvBindByName(column = "威慑度")
private String deterrence;
@CsvBindByName(column = "时间")
private String time;
@CsvBindByName(column = "文本内容")
private String answer; private String answer;
@ApiModelProperty("通用标签") @CsvBindByName(column = "通用标签")
private String flag; private String flag;
} }
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel; import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModel;
import lombok.Getter; import io.swagger.annotations.ApiModelProperty;
import lombok.Setter; import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date; import java.io.Serializable;
import java.util.Date;
/**
* <p> /**
* * <p>
* </p> *
* * </p>
* @author xingxing.ye *
* @since 2022-11-07 * @author xingxing.ye
*/ * @since 2022-11-07
@Getter */
@Setter @Getter
@ApiModel(value = "Clue对象", description = "") @Setter
public class Clue implements Serializable { @ApiModel(value = "Clue对象", description = "")
public class Clue implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
@TableId(value = "id", type = IdType.AUTO) @CsvBindByName(column = "线索ID")
private Integer id; @TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("线索名称")
private String name; @CsvBindByName(column = "线索名称")
private String name;
@ApiModelProperty("描述")
private String description; @CsvBindByName(column = "对应类型")
private Integer type;
@ApiModelProperty("类型: 1:身份 2:场所 3:性格爱好 4:行为 5:关系 6:任务")
private Integer type; @CsvBindByName(column = "对应ID")
private Integer associatedId;
@ApiModelProperty("对应的Id")
private Integer associatedId; @CsvBindByName(column = "信息重要级别")
private Integer infoLevel;
@ApiModelProperty("线索模板")
private String clueTemplate; @CsvBindByName(column = "信任度")
private Integer trustDegree;
@ApiModelProperty("信息级别")
private Integer infoLevel; @CsvBindByName(column = "威胁")
private Integer threaten;
@ApiModelProperty("信任度") }
private Integer trustDegree;
@ApiModelProperty("威胁")
private Integer threaten;
@ApiModelProperty("操作1|信任度|威胁")
private Integer operate;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
}
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -9,39 +10,39 @@ import java.io.Serializable; ...@@ -9,39 +10,39 @@ import java.io.Serializable;
public class ClueSpeech implements Serializable { public class ClueSpeech implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("线索ID") @CsvBindByName(column = "线索ID")
private Integer clueId; private Integer clueId;
@ApiModelProperty("任务名称") @CsvBindByName(column = "任务名称")
private String taskName; private String taskName;
@ApiModelProperty("身份1") @CsvBindByName(column = "身份1")
private String identity; private String identity;
@ApiModelProperty("性别") @CsvBindByName(column = "性别")
private String gender; private String gender;
@ApiModelProperty("人物ID") @CsvBindByName(column = "人物ID")
private Integer personId; private Integer personId;
@ApiModelProperty("年龄段") @CsvBindByName(column = "年龄段")
private String age; private String age;
@ApiModelProperty("性格A") @CsvBindByName(column = "性格A")
private String dispositionIds; private String dispositionIds;
@ApiModelProperty("行为") @CsvBindByName(column = "行为")
private String behaviour; private String behaviour;
@ApiModelProperty("任务状态") @CsvBindByName(column = "任务状态")
private Integer status; private Integer status;
@ApiModelProperty("线索文本") @CsvBindByName(column = "线索文本")
private String answer; private String answer;
@ApiModelProperty("自身线索文本") @CsvBindByName(column = "自身线索文本")
private String answerSelf; private String answerSelf;
@ApiModelProperty("通用标签") @CsvBindByName(column = "通用标签")
private Integer flag; private Integer flag;
} }
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import lombok.Data; import lombok.Data;
@Data @Data
public class ClueType { public class ClueType {
@CsvBindByName(column = "线索类型ID")
private Integer id; private Integer id;
@CsvBindByName(column = "类型名称")
private String name; private String name;
} }
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import io.swagger.annotations.ApiModel; import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModel;
import lombok.Getter; import io.swagger.annotations.ApiModelProperty;
import lombok.Setter; import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date; import java.io.Serializable;
import java.util.Date;
/**
* <p> /**
* * <p>
* </p> *
* * </p>
* @author xingxing.ye *
* @since 2022-11-02 * @author xingxing.ye
*/ * @since 2022-11-02
@Getter */
@Setter @Getter
@ApiModel(value = "Disposition对象", description = "") @Setter
public class Disposition implements Serializable { @ApiModel(value = "Disposition对象", description = "")
public class Disposition implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@ApiModelProperty("性格id")
private Integer id; @CsvBindByName(column = "ID")
private Integer id;
@ApiModelProperty("性格名称")
private String name; @CsvBindByName(column = "名称")
private String name;
@ApiModelProperty("性格描述")
private String description; @CsvBindByName(column = "描述")
private String description;
@ApiModelProperty("类型")
private String type; @CsvBindByName(column = "类型")
private String type;
@ApiModelProperty("基础权重")
private Integer weight; // @CsvBindByName(column = "基础权重")
// private Integer weight;
@ApiModelProperty("身份影响权重:")
private String identityWeight; // @CsvBindByName(column = "身份影响权重:")
// private String identityWeight;
@ApiModelProperty("性别影响概率:")
private String genderWeight; // @CsvBindByName(column = "性别影响概率:")
// private String genderWeight;
@ApiModelProperty("年龄影响权重:")
private String ageWeight; // @CsvBindByName(column = "年龄影响权重:")
// private String ageWeight;
@ApiModelProperty("好感度初始值:")
private String favorDegree; // @CsvBindByName(column = "好感度初始值:")
// private String favorDegree;
@ApiModelProperty("弱点条件:")
private String weaknessCondition; // @CsvBindByName(column = "弱点条件:")
// private String weaknessCondition;
@ApiModelProperty("对应物品|好感度增减:")
private String itemFavorDegree; // @CsvBindByName(column = "对应物品|好感度增减:")
// private String itemFavorDegree;
@ApiModelProperty("对应身份|好感度增减:")
private String identityFavorDegree; // @CsvBindByName(column = "对应身份|好感度增减:")
// private String identityFavorDegree;
@ApiModelProperty("互斥性格|喜好:")
private String exclusionDisposition; // @CsvBindByName(column = "互斥性格|喜好:")
// private String exclusionDisposition;
@ApiModelProperty("信息重要级别")
private Integer infoLevel; @CsvBindByName(column = "信息级别")
private Integer infoLevel;
}
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
}
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
...@@ -23,32 +24,21 @@ public class Location implements Serializable { ...@@ -23,32 +24,21 @@ public class Location implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("场所id") @CsvBindByName(column = "ID")
private Integer id; private Integer id;
@ApiModelProperty("场所名称") @CsvBindByName(column = "场所名称")
private String name; private String name;
@ApiModelProperty("描述") @CsvBindByName(column = "描述")
private String description; private String description;
@ApiModelProperty("关键场所") @CsvBindByName(column = "关键场所")
private String keyLocation; private String keyLocation;
@ApiModelProperty("是否隐藏") @CsvBindByName(column = "是否隐藏")
private String isHidden; private String isHidden;
@ApiModelProperty("是否必现") @CsvBindByName(column = "是否必现")
private String isAppear; private String isAppear;
@ApiModelProperty("对应线索模板:")
private String clueTemplate;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
} }
package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class OperateSpeech implements Serializable {
private static final long serialVersionUID = 1L;
@CsvBindByName(column = "ID")
private Integer id;
@CsvBindByName(column = "操作提示文本")
private String answer;
}
package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import lombok.Data;
import java.io.Serializable;
@Data
public class PartnerItem implements Serializable {
private static final long serialVersionUID = 1L;
@CsvBindByName(column = "ID")
private Integer id;
@CsvBindByName(column = "名称")
private String name;
@CsvBindByName(column = "类型")
private Integer type;
@CsvBindByName(column = "能力描述")
private String abilityDes;
@CsvBindByName(column = "能力对应人物性格ID")
private String dispositions;
@CsvBindByName(column = "能力对应人物身份ID")
private String identity;
@CsvBindByName(column = "信任增减")
private Integer trust;
@CsvBindByName(column = "威慑增减")
private Integer deterrence;
@CsvBindByName(column = "对应任务ID")
private Integer taskId;
@CsvBindByName(column = "使用次数")
private Integer helpTimes;
@CsvBindByName(column = "获取概率")
private Double probability;
@CsvBindByName(column = "能力使用文本")
private String answer;
@CsvBindByName(column = "能力使用最终文本")
private String lastAnswer;
@CsvBindByName(column = "离队文本")
private String leaveAnswer;
}
package com.qiwu.inference.pojo;
import com.qiwu.inference.dto.DispositionDto;
import lombok.Data;
import java.util.List;
@Data
public class PersonPojo {
/**
* 人物ID
*/
private Integer id;
/**
* 人物名称
*/
private String name;
/**
* 身份id
*/
private Integer identityId;
/**
* 身份名称
*/
private String identityName;
/**
* 年龄
*/
private Integer age;
/**
* 是否为关键人物 1 关键人物 2 普通人物
*/
private Integer isKey;
/**
* 性别
*/
private Integer gender;
/**
* 所在地
*/
private String location;
/**
* 人物拥有的性格
*/
private List<DispositionDto> dispositions;
}
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -9,18 +10,18 @@ import java.io.Serializable; ...@@ -9,18 +10,18 @@ import java.io.Serializable;
public class PersonSpeech implements Serializable { public class PersonSpeech implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("ID") @CsvBindByName(column = "ID")
private Integer personId; private Integer personId;
@ApiModelProperty("人物名称") @CsvBindByName(column = "人物名称")
private String name; private String name;
@ApiModelProperty("人物描述") @CsvBindByName(column = "人物描述")
private String description; private String description;
@ApiModelProperty("首次回复") @CsvBindByName(column = "首次回复")
private String firstAnswer; private String firstAnswer;
@ApiModelProperty("回复") @CsvBindByName(column = "回复")
private String answer; private String answer;
} }
package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class PreReasonSpeech implements Serializable {
private static final long serialVersionUID = 1L;
@CsvBindByName(column = "线索ID")
private Integer demandTaskId;
@CsvBindByName(column = "任务ID")
private Integer clueId;
@CsvBindByName(column = "任务名称")
private String taskName;
@CsvBindByName(column = "自身身份")
private Integer identity;
@CsvBindByName(column = "对方身份")
private Integer identitySide;
@CsvBindByName(column = "性别")
private String gender;
@CsvBindByName(column = "人物名称")
private Integer personName;
@CsvBindByName(column = "年龄段")
private String age;
@CsvBindByName(column = "性格A")
private Integer dispositionId;
@CsvBindByName(column = "关系")
private Integer relation;
@CsvBindByName(column = "行为")
private Integer behaviour;
@CsvBindByName(column = "第三方描述")
private String answer;
@CsvBindByName(column = "自身描述")
private String answerSelf;
@CsvBindByName(column = "通用标签")
private Integer flag;
}
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import lombok.Data; import lombok.Data;
@Data @Data
...@@ -7,25 +8,21 @@ public class SystemConfigPojo { ...@@ -7,25 +8,21 @@ public class SystemConfigPojo {
/** /**
* 系统参数名称 * 系统参数名称
*/ */
@CsvBindByName(column = "名称")
private String name; private String name;
/** /**
* 系统参数值 * 系统参数值
*/ */
@CsvBindByName(column = "值")
private String value; private String value;
/** /**
* 参数说明 * 参数说明
*/ */
@CsvBindByName(column = "描述")
private String description; private String description;
/** /**
* 参数状态:0-不可用,1-可用 * 参数状态:0-不可用,1-可用
*/ */
@CsvBindByName(column = "状态")
private Integer status; private Integer status;
/**
* 创建时间
*/
private String createTime;
/**
* 修改时间
*/
private String updateTime;
} }
package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import lombok.Data;
@Data
public class TaskConditionPojo {
/**
* 任务条件id
*/
@CsvBindByName(column = "ID")
private Integer id;
/**
* 操作列表ID
*/
@CsvBindByName(column = "操作列表ID")
private Integer methodId;
/**
* 类型
*/
@CsvBindByName(column = "类型")
private int type;
}
package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import lombok.Data;
@Data
public class TaskExceptionSpeech {
private static final long serialVersionUID = 1L;
@CsvBindByName(column = "反馈ID")
private Integer id;
@CsvBindByName(column = "反馈文本")
private String answer;
}
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -9,45 +10,54 @@ import java.io.Serializable; ...@@ -9,45 +10,54 @@ import java.io.Serializable;
public class TaskSpeech implements Serializable { public class TaskSpeech implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("线索ID") @CsvBindByName(column = "线索ID")
private Integer demandTaskId; private Integer demandTaskId;
@ApiModelProperty("任务名称") @CsvBindByName(column = "任务名称")
private String taskName; private String taskName;
@ApiModelProperty("身份1") @CsvBindByName(column = "身份1")
private String identity; private String identity;
@ApiModelProperty("性别") @CsvBindByName(column = "性别")
private String gender; private String gender;
@ApiModelProperty("人物ID") @CsvBindByName(column = "人物ID")
private Integer personId; private Integer personId;
@ApiModelProperty("年龄段") @CsvBindByName(column = "年龄段")
private String age; private String age;
@ApiModelProperty("性格A") @CsvBindByName(column = "性格A")
private String dispositionIds; private String dispositionIds;
@ApiModelProperty("行为") @CsvBindByName(column = "行为")
private String behaviour; private String behaviour;
@ApiModelProperty("任务状态") @CsvBindByName(column = "任务状态")
private Integer status; private Integer status;
@ApiModelProperty("进行中任务询问") @CsvBindByName(column = "进行中任务询问")
private String doingAsk; private String doingAsk;
@ApiModelProperty("进行中任务完成提醒") @CsvBindByName(column = "进行中任务完成提醒")
private String doingFinishedAnswer; private String doingFinishedAnswer;
@ApiModelProperty("未进行中任务完成提醒") @CsvBindByName(column = "未进行中任务完成提醒")
private String noDoingFinishedAnswer; private String noDoingFinishedAnswer;
@ApiModelProperty("完成对话文本") @CsvBindByName(column = "任务启动文本")
private String startAnswer;
@CsvBindByName(column = "任务操作提醒")
private String replyAnswer;
@CsvBindByName(column = "完成对话文本")
private String answer; private String answer;
@ApiModelProperty("通用标签") @CsvBindByName(column = "任务中断/关闭文本")
private String closeAnswer;
@CsvBindByName(column = "通用标签")
private Integer flag; private Integer flag;
} }
package com.qiwu.inference.pojo; package com.qiwu.inference.pojo;
import com.opencsv.bean.CsvBindByName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -9,15 +10,15 @@ import java.io.Serializable; ...@@ -9,15 +10,15 @@ import java.io.Serializable;
public class TipSpeech implements Serializable { public class TipSpeech implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("ID") @CsvBindByName(column = "ID")
private Integer demandTaskId; private Integer demandTaskId;
@ApiModelProperty("关于自身线索的指引") @CsvBindByName(column = "关于自身线索的指引")
private String selfClue; private String selfClue;
@ApiModelProperty("关于他人线索的指引") @CsvBindByName(column = "关于他人线索的指引")
private String otherClue; private String otherClue;
@ApiModelProperty("关于任务的指引") @CsvBindByName(column = "关于任务的指引")
private String taskClue; private String taskClue;
} }
...@@ -18,7 +18,7 @@ import org.springframework.util.StringUtils; ...@@ -18,7 +18,7 @@ import org.springframework.util.StringUtils;
@Service @Service
public class AskServiceImpl implements AskService { public class AskServiceImpl implements AskService {
private Logger log = LoggerFactory.getLogger(AskServiceImpl.class); Logger log = LoggerFactory.getLogger(AskServiceImpl.class);
//从yml配置文件中取出对话过期时间 //从yml配置文件中取出对话过期时间
@Value("${expireTime}") @Value("${expireTime}")
......
...@@ -8,4 +8,6 @@ public interface BarrierService { ...@@ -8,4 +8,6 @@ public interface BarrierService {
CommonResult<ResultVarsResponse> operate(OperationRequest operationReq); CommonResult<ResultVarsResponse> operate(OperationRequest operationReq);
CommonResult<ResultVarsResponse> cancel(OperationRequest operationReq); CommonResult<ResultVarsResponse> cancel(OperationRequest operationReq);
CommonResult<ResultVarsResponse> changePlace(OperationRequest operationReq);
} }
package com.qiwu.inference.service.barrier.impl; package com.qiwu.inference.service.barrier.impl;
import com.alibaba.fastjson.JSON;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.cache.CacheGlobal; import com.qiwu.inference.common.cache.CacheGlobal;
import com.qiwu.inference.common.utils.CacheUtil; import com.qiwu.inference.common.utils.*;
import com.qiwu.inference.common.utils.PlayerUtil; import com.qiwu.inference.dto.*;
import com.qiwu.inference.common.utils.RandomUtil;
import com.qiwu.inference.common.utils.SpeechUtil;
import com.qiwu.inference.dto.DemandTaskDto;
import com.qiwu.inference.dto.Player;
import com.qiwu.inference.dto.PostTaskDto;
import com.qiwu.inference.dto.PostTaskRecordDto;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.CallResponse;
import com.qiwu.inference.dto.response.ResultResponse; import com.qiwu.inference.dto.response.ResultResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
import com.qiwu.inference.factory.RemoteCallFactory;
import com.qiwu.inference.service.barrier.BarrierService; import com.qiwu.inference.service.barrier.BarrierService;
import com.qiwu.inference.service.common.CommonService; import com.qiwu.inference.service.common.CommonService;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -24,8 +21,10 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -24,8 +21,10 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.concurrent.ExecutorService;
@Service @Service
public class BarrierServiceImpl implements BarrierService { public class BarrierServiceImpl implements BarrierService {
...@@ -37,6 +36,10 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -37,6 +36,10 @@ public class BarrierServiceImpl implements BarrierService {
@Autowired @Autowired
private CommonService commonService; private CommonService commonService;
@Resource(name = "threadPoolInstance")
private ExecutorService executorService;
@Autowired
private RedisUtil redisUtil;
@Override @Override
public CommonResult<ResultVarsResponse> operate(OperationRequest operationReq) { public CommonResult<ResultVarsResponse> operate(OperationRequest operationReq) {
...@@ -47,117 +50,139 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -47,117 +50,139 @@ public class BarrierServiceImpl implements BarrierService {
String methodId = operationReq.getMethodId(); //方法编号 String methodId = operationReq.getMethodId(); //方法编号
Integer subjectId = operationReq.getSubjectId(); //人物名称1 Integer subjectId = operationReq.getSubjectId(); //人物名称1
String locationId = operationReq.getLocationId(); //场所名称 String locationId = operationReq.getLocationId(); //场所名称
//当前玩家上一轮的请求信息 if (!StringUtils.isEmpty(subjectId)) {
OperationRequest lastReq = (OperationRequest) CacheUtil.get(uid); if (subjectId == Constants.REQ_NON) {
if (!StringUtils.isEmpty(lastReq)) { //获取对应话术
if (Constants.OPERATE_BARRIER.equals(lastReq.getOperate())) { String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400203);
methodId = (methodId == null) ? lastReq.getMethodId() : methodId; resultResponse.set反馈ID(400203);
subjectId = (subjectId == null) ? lastReq.getSubjectId() : subjectId; resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
} }
} }
operationReq.setOperate(Constants.OPERATE_BARRIER); operationReq.setOperate(Constants.OPERATE_BARRIER);
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId); String seriesName = player.getSeries(); //系列名称
//场所移动 //场所移动
if ("4001".equals(methodId)) { if ("4001".equals(methodId)) {
//离开,或者没有说明去哪和找谁 //离开,或者没有说明去哪和找谁
if (StringUtils.isEmpty(subjectId) && StringUtils.isEmpty(locationId)) { if (StringUtils.isEmpty(subjectId) && StringUtils.isEmpty(locationId)) {
String locationText = PlayerUtil.getLocations(uid); String locationText = PlayerUtil.getLocations(uid);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400105); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400105);
text = SpeechUtil.speechReplaceNum(text, locationText); text = SpeechUtil.speechReplaceNum(text, locationText);
resultResponse.set反馈ID(400105); resultResponse.set反馈ID(400105);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
String text = "";
//玩家提供的人物名称 //玩家提供的人物名称
if (!StringUtils.isEmpty(subjectId)) { if (!StringUtils.isEmpty(subjectId)) {
//获取人物所在场所 //获取人物所在场所
locationId = player.getPersonMap().get(subjectId).getLocation(); locationId = PlayerUtil.getPerson(uid, subjectId).getLocation();
// String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
//获取对应话术
text = SpeechUtil.getPersonFirstSpeech(uid, locationId, subjectId); //第一次见面时的话术
// if (!StringUtils.isEmpty(text) && !"".equals(text)) {
// text = SpeechUtil.replaceHeader(text, subjectName);
// }
//更新场所和人物
player.setLocation(locationId);
player.setPersonId(subjectId);
//----------------解锁场所-------------
PlayerUtil.unlockLocation(player.getLocationMap(), locationId);
// List<Integer> personIdList = new ArrayList<>();
// personIdList.add(subjectId);
//-------------查找这个人物所有的后置任务和自动触发的任务--------------
List<PostTaskDto> postTaskList = PlayerUtil.getDemandTaskHavePre(uid, subjectId);
if (postTaskList.size() != 0) {
//---------------找到优先级高的任务---------------------
PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList);
//存在优先级高的任务
if (!StringUtils.isEmpty(postTaskRecord)) {
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, player.getLocation(), subjectId);
//------------------执行对应的任务操作------------------
resultVarsResponse = PlayerUtil.taskDoByLevel(uid, postTaskRecord);
text += resultVarsResponse.getVars().get反馈文本();
resultVarsResponse.getVars().set反馈文本(text);
resultVarsResponse.getVars().set当前对话角色身份(PlayerUtil.getPerson(uid, player.getPersonId()).getIdentityName());
return CommonResult.success(resultVarsResponse);
}
}
} else { } else {
//玩家提供的场所不存在 //玩家提供的场所不存在
if (Constants.NON_STR.equals(locationId)) { if (Constants.NON_STR.equals(locationId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400103); text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400103);
resultResponse.set反馈ID(400103); resultResponse.set反馈ID(400103);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//玩家提供序号的情况
OperationRequest lastReq = (OperationRequest) CacheUtil.get(uid);
if (!StringUtils.isEmpty(lastReq)) {
if (lastReq.getOperateLabel() == Constants.CHECK_LOCATION) {
String locationIdTemp = TypeConvertUtil.getNumFromList(lastReq.getStrList(), Integer.valueOf(locationId));
if (!StringUtils.isEmpty(locationIdTemp)) {
locationId = locationIdTemp;
//获取对应话术
// String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400106);
// text = SpeechUtil.speechReplaceNum(text, String.valueOf(lastReq.getStrList().size()));
// resultResponse.set反馈ID(400106);
// resultResponse.set反馈文本(text);
// resultVarsResponse.setVars(resultResponse);
// return CommonResult.success(resultVarsResponse);
}
}
}
List<Integer> personIdList = PlayerUtil.getPersonsByLocationId(uid, locationId); List<Integer> personIdList = PlayerUtil.getPersonsByLocationId(uid, locationId);
if (StringUtils.isEmpty(personIdList)) { if (StringUtils.isEmpty(personIdList)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400104); text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400104);
resultResponse.set反馈ID(400104); resultResponse.set反馈ID(400104);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//查找所有每个人物的后置任务情况 //-----------------查找所有每个人物的后置任务和自动触发任务的情况-------------------
List<PostTaskDto> postTaskList = PlayerUtil.getDemandTaskHavePre(uid, personIdList); List<PostTaskDto> postTaskList = PlayerUtil.getDemandTaskHavePre(uid, personIdList);
if (postTaskList.size() != 0) { if (postTaskList.size() != 0) {
//找到优先级高的任务 //-----------------找到优先级高的任务----------------
PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList); PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList);
//存在优先级高的任务 //存在优先级高的任务
if (!StringUtils.isEmpty(postTaskRecord)) { if (!StringUtils.isEmpty(postTaskRecord)) {
//前置任务已完成 subjectId = postTaskRecord.getPersonId();
if (postTaskRecord.getLevel() == 1 || postTaskRecord.getLevel() == 2) { //获取对应话术
subjectId = postTaskRecord.getPersonId(); text = SpeechUtil.getPersonFirstSpeech(uid, locationId, subjectId); //第一次见面时的话术
//----------------记录见过的人-------------- //更新场所和人物
PlayerUtil.recordClue(uid, subjectId); player.setLocation(locationId);
//任务自动完成 player.setPersonId(subjectId);
Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap(); //----------------解锁场所-------------
Map<Integer, Integer> map = taskMap.get(subjectId); PlayerUtil.unlockLocation(player.getLocationMap(), locationId);
map.put(postTaskRecord.getPostTaskId(), 1); //----------------记录见过的人--------------
player.setLocation(locationId); PlayerUtil.recordClue(uid, subjectId);
player.setPersonId(subjectId); //更新该NPC见面次数
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId()); PlayerUtil.updateMeetTimes(uid, player.getLocation(), subjectId);
if (!StringUtils.isEmpty(demandTask)) { //----------------------执行对应的任务操作------------------------
PlayerUtil.addThreshold(player.getPersonMap().get(subjectId), demandTask); resultVarsResponse = PlayerUtil.taskDoByLevel(uid, postTaskRecord);
String text = ""; text += resultVarsResponse.getVars().get反馈文本();
if (postTaskRecord.getLevel() == 1) { resultVarsResponse.getVars().set反馈文本(text);
//获取对应话术 resultVarsResponse.getVars().set当前对话角色身份(PlayerUtil.getPerson(uid, player.getPersonId()).getIdentityName());
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 1); return CommonResult.success(resultVarsResponse);
resultResponse.set反馈ID(400105);
}
if (postTaskRecord.getLevel() == 2) {
//获取对应话术
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 2);
resultResponse.set反馈ID(400106);
}
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//任务是本人发布的
if (postTaskRecord.getLevel() == 3) {
subjectId = postTaskRecord.getPersonId();
player.setLocation(locationId);
player.setPersonId(subjectId);
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId());
String text = "";
if (!StringUtils.isEmpty(demandTask)) {
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 3);
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
resultResponse.set反馈ID(400107);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
} }
} }
int index = RandomUtil.randomInt(personIdList.size()); int index = RandomUtil.randomInt(personIdList.size());
subjectId = personIdList.get(index); subjectId = personIdList.get(index);
subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
} }
//场所为隐藏,还未解锁 //场所为隐藏,还未解锁
if (Constants.IS_HIDDEN.equals(player.getLocationMap().get(locationId).getIsHidden())) { if (Constants.IS_HIDDEN.equals(player.getLocationMap().get(locationId).getIsHidden())) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400102); text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400102);
resultResponse.set反馈ID(400102); resultResponse.set反馈ID(400102);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -165,101 +190,83 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -165,101 +190,83 @@ public class BarrierServiceImpl implements BarrierService {
} }
player.setLocation(locationId); player.setLocation(locationId);
player.setPersonId(subjectId); player.setPersonId(subjectId);
String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
//获取对应话术
if (StringUtils.isEmpty(text)) {
text = SpeechUtil.getPersonSpeech(uid, locationId, subjectId);
text = SpeechUtil.replaceHeader(text, subjectName);
}
//----------------记录见过的人-------------- //----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId); PlayerUtil.recordClue(uid, subjectId);
//获取对应话术 //更新该NPC见面次数
String text = SpeechUtil.getPersonSpeech(uid, locationId, subjectId);
text = SpeechUtil.replaceHeader(text, subjectName);
//更新见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId); PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
// String call = (player.getPersonMap().get(subjectId).getGender() == 1) ? "他" : "她"; // String call = (player.getPersonMap().get(subjectId).getGender() == 1) ? "他" : "她";
//获取对应话术 //获取对应话术
// String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400101); // String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400101);
// text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.locationMap.get(locationId).getName(), subjectName, call); // text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.locationMap.get(locationId).getName(), subjectName, call);
resultResponse.set反馈ID(400101); resultResponse.set反馈ID(400101);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set当前对话角色身份(PlayerUtil.getPerson(uid, player.getPersonId()).getIdentityName());
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//当前玩家上一轮的请求信息
OperationRequest lastReq = (OperationRequest) CacheUtil.get(uid);
if (!StringUtils.isEmpty(lastReq)) {
if (Constants.OPERATE_BARRIER.equals(lastReq.getOperate())) {
methodId = (methodId == null) ? lastReq.getMethodId() : methodId;
subjectId = (subjectId == null) ? lastReq.getSubjectId() : subjectId;
}
}
//直接找人 //直接找人
if ("4002".equals(methodId)) { if ("4002".equals(methodId)) {
String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
//关卡中没有这个人物 //关卡中没有这个人物
if (StringUtils.isEmpty(player.getPersonMap().get(subjectId))) { if (StringUtils.isEmpty(PlayerUtil.getPerson(uid, subjectId))) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400203); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400203);
resultResponse.set反馈ID(400203); resultResponse.set反馈ID(400203);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//关卡中有这个人,但场所未知 //关卡中有这个人,但场所未知
if (StringUtils.isEmpty(player.getPersonMap().get(subjectId).getLocation())) { if (StringUtils.isEmpty(PlayerUtil.getPerson(uid, subjectId).getLocation())) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400204); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400204);
text = SpeechUtil.speechReplaceNum(text, subjectName); text = SpeechUtil.speechReplaceNum(text, subjectName);
resultResponse.set反馈ID(400204); resultResponse.set反馈ID(400204);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//查找所有这个人物的后置任务情况 //获取人物所在场所
locationId = PlayerUtil.getPerson(uid, subjectId).getLocation();
//---------------------查找所有这个人物的后置任务和自动触发任务的情况---------------------
List<PostTaskDto> postTaskList = PlayerUtil.getDemandTaskHavePre(uid, subjectId); List<PostTaskDto> postTaskList = PlayerUtil.getDemandTaskHavePre(uid, subjectId);
if (postTaskList.size() != 0) { if (postTaskList.size() != 0) {
//找到优先级高的任务 //---------------------------找到优先级高的任务----------------------------
PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList); PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList);
//存在优先级高的任务 //存在优先级高的任务
if (!StringUtils.isEmpty(postTaskRecord)) { if (!StringUtils.isEmpty(postTaskRecord)) {
//前置任务已完成 subjectId = postTaskRecord.getPersonId();
if (postTaskRecord.getLevel() == 1 || postTaskRecord.getLevel() == 2) { //获取对应话术
subjectId = postTaskRecord.getPersonId(); String text = SpeechUtil.getPersonFirstSpeech(uid, locationId, subjectId); //第一次见面时的话术
//----------------记录见过的人-------------- //更新场所和人物
PlayerUtil.recordClue(uid, subjectId); player.setLocation(locationId);
//任务自动完成 player.setPersonId(subjectId);
Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap(); //----------------记录见过的人--------------
Map<Integer, Integer> map = taskMap.get(subjectId); PlayerUtil.recordClue(uid, subjectId);
map.put(postTaskRecord.getPostTaskId(), 1); //更新该NPC见面次数
player.setLocation(locationId); PlayerUtil.updateMeetTimes(uid, player.getLocation(), subjectId);
player.setPersonId(subjectId); //----------------------执行对应的任务操作---------------------
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId()); resultVarsResponse = PlayerUtil.taskDoByLevel(uid, postTaskRecord);
if (!StringUtils.isEmpty(demandTask)) { text += resultVarsResponse.getVars().get反馈文本();
PlayerUtil.addThreshold(player.getPersonMap().get(subjectId), demandTask); resultVarsResponse.getVars().set反馈文本(text);
String text = ""; resultVarsResponse.getVars().set当前对话角色身份(PlayerUtil.getPerson(uid, player.getPersonId()).getIdentityName());
if (postTaskRecord.getLevel() == 1) { return CommonResult.success(resultVarsResponse);
//获取对应话术
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 1);
resultResponse.set反馈ID(400105);
}
if (postTaskRecord.getLevel() == 2) {
//获取对应话术
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 2);
resultResponse.set反馈ID(400106);
}
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//任务是本人发布的
if (postTaskRecord.getLevel() == 3) {
subjectId = postTaskRecord.getPersonId();
player.setLocation(locationId);
player.setPersonId(subjectId);
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId());
String text = "";
if (!StringUtils.isEmpty(demandTask)) {
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 3);
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
resultResponse.set反馈ID(400107);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
} }
} }
//获取人物所在场所
locationId = player.getPersonMap().get(subjectId).getLocation();
//跟玩家在同一场所 //跟玩家在同一场所
if (player.getLocation().equals(locationId)) { if (player.getLocation().equals(locationId)) {
player.setPersonId(subjectId); player.setPersonId(subjectId);
...@@ -281,9 +288,13 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -281,9 +288,13 @@ public class BarrierServiceImpl implements BarrierService {
//不在同一场所 //不在同一场所
//判断玩家是否已经获得了该人物的场所线索 //判断玩家是否已经获得了该人物的场所线索
boolean flag = PlayerUtil.checkLocationClue(player.getClueMap(), subjectId); boolean flag = PlayerUtil.checkLocationClue(player.getClueMap(), subjectId);
//没有获得该NPC的场所线索,但是去到某个场所见过该NPC,也可以找到该NPC
if (!flag) {
flag = PlayerUtil.checkHaveMeet(player.getLocationMap(), locationId, subjectId);
}
if (!flag) { if (!flag) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400204); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400204);
text = SpeechUtil.speechReplaceNum(text, subjectName); text = SpeechUtil.speechReplaceNum(text, subjectName);
resultResponse.set反馈ID(400205); resultResponse.set反馈ID(400205);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -294,9 +305,13 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -294,9 +305,13 @@ public class BarrierServiceImpl implements BarrierService {
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
operationReq.setMethodId("4001"); operationReq.setMethodId("4001");
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//----------------记录见过的人--------------
// PlayerUtil.recordClue(uid, subjectId);
// //更新该NPC见面次数
// PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400202); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400202);
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.locationMap.get(locationId).getName()); text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.seriesLocationMap.get(seriesName).get(locationId).getName());
resultResponse.set反馈ID(400202); resultResponse.set反馈ID(400202);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("关卡操作回复1"); resultResponse.set后台附加返回("关卡操作回复1");
...@@ -306,8 +321,8 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -306,8 +321,8 @@ public class BarrierServiceImpl implements BarrierService {
//重新开始 //重新开始
if ("400301".equals(methodId)) { if ("400301".equals(methodId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400301); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400301);
text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.systemConfigMap.get("money").getValue()); text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("money").getValue());
resultResponse.set反馈ID(400301); resultResponse.set反馈ID(400301);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("重试关卡回复1"); resultResponse.set后台附加返回("重试关卡回复1");
...@@ -319,7 +334,10 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -319,7 +334,10 @@ public class BarrierServiceImpl implements BarrierService {
//玩家本关卡的数据重置 //玩家本关卡的数据重置
PlayerUtil.resetPlayer(uid); PlayerUtil.resetPlayer(uid);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400302); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400302);
//获取开场白话术
String prologueText = SpeechUtil.getPrologueSpeech(uid, player.getGateNo());
text += prologueText;
resultResponse.set反馈ID(400302); resultResponse.set反馈ID(400302);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -328,7 +346,7 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -328,7 +346,7 @@ public class BarrierServiceImpl implements BarrierService {
//取消重新开始 //取消重新开始
if ("400303".equals(methodId)) { if ("400303".equals(methodId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400303); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400303);
resultResponse.set反馈ID(400303); resultResponse.set反馈ID(400303);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -337,9 +355,9 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -337,9 +355,9 @@ public class BarrierServiceImpl implements BarrierService {
//跳过关卡 //跳过关卡
if ("400401".equals(methodId)) { if ("400401".equals(methodId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400401); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400401);
text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.systemConfigMap.get("money").getValue()); text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("money").getValue());
resultResponse.set反馈ID(400301); resultResponse.set反馈ID(400401);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("放弃操作回复1"); resultResponse.set后台附加返回("放弃操作回复1");
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -350,8 +368,8 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -350,8 +368,8 @@ public class BarrierServiceImpl implements BarrierService {
//玩家本关卡的数据重置 //玩家本关卡的数据重置
PlayerUtil.playerGiveUp(uid); PlayerUtil.playerGiveUp(uid);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400402); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400402);
resultResponse.set反馈ID(400302); resultResponse.set反馈ID(400402);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
...@@ -359,15 +377,72 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -359,15 +377,72 @@ public class BarrierServiceImpl implements BarrierService {
//取消跳过关卡 //取消跳过关卡
if ("400403".equals(methodId)) { if ("400403".equals(methodId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400403); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400403);
resultResponse.set反馈ID(400303); resultResponse.set反馈ID(400403);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//退出当前关卡询问
if ("400501".equals(methodId)) {
//获取对应话术
String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400501);
resultResponse.set反馈ID(400501);
resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("退出操作回复1");
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//确认退出当前关卡
if ("400502".equals(methodId)) {
String series = player.getSeries();
//-----------存入redis缓存中-------------
redisUtil.setStr(series + "::"+ uid, JSON.toJSONString(TimingAcquisition.seriesPlayerMap.get(series).get(uid)));
String initMoney = TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("init_money").getValue();
if (StringUtils.isEmpty(initMoney)) {
executorService.execute(new Runnable() {
@Override
public void run() {
try {
CallResponse callResponse = RemoteCallFactory.getInstance().updateItems(uid, "gardenSys");
log.info(uid + "物品更新结果:" + callResponse.getMessage());
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
//获取对应话术
String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400502);
//玩家下线,数据保存
//更新玩家为离线状态
player.setStatus(Constants.OFFLINE);
//修改下线时间
player.setOfflineTime(DateUtil.getCurrentTime());
//创建玩家数据路径
String path = MD5Util.changeToPath(uid, player.getSeries());
//--------------持久化该玩家信息---------------
PersistenceUtil.saveDataToFile(path, player.getGateNo(), JSON.toJSONString(player));
//--------------持久化该玩家系列汇总的数据---------------
String dataPath = MD5Util.changeToDataPath(uid, player.getSeries());
PersistenceUtil.saveDataToFile(dataPath, uid, JSON.toJSONString(TimingAcquisition.seriesPlayerMap.get(player.getSeries()).get(uid)));
resultResponse.set反馈ID(400502);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//取消退出当前关卡
if ("400503".equals(methodId)) {
//获取对应话术
String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400503);
resultResponse.set反馈ID(400503);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400101); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400101);
resultResponse.set反馈ID(300101); resultResponse.set反馈ID(400101);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
...@@ -382,10 +457,34 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -382,10 +457,34 @@ public class BarrierServiceImpl implements BarrierService {
//清除缓存,本轮对话结束 //清除缓存,本轮对话结束
CacheGlobal.concurrentMap.remove(uid); CacheGlobal.concurrentMap.remove(uid);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400001); String text = SpeechUtil.getBarrierSpeech(uid, Constants.SPEECH_ASIDE, 400001);
resultResponse.set反馈ID(400001); resultResponse.set反馈ID(400001);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
@Override
public CommonResult<ResultVarsResponse> changePlace(OperationRequest operationReq) {
String uid = operationReq.getUid();
String locationId = operationReq.getLocationId();
Integer personId = operationReq.getSubjectId();
Player player = TimingAcquisition.playerMap.get(uid);
//没有指定场所和人物时
if (StringUtils.isEmpty(locationId) && StringUtils.isEmpty(personId)) {
operationReq.setMethodId("4002");
operationReq.setSubjectId(player.getPersonId());
} else if (!StringUtils.isEmpty(locationId) && StringUtils.isEmpty(personId)) {
//仅指定了场所
operationReq.setMethodId("4001");
} else if (StringUtils.isEmpty(locationId) && !StringUtils.isEmpty(personId)) {
//仅指定了人物
operationReq.setMethodId("4001");
} else {
//场所和人物均指定了
operationReq.setMethodId("4002");
}
return operate(operationReq);
}
} }
...@@ -2,6 +2,7 @@ package com.qiwu.inference.service.chat.impl; ...@@ -2,6 +2,7 @@ package com.qiwu.inference.service.chat.impl;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.utils.MD5Util;
import com.qiwu.inference.common.utils.NumberUtil; import com.qiwu.inference.common.utils.NumberUtil;
import com.qiwu.inference.common.utils.PlayerUtil; import com.qiwu.inference.common.utils.PlayerUtil;
import com.qiwu.inference.common.utils.SpeechUtil; import com.qiwu.inference.common.utils.SpeechUtil;
...@@ -35,20 +36,36 @@ public class ChatServiceImpl implements ChatService { ...@@ -35,20 +36,36 @@ public class ChatServiceImpl implements ChatService {
String methodId = operationReq.getMethodId(); //方法编号 String methodId = operationReq.getMethodId(); //方法编号
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
//对话人的信息 //对话人的信息
Person current = player.getPersonMap().get(player.getPersonId()); Person current = PlayerUtil.getPerson(uid, player.getPersonId());
String seriesName = player.getSeries(); //系列名称
//搭档名称
String partnerName = TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("partnerName").getValue();
//获取对应话术 //获取对应话术
String text = SpeechUtil.getChatSpeech(uid, current, methodId); String text = SpeechUtil.getChatSpeech(uid, current, methodId);
text = SpeechUtil.addHeader(text, current.getName()); text = SpeechUtil.addHeader(text, current.getName());
//闲聊连续对话次数超过指定次数,任务白名单中有该人已解锁或无需解锁的任务则进行提示 //闲聊连续对话次数超过指定次数,任务白名单中有该人已解锁或无需解锁的任务则进行提示
int chatTimes = Integer.parseInt(TimingAcquisition.systemConfigMap.get("chatTimes").getValue()); int chatTimes = Integer.parseInt(TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("chatTimes").getValue());
if (player.getChatTimes() >= chatTimes) { if (player.getChatTimes() >= chatTimes - 1) {
//找到白名单内该人的任务中已解锁或无需解锁的任务 // //找到白名单内该人的任务中已解锁或无需解锁的任务
String addText = PlayerUtil.getTipInChat(uid, current); String addText = PlayerUtil.getTipInChat(uid, current);
if (!StringUtils.isEmpty(addText)) { if (!StringUtils.isEmpty(addText)) {
addText = "【寒烟@正常】" + addText; if (!addText.contains("@正常】")) {
addText = SpeechUtil.addHeader(addText, partnerName);
}
text += addText; text += addText;
} }
} }
//每轮的第一次进行操作提示
if (player.getChatTimes() == 0) {
//找到操作的提示
String operateText = SpeechUtil.getOperateSpeech(player);
if (!StringUtils.isEmpty(operateText)) {
operateText = SpeechUtil.addHeader(operateText, partnerName);
text += operateText;
}
//更新玩家操作提示的序号
player.setOperateTextNum(player.getOperateTextNum() + 1);
}
resultResponse.set反馈ID(600101); resultResponse.set反馈ID(600101);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
......
...@@ -6,4 +6,8 @@ import com.qiwu.inference.dto.response.ResultVarsResponse; ...@@ -6,4 +6,8 @@ import com.qiwu.inference.dto.response.ResultVarsResponse;
public interface CheckService { public interface CheckService {
CommonResult<ResultVarsResponse> check(OperationRequest operationReq); CommonResult<ResultVarsResponse> check(OperationRequest operationReq);
CommonResult<ResultVarsResponse> secondAnswer(OperationRequest operationReq);
CommonResult<ResultVarsResponse> checkRanking(OperationRequest operationReq);
} }
...@@ -3,16 +3,17 @@ package com.qiwu.inference.service.check.impl; ...@@ -3,16 +3,17 @@ package com.qiwu.inference.service.check.impl;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.cache.CacheGlobal;
import com.qiwu.inference.common.utils.*; import com.qiwu.inference.common.utils.*;
import com.qiwu.inference.dto.ClueDto; import com.qiwu.inference.dto.*;
import com.qiwu.inference.dto.Person;
import com.qiwu.inference.dto.Player;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultResponse; import com.qiwu.inference.dto.response.ResultResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
import com.qiwu.inference.service.chat.impl.ChatServiceImpl;
import com.qiwu.inference.service.check.CheckService; import com.qiwu.inference.service.check.CheckService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
...@@ -21,15 +22,21 @@ import java.util.ArrayList; ...@@ -21,15 +22,21 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.PriorityBlockingQueue;
import static com.qiwu.inference.common.utils.PlayerUtil.addThreshold;
@Service @Service
public class CheckServiceImpl implements CheckService { public class CheckServiceImpl implements CheckService {
private Logger log = LoggerFactory.getLogger(CheckServiceImpl.class); Logger log = LoggerFactory.getLogger(CheckServiceImpl.class);
//对话过期时间 //对话过期时间
@Value("${expireTime}") @Value("${expireTime}")
private String expireTime; private String expireTime;
@Autowired
private ChatServiceImpl chatService;
@Override @Override
public CommonResult<ResultVarsResponse> check(OperationRequest operationReq) { public CommonResult<ResultVarsResponse> check(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse(); ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
...@@ -44,7 +51,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -44,7 +51,7 @@ public class CheckServiceImpl implements CheckService {
if (!StringUtils.isEmpty(subjectId)) { if (!StringUtils.isEmpty(subjectId)) {
if(subjectId == Constants.REQ_NON){ if(subjectId == Constants.REQ_NON){
//获取对应话术 //获取对应话术
String text = SpeechUtil.getAskSpeech(Constants.SPEECH_ASIDE, 100008); String text = SpeechUtil.getAskSpeech(uid, Constants.SPEECH_ASIDE, 100008);
resultResponse.set反馈ID(300008); resultResponse.set反馈ID(300008);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -53,13 +60,14 @@ public class CheckServiceImpl implements CheckService { ...@@ -53,13 +60,14 @@ public class CheckServiceImpl implements CheckService {
} }
operationReq.setOperate(Constants.OPERATE_CHECK); operationReq.setOperate(Constants.OPERATE_CHECK);
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
String seriesName = player.getSeries(); //系列名称
if ("3001".equals(methodId)) { if ("3001".equals(methodId)) {
//玩家已对话过的人物 //玩家已对话过的人物
List<Integer> personList = new ArrayList<>(player.getClueMap().keySet()); List<Integer> personList = new ArrayList<>(player.getClueMap().keySet());
//玩家还没有获得线索 //玩家还没有获得线索
if (personList.size() == 0) { if (personList.size() == 0) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30010101); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30010101);
resultResponse.set反馈ID(30010101); resultResponse.set反馈ID(30010101);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -78,15 +86,15 @@ public class CheckServiceImpl implements CheckService { ...@@ -78,15 +86,15 @@ public class CheckServiceImpl implements CheckService {
String text = ""; String text = "";
if (personList.size() == 1) { if (personList.size() == 1) {
//人物信息 //人物信息
Person person = player.getPersonMap().get(personList.get(0)); Person person = PlayerUtil.getPersonMap(uid).get(personList.get(0));
String call = (person.getGender() == 1) ? "他" : "她"; String call = (person.getGender() == 1) ? "他" : "她";
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30010102); text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30010102);
text = SpeechUtil.speechReplaceNum(text, personText.toString(), call); text = SpeechUtil.speechReplaceNum(text, personText.toString(), call);
//保存本轮对话 //保存本轮对话
operationReq.setSubjectId(personList.get(0)); operationReq.setSubjectId(personList.get(0));
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
} else { } else {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300101); text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300101);
text = SpeechUtil.speechReplaceNum(text, personText.toString()); text = SpeechUtil.speechReplaceNum(text, personText.toString());
} }
resultResponse.set反馈ID(300101); resultResponse.set反馈ID(300101);
...@@ -112,7 +120,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -112,7 +120,7 @@ public class CheckServiceImpl implements CheckService {
//玩家还没有获得线索 //玩家还没有获得线索
if (personList.size() == 0) { if (personList.size() == 0) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30010101); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30010101);
resultResponse.set反馈ID(30010101); resultResponse.set反馈ID(30010101);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -131,15 +139,15 @@ public class CheckServiceImpl implements CheckService { ...@@ -131,15 +139,15 @@ public class CheckServiceImpl implements CheckService {
String text = ""; String text = "";
if (personList.size() == 1) { if (personList.size() == 1) {
//人物信息 //人物信息
Person person = player.getPersonMap().get(personList.get(0)); Person person = PlayerUtil.getPersonMap(uid).get(personList.get(0));
String call = (person.getGender() == 1) ? "他" : "她"; String call = (person.getGender() == 1) ? "他" : "她";
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30010102); text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30010102);
text = SpeechUtil.speechReplaceNum(text, personText.toString(), call); text = SpeechUtil.speechReplaceNum(text, personText.toString(), call);
//保存本轮对话 //保存本轮对话
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
} else { } else {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300101); text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300101);
text = SpeechUtil.speechReplaceNum(text, personText.toString()); text = SpeechUtil.speechReplaceNum(text, personText.toString());
} }
resultResponse.set反馈ID(300101); resultResponse.set反馈ID(300101);
...@@ -151,7 +159,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -151,7 +159,7 @@ public class CheckServiceImpl implements CheckService {
//人物名称不存在 //人物名称不存在
if (subjectId == Constants.REQ_NON) { if (subjectId == Constants.REQ_NON) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300104); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300104);
text = SpeechUtil.speechReplaceNum(text, personText.toString()); text = SpeechUtil.speechReplaceNum(text, personText.toString());
resultResponse.set反馈ID(300104); resultResponse.set反馈ID(300104);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -162,7 +170,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -162,7 +170,7 @@ public class CheckServiceImpl implements CheckService {
//玩家还没见过这个人 //玩家还没见过这个人
if (!personList.contains(subjectId)) { if (!personList.contains(subjectId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30010201); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30010201);
text = SpeechUtil.speechReplaceNum(text, subjectName); text = SpeechUtil.speechReplaceNum(text, subjectName);
resultResponse.set反馈ID(30010201); resultResponse.set反馈ID(30010201);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -173,13 +181,15 @@ public class CheckServiceImpl implements CheckService { ...@@ -173,13 +181,15 @@ public class CheckServiceImpl implements CheckService {
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//人物信息 //人物信息
Person person = player.getPersonMap().get(subjectId); Person person = PlayerUtil.getPersonMap(uid).get(subjectId);
String call = (person.getGender() == 1) ? "他" : "她"; String call = (person.getGender() == 1) ? "他" : "她";
int trustDegree = player.getPersonInfoMap().get(subjectId).getTrustDegree();
int deterrenceDegree = player.getPersonInfoMap().get(subjectId).getDeterrenceDegree();
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300102); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300102);
text = SpeechUtil.speechReplaceNum(text, subjectName, person.getAge().toString(), text = SpeechUtil.speechReplaceNum(text, subjectName, person.getAge().toString(),
(person.getGender() == 1) ? "男" : "女", call, (person.getGender() == 1) ? "男" : "女", call,
person.getTrustDegree().toString(), person.getDeterrenceDegree().toString()); String.valueOf(trustDegree - 50), String.valueOf(deterrenceDegree - 50));
resultResponse.set反馈ID(300102); resultResponse.set反馈ID(300102);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("查看人物列表2"); resultResponse.set后台附加返回("查看人物列表2");
...@@ -191,7 +201,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -191,7 +201,7 @@ public class CheckServiceImpl implements CheckService {
//没有人物名称 //没有人物名称
if (StringUtils.isEmpty(subjectId)) { if (StringUtils.isEmpty(subjectId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30010301); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30010301);
resultResponse.set反馈ID(30010301); resultResponse.set反馈ID(30010301);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -199,11 +209,11 @@ public class CheckServiceImpl implements CheckService { ...@@ -199,11 +209,11 @@ public class CheckServiceImpl implements CheckService {
} }
//线索 //线索
StringBuilder clueText = new StringBuilder(); StringBuilder clueText = new StringBuilder();
Map<Integer,List<ClueDto>> clueMap = player.getClueMap().get(subjectId); Map<Integer,List<ClueInfoDto>> clueMap = player.getClueMap().get(subjectId);
//有对话过的人 //有对话过的人
if (!StringUtils.isEmpty(clueMap)) { if (!StringUtils.isEmpty(clueMap)) {
for (Map.Entry<Integer, List<ClueDto>> entry : clueMap.entrySet()) { for (Map.Entry<Integer, List<ClueInfoDto>> entry : clueMap.entrySet()) {
List<ClueDto> clues = entry.getValue(); List<ClueInfoDto> clues = entry.getValue();
//身份线索 //身份线索
if (entry.getKey() == 1) { if (entry.getKey() == 1) {
clueText.append("身份线索: "); clueText.append("身份线索: ");
...@@ -240,17 +250,17 @@ public class CheckServiceImpl implements CheckService { ...@@ -240,17 +250,17 @@ public class CheckServiceImpl implements CheckService {
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300103); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300103);
text = SpeechUtil.speechReplaceNum(text, PlayerUtil.getNameByPersonId(uid, subjectId), clueText.toString()); text = SpeechUtil.speechReplaceNum(text, PlayerUtil.getNameByPersonId(uid, subjectId), clueText.toString());
resultResponse.set反馈ID(300103); resultResponse.set反馈ID(300103);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("查看线索3"); resultResponse.set后台附加返回("查看人物列表3");
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
} }
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30010302); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30010302);
resultResponse.set反馈ID(30010302); resultResponse.set反馈ID(30010302);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -258,9 +268,10 @@ public class CheckServiceImpl implements CheckService { ...@@ -258,9 +268,10 @@ public class CheckServiceImpl implements CheckService {
} }
//查看货币 //查看货币
if ("3003".equals(methodId)) { if ("3003".equals(methodId)) {
int money = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getMoney();
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300301); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300301);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(player.getCurrency().intValue()), TimingAcquisition.systemConfigMap.get("money").getValue()); text = SpeechUtil.speechReplaceNum(text, String.valueOf(money), TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("money").getValue());
resultResponse.set反馈ID(300301); resultResponse.set反馈ID(300301);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -268,9 +279,15 @@ public class CheckServiceImpl implements CheckService { ...@@ -268,9 +279,15 @@ public class CheckServiceImpl implements CheckService {
} }
//查看场所 //查看场所
if ("3004".equals(methodId)) { if ("3004".equals(methodId)) {
//获取玩家已知场所
List<String> locationIdList = PlayerUtil.getLocationIdsByUid(uid);
operationReq.setStrList(locationIdList);
operationReq.setOperateLabel(Constants.CHECK_LOCATION);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//场所文本
String locationText = PlayerUtil.getLocations(uid); String locationText = PlayerUtil.getLocations(uid);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300401); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300401);
text = SpeechUtil.speechReplaceNum(text, locationText); text = SpeechUtil.speechReplaceNum(text, locationText);
resultResponse.set反馈ID(300401); resultResponse.set反馈ID(300401);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -281,11 +298,11 @@ public class CheckServiceImpl implements CheckService { ...@@ -281,11 +298,11 @@ public class CheckServiceImpl implements CheckService {
//查看线索 //查看线索
if ("3005".equals(methodId)) { if ("3005".equals(methodId)) {
int clueSize = 0; int clueSize = 0;
for (Map.Entry<Integer, Map<Integer, List<ClueDto>>> entry : player.getClueMap().entrySet()) { for (Map.Entry<Integer, Map<Integer, List<ClueInfoDto>>> entry : player.getClueMap().entrySet()) {
Map<Integer, List<ClueDto>> clueMap = entry.getValue(); Map<Integer, List<ClueInfoDto>> clueMap = entry.getValue();
//遍历该人物所有类型的线索 //遍历该人物所有类型的线索
if (!StringUtils.isEmpty(clueMap)) { if (!StringUtils.isEmpty(clueMap)) {
for (Map.Entry<Integer, List<ClueDto>> listEntry : clueMap.entrySet()) { for (Map.Entry<Integer, List<ClueInfoDto>> listEntry : clueMap.entrySet()) {
clueSize += listEntry.getValue().size(); clueSize += listEntry.getValue().size();
} }
} }
...@@ -294,9 +311,12 @@ public class CheckServiceImpl implements CheckService { ...@@ -294,9 +311,12 @@ public class CheckServiceImpl implements CheckService {
String text = ""; String text = "";
//玩家当前还没有获得线索 //玩家当前还没有获得线索
if (clueSize != 0) { if (clueSize != 0) {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300501); text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300501);
} else { } else {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050101); text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050101);
//搭档名称
String partnerName = TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("partnerName").getValue();
text = SpeechUtil.addHeader(text, partnerName);
} }
text = SpeechUtil.speechReplaceNum(text, String.valueOf(clueSize)); text = SpeechUtil.speechReplaceNum(text, String.valueOf(clueSize));
resultResponse.set反馈ID(300501); resultResponse.set反馈ID(300501);
...@@ -311,7 +331,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -311,7 +331,7 @@ public class CheckServiceImpl implements CheckService {
//当前还没有对话过的人物 //当前还没有对话过的人物
if (player.getClueMap().size() == 0) { if (player.getClueMap().size() == 0) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050201); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050201);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(player.getClueMap().size()), clueNumText.toString()); text = SpeechUtil.speechReplaceNum(text, String.valueOf(player.getClueMap().size()), clueNumText.toString());
resultResponse.set反馈ID(30050201); resultResponse.set反馈ID(30050201);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -320,13 +340,13 @@ public class CheckServiceImpl implements CheckService { ...@@ -320,13 +340,13 @@ public class CheckServiceImpl implements CheckService {
} }
//有线索人物的人数统计 //有线索人物的人数统计
int count = 0; int count = 0;
for (Map.Entry<Integer, Map<Integer, List<ClueDto>>> entry : player.getClueMap().entrySet()) { for (Map.Entry<Integer, Map<Integer, List<ClueInfoDto>>> entry : player.getClueMap().entrySet()) {
int size = 0; int size = 0;
Map<Integer, List<ClueDto>> clueMap = entry.getValue(); Map<Integer, List<ClueInfoDto>> clueMap = entry.getValue();
//遍历该人物所有类型的线索 //遍历该人物所有类型的线索
if (!StringUtils.isEmpty(clueMap)) { if (!StringUtils.isEmpty(clueMap)) {
clueNumText.append(player.getPersonMap().get(entry.getKey()).getName()).append("有"); clueNumText.append(PlayerUtil.getPersonMap(uid).get(entry.getKey()).getName()).append("有");
for (Map.Entry<Integer, List<ClueDto>> listEntry : clueMap.entrySet()) { for (Map.Entry<Integer, List<ClueInfoDto>> listEntry : clueMap.entrySet()) {
size += listEntry.getValue().size(); size += listEntry.getValue().size();
count++; count++;
} }
...@@ -337,7 +357,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -337,7 +357,7 @@ public class CheckServiceImpl implements CheckService {
clueNumText.deleteCharAt(clueNumText.length() - 1); clueNumText.deleteCharAt(clueNumText.length() - 1);
} }
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300502); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300502);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(count), clueNumText.toString()); text = SpeechUtil.speechReplaceNum(text, String.valueOf(count), clueNumText.toString());
resultResponse.set反馈ID(300502); resultResponse.set反馈ID(300502);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -349,11 +369,11 @@ public class CheckServiceImpl implements CheckService { ...@@ -349,11 +369,11 @@ public class CheckServiceImpl implements CheckService {
if ("300503".equals(methodId)) { if ("300503".equals(methodId)) {
StringBuilder clueText = new StringBuilder(); StringBuilder clueText = new StringBuilder();
Map<Integer, Integer> clueNumMap = new HashMap<>(); Map<Integer, Integer> clueNumMap = new HashMap<>();
for (Map.Entry<Integer, Map<Integer, List<ClueDto>>> entry : player.getClueMap().entrySet()) { for (Map.Entry<Integer, Map<Integer, List<ClueInfoDto>>> entry : player.getClueMap().entrySet()) {
Map<Integer, List<ClueDto>> clueMap = entry.getValue(); Map<Integer, List<ClueInfoDto>> clueMap = entry.getValue();
//遍历该人物所有类型的线索 //遍历该人物所有类型的线索
if (!StringUtils.isEmpty(clueMap)) { if (!StringUtils.isEmpty(clueMap)) {
for (Map.Entry<Integer, List<ClueDto>> listEntry : clueMap.entrySet()) { for (Map.Entry<Integer, List<ClueInfoDto>> listEntry : clueMap.entrySet()) {
int size = (clueNumMap.get(listEntry.getKey()) == null) ? 0 : clueNumMap.get(listEntry.getKey()); int size = (clueNumMap.get(listEntry.getKey()) == null) ? 0 : clueNumMap.get(listEntry.getKey());
clueNumMap.put(listEntry.getKey(), size + listEntry.getValue().size()); clueNumMap.put(listEntry.getKey(), size + listEntry.getValue().size());
} }
...@@ -362,8 +382,10 @@ public class CheckServiceImpl implements CheckService { ...@@ -362,8 +382,10 @@ public class CheckServiceImpl implements CheckService {
//玩家没有收集到线索 //玩家没有收集到线索
if (clueNumMap.size() == 0) { if (clueNumMap.size() == 0) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050301); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050301);
text = SpeechUtil.speechReplaceNum(text, clueText.toString()); //搭档名称
String partnerName = TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("partnerName").getValue();
text = SpeechUtil.addHeader(text, partnerName);
resultResponse.set反馈ID(30050301); resultResponse.set反馈ID(30050301);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -404,7 +426,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -404,7 +426,7 @@ public class CheckServiceImpl implements CheckService {
clueText.deleteCharAt(clueText.length() - 1); clueText.deleteCharAt(clueText.length() - 1);
} }
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300503); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300503);
text = SpeechUtil.speechReplaceNum(text, clueText.toString()); text = SpeechUtil.speechReplaceNum(text, clueText.toString());
resultResponse.set反馈ID(300503); resultResponse.set反馈ID(300503);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -417,12 +439,12 @@ public class CheckServiceImpl implements CheckService { ...@@ -417,12 +439,12 @@ public class CheckServiceImpl implements CheckService {
if ("300504".equals(methodId)) { if ("300504".equals(methodId)) {
//线索 //线索
StringBuilder clueText = new StringBuilder(); StringBuilder clueText = new StringBuilder();
Map<Integer,List<ClueDto>> clueMap = player.getClueMap().get(subjectId); Map<Integer,List<ClueInfoDto>> clueMap = player.getClueMap().get(subjectId);
String subjectName = TimingAcquisition.getNameByPersonId(uid, subjectId); String subjectName = TimingAcquisition.getNameByPersonId(uid, subjectId);
//玩家还没有获得任何线索 //玩家还没有获得任何线索
if (player.getClueMap().size() == 0) { if (player.getClueMap().size() == 0) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050401); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050401);
text = SpeechUtil.speechReplaceNum(text, subjectName); text = SpeechUtil.speechReplaceNum(text, subjectName);
resultResponse.set反馈ID(30050401); resultResponse.set反馈ID(30050401);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -432,7 +454,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -432,7 +454,7 @@ public class CheckServiceImpl implements CheckService {
//玩家还没有这个人的线索 //玩家还没有这个人的线索
if (StringUtils.isEmpty(clueMap)) { if (StringUtils.isEmpty(clueMap)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050402); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050402);
text = SpeechUtil.speechReplaceNum(text, subjectName); text = SpeechUtil.speechReplaceNum(text, subjectName);
resultResponse.set反馈ID(30050402); resultResponse.set反馈ID(30050402);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -441,9 +463,9 @@ public class CheckServiceImpl implements CheckService { ...@@ -441,9 +463,9 @@ public class CheckServiceImpl implements CheckService {
} }
int size = 0; int size = 0;
//有对话过的人 //有对话过的人
for (Map.Entry<Integer, List<ClueDto>> entry : clueMap.entrySet()) { for (Map.Entry<Integer, List<ClueInfoDto>> entry : clueMap.entrySet()) {
size += entry.getValue().size(); size += entry.getValue().size();
List<ClueDto> clues = entry.getValue(); List<ClueInfoDto> clues = entry.getValue();
clueText.append(clues.size()).append("条"); clueText.append(clues.size()).append("条");
//身份线索 //身份线索
if (entry.getKey() == 1) { if (entry.getKey() == 1) {
...@@ -479,7 +501,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -479,7 +501,7 @@ public class CheckServiceImpl implements CheckService {
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300504); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300504);
text = SpeechUtil.speechReplaceNum(text, subjectName, String.valueOf(size), clueText.toString()); text = SpeechUtil.speechReplaceNum(text, subjectName, String.valueOf(size), clueText.toString());
resultResponse.set反馈ID(300504); resultResponse.set反馈ID(300504);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -491,12 +513,12 @@ public class CheckServiceImpl implements CheckService { ...@@ -491,12 +513,12 @@ public class CheckServiceImpl implements CheckService {
if ("300505".equals(methodId)) { if ("300505".equals(methodId)) {
StringBuilder clueText = new StringBuilder(); StringBuilder clueText = new StringBuilder();
int size = 0; int size = 0;
for (Map.Entry<Integer, Map<Integer, List<ClueDto>>> entry : player.getClueMap().entrySet()) { for (Map.Entry<Integer, Map<Integer, List<ClueInfoDto>>> entry : player.getClueMap().entrySet()) {
Map<Integer, List<ClueDto>> clueMap = entry.getValue(); Map<Integer, List<ClueInfoDto>> clueMap = entry.getValue();
//遍历该人物所有类型的线索 //遍历该人物所有类型的线索
if (!StringUtils.isEmpty(clueMap)) { if (!StringUtils.isEmpty(clueMap)) {
clueText.append(player.getPersonMap().get(entry.getKey()).getName()).append("有"); clueText.append(PlayerUtil.getPersonMap(uid).get(entry.getKey()).getName()).append("有");
for (Map.Entry<Integer, List<ClueDto>> listEntry : clueMap.entrySet()) { for (Map.Entry<Integer, List<ClueInfoDto>> listEntry : clueMap.entrySet()) {
if (clueTypeId.equals(listEntry.getKey())) { if (clueTypeId.equals(listEntry.getKey())) {
size += listEntry.getValue().size(); size += listEntry.getValue().size();
clueText.append(listEntry.getValue().size()).append("条、"); clueText.append(listEntry.getValue().size()).append("条、");
...@@ -507,8 +529,8 @@ public class CheckServiceImpl implements CheckService { ...@@ -507,8 +529,8 @@ public class CheckServiceImpl implements CheckService {
//玩家还没有对应类型的线索 //玩家还没有对应类型的线索
if (size == 0) { if (size == 0) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050501); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050501);
text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.clueTypeMap.get(clueTypeId)); text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.seriesClueTypeMap.get(seriesName).get(clueTypeId));
resultResponse.set反馈ID(30050501); resultResponse.set反馈ID(30050501);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -521,8 +543,8 @@ public class CheckServiceImpl implements CheckService { ...@@ -521,8 +543,8 @@ public class CheckServiceImpl implements CheckService {
operationReq.setClueTypeId(clueTypeId); operationReq.setClueTypeId(clueTypeId);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300505); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300505);
text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.clueTypeMap.get(clueTypeId), String.valueOf(size), clueText.toString()); text = SpeechUtil.speechReplaceNum(text, TimingAcquisition.seriesClueTypeMap.get(seriesName).get(clueTypeId), String.valueOf(size), clueText.toString());
resultResponse.set反馈ID(300505); resultResponse.set反馈ID(300505);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("查看线索5"); resultResponse.set后台附加返回("查看线索5");
...@@ -534,13 +556,26 @@ public class CheckServiceImpl implements CheckService { ...@@ -534,13 +556,26 @@ public class CheckServiceImpl implements CheckService {
//玩家查看下一条线索 //玩家查看下一条线索
if (!StringUtils.isEmpty(lastReq)) { if (!StringUtils.isEmpty(lastReq)) {
if (!StringUtils.isEmpty(lastReq.getClueList())) { if (!StringUtils.isEmpty(lastReq.getClueList())) {
List<ClueDto> clueList = lastReq.getClueList(); List<ClueInfoDto> clueList = lastReq.getClueList();
int index = lastReq.getIndex(); int index = lastReq.getIndex();
String subjectName = TimingAcquisition.getNameByPersonId(uid, lastReq.getSubjectId()); String subjectName = TimingAcquisition.getNameByPersonId(uid, lastReq.getSubjectId());
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300506); String text = "";
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.clueTypeMap.get(lastReq.getClueTypeId()), if (clueList.size() > 1) {
String.valueOf(clueList.size()), String.valueOf(index + 1), clueList.get(index).getClueTemplate()); if (index < clueList.size() - 1) {
text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300506);
} else {
text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050607);
}
} else {
text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050606);
}
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, clueList.get(index).getClueId());
if (!StringUtils.isEmpty(clue)) {
String addText = SpeechUtil.getSuccessClueOtherSpeech(uid, PlayerUtil.getPersonMap(uid).get(subjectId), clue);
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.seriesClueTypeMap.get(seriesName).get(lastReq.getClueTypeId()),
String.valueOf(clueList.size()), String.valueOf(index + 1), addText);
}
//保存本轮对话 //保存本轮对话
index = (index + 1) % clueList.size(); index = (index + 1) % clueList.size();
operationReq.setSubjectId(lastReq.getSubjectId()); operationReq.setSubjectId(lastReq.getSubjectId());
...@@ -561,7 +596,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -561,7 +596,7 @@ public class CheckServiceImpl implements CheckService {
//没有提供人物名称 //没有提供人物名称
if (StringUtils.isEmpty(subjectId)) { if (StringUtils.isEmpty(subjectId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050602); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050602);
resultResponse.set反馈ID(30050602); resultResponse.set反馈ID(30050602);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -570,7 +605,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -570,7 +605,7 @@ public class CheckServiceImpl implements CheckService {
//提供的人物名称不存在 //提供的人物名称不存在
if (subjectId == Constants.REQ_NON) { if (subjectId == Constants.REQ_NON) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050603); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050603);
resultResponse.set反馈ID(30050603); resultResponse.set反馈ID(30050603);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -582,7 +617,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -582,7 +617,7 @@ public class CheckServiceImpl implements CheckService {
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050604); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050604);
resultResponse.set反馈ID(30050604); resultResponse.set反馈ID(30050604);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -594,7 +629,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -594,7 +629,7 @@ public class CheckServiceImpl implements CheckService {
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050605); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050605);
resultResponse.set反馈ID(30050605); resultResponse.set反馈ID(30050605);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -604,8 +639,8 @@ public class CheckServiceImpl implements CheckService { ...@@ -604,8 +639,8 @@ public class CheckServiceImpl implements CheckService {
//还没有收集到这个人的线索 //还没有收集到这个人的线索
if (StringUtils.isEmpty(player.getClueMap().get(subjectId))) { if (StringUtils.isEmpty(player.getClueMap().get(subjectId))) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050601); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050601);
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.clueTypeMap.get(clueTypeId)); text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.seriesClueTypeMap.get(seriesName).get(clueTypeId));
resultResponse.set反馈ID(30050601); resultResponse.set反馈ID(30050601);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -614,19 +649,28 @@ public class CheckServiceImpl implements CheckService { ...@@ -614,19 +649,28 @@ public class CheckServiceImpl implements CheckService {
//还没有收集到这个人该类型的线索 //还没有收集到这个人该类型的线索
if (StringUtils.isEmpty(player.getClueMap().get(subjectId).get(clueTypeId))) { if (StringUtils.isEmpty(player.getClueMap().get(subjectId).get(clueTypeId))) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050601); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050601);
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.clueTypeMap.get(clueTypeId)); text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.seriesClueTypeMap.get(seriesName).get(clueTypeId));
resultResponse.set反馈ID(30050601); resultResponse.set反馈ID(30050601);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
List<ClueDto> clueList = player.getClueMap().get(subjectId).get(clueTypeId); List<ClueInfoDto> clueList = player.getClueMap().get(subjectId).get(clueTypeId);
int index = 0; int index = 0;
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300506); String text = "";
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.clueTypeMap.get(clueTypeId), if (clueList.size() > 1) {
String.valueOf(clueList.size()), String.valueOf(index + 1), clueList.get(index).getClueTemplate()); text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300506);
} else {
text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 30050606);
}
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, clueList.get(index).getClueId());
if (!StringUtils.isEmpty(clue)) {
String addText = SpeechUtil.getSuccessClueOtherSpeech(uid, PlayerUtil.getPersonMap(uid).get(subjectId), clue);
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.seriesClueTypeMap.get(seriesName).get(clueTypeId),
String.valueOf(clueList.size()), String.valueOf(index + 1), addText);
}
//保存本轮对话 //保存本轮对话
index = (index + 1) % clueList.size(); index = (index + 1) % clueList.size();
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
...@@ -643,10 +687,17 @@ public class CheckServiceImpl implements CheckService { ...@@ -643,10 +687,17 @@ public class CheckServiceImpl implements CheckService {
} }
//查看某人的模糊操作 //查看某人的模糊操作
if ("3101".equals(methodId)) { if ("3101".equals(methodId)) {
//询问对象为对话人
if(StringUtils.isEmpty(subjectId)){
subjectId = player.getPersonId();
}
//搭档名称
String partnerName = TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("partnerName").getValue();
//没有提供人物名称 //没有提供人物名称
if (StringUtils.isEmpty(subjectId)) { if (StringUtils.isEmpty(subjectId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310101); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 310101);
text = SpeechUtil.replaceHeader(text, partnerName);
resultResponse.set反馈ID(310101); resultResponse.set反馈ID(310101);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -655,14 +706,15 @@ public class CheckServiceImpl implements CheckService { ...@@ -655,14 +706,15 @@ public class CheckServiceImpl implements CheckService {
//提供的人物名称不存在 //提供的人物名称不存在
if (subjectId == Constants.REQ_NON) { if (subjectId == Constants.REQ_NON) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310102); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 310102);
text = SpeechUtil.replaceHeader(text, partnerName);
resultResponse.set反馈ID(310102); resultResponse.set反馈ID(310102);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
Person current = player.getPersonMap().get(player.getPersonId()); Person current = PlayerUtil.getPersonMap(uid).get(player.getPersonId());
Person subject = player.getPersonMap().get(subjectId); Person subject = PlayerUtil.getPersonMap(uid).get(subjectId);
//查找符合条件的线索 //查找符合条件的线索
List<ClueDto> clueList = PlayerUtil.findClues(current, subject, 1); List<ClueDto> clueList = PlayerUtil.findClues(current, subject, 1);
//检查是否符合阈值要求 //检查是否符合阈值要求
...@@ -673,7 +725,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -673,7 +725,7 @@ public class CheckServiceImpl implements CheckService {
//----------------记录线索-------------- //----------------记录线索--------------
PlayerUtil.recordClue(uid, current.getId(), subjectId, clueList.get(index).getType(), clueList.get(index)); PlayerUtil.recordClue(uid, current.getId(), subjectId, clueList.get(index).getType(), clueList.get(index));
//----------------是否解锁任务------------- //----------------是否解锁任务-------------
PlayerUtil.unlockTask(uid, subject, clueList.get(index)); PlayerUtil.unlockTask(uid, player.getPersonInfoMap().get(subjectId), clueList.get(index));
//获取对应话术 //获取对应话术
String text = SpeechUtil.getSuccessClueSpeech(uid, current, clueList.get(index)); String text = SpeechUtil.getSuccessClueSpeech(uid, current, clueList.get(index));
text = SpeechUtil.addHeader(text, current.getName()); text = SpeechUtil.addHeader(text, current.getName());
...@@ -687,7 +739,8 @@ public class CheckServiceImpl implements CheckService { ...@@ -687,7 +739,8 @@ public class CheckServiceImpl implements CheckService {
//人物未知,则提供基本线信息 //人物未知,则提供基本线信息
if (!personList.contains(subjectId)) { if (!personList.contains(subjectId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310103); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 310103);
text = SpeechUtil.replaceHeader(text, partnerName);
text = SpeechUtil.speechReplaceNum(text, subject.getName(), subject.getAge().toString(), text = SpeechUtil.speechReplaceNum(text, subject.getName(), subject.getAge().toString(),
(subject.getGender() == 1) ? "男" : "女", subject.getIdentityName()); (subject.getGender() == 1) ? "男" : "女", subject.getIdentityName());
resultResponse.set反馈ID(310103); resultResponse.set反馈ID(310103);
...@@ -696,11 +749,14 @@ public class CheckServiceImpl implements CheckService { ...@@ -696,11 +749,14 @@ public class CheckServiceImpl implements CheckService {
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} else { } else {
String call = (subject.getGender() == 1) ? "他" : "她"; String call = (subject.getGender() == 1) ? "他" : "她";
int trustDegree = player.getPersonInfoMap().get(subjectId).getTrustDegree();
int deterrenceDegree = player.getPersonInfoMap().get(subjectId).getDeterrenceDegree();
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310104); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 310104);
text = SpeechUtil.replaceHeader(text, partnerName);
text = SpeechUtil.speechReplaceNum(text, subject.getName(), subject.getAge().toString(), text = SpeechUtil.speechReplaceNum(text, subject.getName(), subject.getAge().toString(),
(subject.getGender() == 1) ? "男" : "女", subject.getIdentityName(), call, (subject.getGender() == 1) ? "男" : "女", subject.getIdentityName(), call,
subject.getTrustDegree().toString(), subject.getDeterrenceDegree().toString()); String.valueOf(trustDegree - 50), String.valueOf(deterrenceDegree - 50));
resultResponse.set反馈ID(310104); resultResponse.set反馈ID(310104);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -708,10 +764,200 @@ public class CheckServiceImpl implements CheckService { ...@@ -708,10 +764,200 @@ public class CheckServiceImpl implements CheckService {
} }
} }
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300001); String text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 300001);
resultResponse.set反馈ID(300001);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
@Override
public CommonResult<ResultVarsResponse> secondAnswer(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
String methodId = operationReq.getMethodId(); //方法编号
String gateNo = TimingAcquisition.playerMap.get(uid).getGateNo(); //关卡编号
String unique = uid + gateNo; //用户uid和关卡编号组成唯一标识
Player player = TimingAcquisition.playerMap.get(uid);
String currentName = TimingAcquisition.getNameByPersonId(uid, TimingAcquisition.playerMap.get(uid).getPersonId());
//当前玩家上一轮保存的数据
ReplyDto reply = (ReplyDto) CacheUtil.get(unique);
//走闲聊
if (StringUtils.isEmpty(reply)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
}
//当前对话的人物配置信息
Person current = PlayerUtil.getPersonMap(uid).get(player.getPersonId());
Integer subjectId = reply.getSubjectId();
Integer demandTaskId = reply.getDemandTaskId();
int type = reply.getType(); //响应方式
//找到对应任务
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, demandTaskId);
Person subject = PlayerUtil.getPersonMap(uid).get(subjectId);
//当前对话人的数据
PersonInfoDto talk = player.getPersonInfoMap().get(player.getPersonId());
//走闲聊
if (StringUtils.isEmpty(demandTask)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
}
String text = "";
//确定
if ("001".equals(methodId)) {
//闲聊的二次回复提示玩家他人线索
if (type == 1) {
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, demandTask.getClueId());
if (!StringUtils.isEmpty(clue)) {
text = SpeechUtil.getSuccessClueOtherSpeech(uid, current, clue);
text = SpeechUtil.addHeader(text, currentName);
//保存上轮数据
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
}
//发布任务后提示对应文本
if (type == 2) {
text = SpeechUtil.getSuccessTaskReplySpeech(uid, current, demandTask, reply);
}
//询问任务进度,之后执行操作
if (type == 3) {
if (demandTask.getClueSwitch() != 1) {
String[] condition1 = demandTask.getCondition1().split("\\|");
log.info(uid + "执行的任务id:" + demandTaskId + ",条件1:" + demandTask.getCondition1());
String method = String.valueOf(Integer.parseInt(condition1[0]));
//条件判断
// 1. 判断是否符合阈值需求
boolean flag = PlayerUtil.checkThreshold(uid, demandTask, talk);
//不符合阈值需求
if (!flag) {
log.info(uid + "的任务条件id:" + method);
//获取对应话术
text = SpeechUtil.getTaskSpeech(uid, Constants.SPEECH_PERSON, 210204);
text = SpeechUtil.replaceHeader(text, subject.getName());
text = SpeechUtil.speechReplaceValue(uid, text, subject, demandTask);
resultResponse.set反馈ID(210204);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap();
//2.符合阈值需求,判断是否完成前置任务
if (taskMap.containsKey(subjectId)) {
Map<Integer, Integer> subjectMap = taskMap.get(subjectId);
if (subjectMap.containsKey(demandTask.getDemandTaskId())) {
int num = subjectMap.get(demandTask.getDemandTaskId());
Integer objectId = demandTask.getObject();
//符合阈值需求,已达次数上限
if (num >= demandTask.getEffectiveDegree()) {
log.info(uid + "的任务条件id:" + method);
//获取对应话术
text = SpeechUtil.getTaskSpeech(uid, Constants.SPEECH_PERSON, 210202);
text = SpeechUtil.replaceHeader(text, subject.getName());
text = SpeechUtil.speechReplaceValue(uid, text, subject, demandTask);
resultResponse.set反馈ID(210202);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, Integer> objectMap = taskMap.get(objectId);
if (objectMap.containsKey(Integer.parseInt(demandTask.getPostTask()))) {
log.info(uid + "的任务条件id:" + method);
subjectMap.put(demandTask.getDemandTaskId(), num + 1);
PlayerUtil.addThreshold(player.getPersonInfoMap().get(subjectId), demandTask);
//增加声望值
PlayerUtil.updateReputation(player, demandTask.getReputation());
//获取对应话术
text = SpeechUtil.getSuccessTaskSpeech(uid, subject, demandTask);
resultResponse.set反馈ID(210205);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//符合阈值需求,前置任务没有完成
log.info(uid + "的任务条件id:" + method);
//获取对应话术
text = SpeechUtil.getTaskSpeech(uid, Constants.SPEECH_PERSON, 210203);
text = SpeechUtil.replaceHeader(text, subject.getName());
resultResponse.set反馈ID(210203);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Integer objectId = demandTask.getObject();
Map<Integer, Integer> objectMap = taskMap.get(objectId);
if (!StringUtils.isEmpty(demandTask.getPostTask()) && !StringUtils.isEmpty(objectMap)) {
if (objectMap.containsKey(Integer.parseInt(demandTask.getPostTask()))) {
log.info(uid + "的任务条件id:" + method);
subjectMap.put(demandTask.getDemandTaskId(), 1);
addThreshold(player.getPersonInfoMap().get(subjectId), demandTask);
//增加声望值
PlayerUtil.updateReputation(player, demandTask.getReputation());
//清除缓存
CacheGlobal.concurrentMap.remove(unique);
//获取对应话术
text = SpeechUtil.getSuccessTaskSpeech(uid, subject, demandTask);
resultResponse.set反馈ID(210201);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//3.符合阈值需求,前置任务没有完成
log.info(uid + "的任务条件id:" + method);
//获取对应话术
text = SpeechUtil.getTaskSpeech(uid, Constants.SPEECH_PERSON, 210203);
text = SpeechUtil.replaceHeader(text, subject.getName());
text = SpeechUtil.speechReplaceValue(uid, text, subject, demandTask);
resultResponse.set反馈ID(210203);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
}
//4.自身线索提示对应文本
if (type == 4) {
text = SpeechUtil.getTipReplySpeech(uid, demandTask, 0, 2, reply);
}
}
//否定
if ("002".equals(methodId)) {
text = SpeechUtil.getCheckSpeech(uid, Constants.SPEECH_ASIDE, 3007);
}
//清除缓存
CacheGlobal.concurrentMap.remove(unique);
resultResponse.set反馈ID(300001); resultResponse.set反馈ID(300001);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
@Override
public CommonResult<ResultVarsResponse> checkRanking(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
String gateNo = TimingAcquisition.playerMap.get(uid).getGateNo();
int num = 10;
StringBuilder text = new StringBuilder();
PriorityBlockingQueue<ReputationDto> queueTemp = new PriorityBlockingQueue<>();
PriorityBlockingQueue<ReputationDto> gateNoReputationQueue = TimingAcquisition.gateNoReputationQueueMap.get(gateNo);
queueTemp.addAll(gateNoReputationQueue);
if (num > queueTemp.size()) {
num = queueTemp.size();
}
for (int i = 0; i < num; i++) {
text.append("第").append(i+1).append("名").append("是").append(queueTemp.remove().getUid()).append(",");
}
if (text.length() > 0) {
text.deleteCharAt(text.length() - 1);
}
resultResponse.set反馈ID(300001);
resultResponse.set反馈文本(text.toString());
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
} }
package com.qiwu.inference.service.common; package com.qiwu.inference.service.common;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.dto.OperateEnum;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
import com.qiwu.inference.service.player.PlayerService; import com.qiwu.inference.service.player.PlayerService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
@Service @Service
public class CommonService { public class CommonService {
@Autowired @Autowired
...@@ -14,92 +18,26 @@ public class CommonService { ...@@ -14,92 +18,26 @@ public class CommonService {
public CommonResult<ResultVarsResponse> operate(OperationRequest request) { public CommonResult<ResultVarsResponse> operate(OperationRequest request) {
String methodId = request.getMethodId();; String methodId = request.getMethodId();
switch (methodId){ String operateName = OperateEnum.getOperateName(methodId);
case "1001": switch (operateName){
case "1002": case "askDisposition":
return playerService.askDisposition(request); return playerService.askDisposition(request);
case "1003": case "askRelation":
case "1004":
case "1005":
case "1006":
return playerService.askRelation(request); return playerService.askRelation(request);
case "1007": case "askBehaviour":
case "1008":
case "1009":
case "1010":
case "1011":
return playerService.askBehaviour(request); return playerService.askBehaviour(request);
case "1012": case "askTask":
case "1013":
case "1014":
case "1015":
case "1016":
case "1017":
case "1018":
case "1019":
case "1020":
case "1021":
case "1022":
return playerService.askTask(request); return playerService.askTask(request);
case "1023": case "askIdentity":
case "1024":
return playerService.askIdentity(request); return playerService.askIdentity(request);
case "1025": case "askLocation":
case "1026":
return playerService.askLocation(request); return playerService.askLocation(request);
case "1027": case "askPrompt":
case "1028":
case "1029":
return playerService.askPrompt(request); return playerService.askPrompt(request);
case "2001": case "askFinalClue":
case "2003": return playerService.askFinalClue(request);
case "2002": case "performTask":
case "2004":
case "2005":
case "2006":
case "2007":
case "2008":
case "2009":
case "2010":
case "2011":
case "2012":
case "2013":
case "2014":
case "2015":
case "2016":
case "2017":
case "2018":
case "2019":
case "2020":
case "2021":
case "2022":
case "2023":
case "2024":
case "2025":
case "2026":
case "2027":
case "2028":
case "2029":
case "2030":
case "2031":
case "2032":
case "2033":
case "2034":
case "2035":
case "2036":
case "2037":
case "2038":
case "2039":
case "2040":
case "2041":
case "2101":
case "2102":
case "2104":
case "2106":
case "2107":
case "2108":
case "2109":
return playerService.performTask(request); return playerService.performTask(request);
} }
return null; return null;
......
package com.qiwu.inference.service.login; package com.qiwu.inference.service.login;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.dto.request.CommonRequest;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.CommonResponse; import com.qiwu.inference.dto.response.CommonResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
public interface LoginService { public interface LoginService {
CommonResult<ResultVarsResponse> login(String uid); CommonResult<ResultVarsResponse> login(CommonRequest commonRequest);
CommonResult<ResultVarsResponse> startGame(OperationRequest operationReq); CommonResult<ResultVarsResponse> startGame(CommonRequest commonRequest);
CommonResult<ResultVarsResponse> loadPlayerData(CommonRequest commonRequest);
CommonResult<ResultVarsResponse> reloadPlayerData(CommonRequest commonRequest);
} }
package com.qiwu.inference.service.login.impl; package com.qiwu.inference.service.login.impl;
import cn.hutool.core.lang.UUID;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.utils.*; import com.qiwu.inference.common.utils.*;
import com.qiwu.inference.dto.LocationInfoDto; import com.qiwu.inference.dto.*;
import com.qiwu.inference.dto.Person; import com.qiwu.inference.dto.request.CommonRequest;
import com.qiwu.inference.dto.Player;
import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.*; import com.qiwu.inference.dto.response.*;
import com.qiwu.inference.pojo.EndGoal;
import com.qiwu.inference.service.login.LoginService; import com.qiwu.inference.service.login.LoginService;
import com.qiwu.inference.service.remote.impl.RemoteGardenImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
...@@ -22,57 +23,100 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -22,57 +23,100 @@ import java.util.concurrent.ConcurrentHashMap;
@Service @Service
public class LoginServiceImpl implements LoginService { public class LoginServiceImpl implements LoginService {
Logger log = LoggerFactory.getLogger(LoginServiceImpl.class);
@Value("${offlineTime}")
private String offlineTime;
//从yml配置文件中取出对话过期时间 //从yml配置文件中取出对话过期时间
@Value("${expireTime}") @Value("${expireTime}")
private String expireTime; private String expireTime;
@Value("${userFilePath}") @Value("${userFilePath}")
private String userFilePath; private String userFilePath;
@Value("${dataFilePath}")
private String dataFilePath;
@Autowired
private RedisUtil redisUtil;
@Autowired
private RemoteGardenImpl remoteGardenService;
@Override @Override
public CommonResult<ResultVarsResponse> login(String uid) { public CommonResult<ResultVarsResponse> login(CommonRequest commonRequest) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse(); ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse(); ResultResponse resultResponse = new ResultResponse();
//存放玩家数据 //存放玩家数据
Map<String, String> sidGateNoMap = new ConcurrentHashMap<>(); Map<String, String> uidGateNoMap = new ConcurrentHashMap<>();
String nowTime = DateUtil.getCurrentTime(); String nowTime = DateUtil.getCurrentTime();
Player player = new Player(); Player player = new Player();
player.setSid(uid); String uid = commonRequest.getUid();
String series = commonRequest.getVars().get系列名称();
String gateName = commonRequest.getVars().get关卡名称();
player.setUid(uid);
player.setStatus(Constants.ONLINE); player.setStatus(Constants.ONLINE);
player.setOnlineTime(nowTime); player.setOnlineTime(nowTime);
player.setSeries(series);
//初始化推理游戏人物 //初始化推理游戏人物
List<String> keys = new ArrayList<>(TimingAcquisition.gateInfoMap.keySet()); List<String> gateNoList = TimingAcquisition.seriesGateNosMap.get(series);
int random = RandomUtil.randomInt(keys.size()); // int random = RandomUtil.randomInt(gateNoList.size());
player.setGateNo(keys.get(random)); // player.setGateNo(gateNoList.get(random));
List<Person> personsCopy = TimingAcquisition.gateInfoMap.get(keys.get(random)); //存放玩家uid与关卡编号
// TimingAcquisition.uidGateNoMap.put(uid, player.getGateNo());
String gateNo;
if (StringUtils.isEmpty(gateName)) {
int random = RandomUtil.randomInt(gateNoList.size());
gateNo = gateNoList.get(random);
} else {
gateNo = TimingAcquisition.gateNameToNoMap.get(gateName);
}
player.setGateNo(gateNo);
List<Person> personsCopy = TimingAcquisition.gateInfoMap.get(gateNo);
//深拷贝list //深拷贝list
List<Person> personCopyList = PlayerUtil.deepCopyList(personsCopy); List<Person> personCopyList = PlayerUtil.deepCopyList(personsCopy);
Map<Integer,Map<Integer,Integer>> taskMapCopy = new HashMap<>(); //过滤掉系列中已加入的伙伴
Map<Integer,Person> personMapCopy = new HashMap<>(); // personCopyList = PlayerUtil.filterPerson(uid, personCopyList);
Map<String,Integer> name2IdMapCopy = new HashMap<>(); Map<Integer,Map<Integer,Integer>> taskMap = new HashMap<>();
Map<Integer, PersonInfoDto> personInfoMap = new HashMap<>();
Map<String,Integer> name2IdMap = new HashMap<>();
Map<Integer, String> id2NameMap = new HashMap<>();
for (Person person : personCopyList) { for (Person person : personCopyList) {
taskMapCopy.put(person.getId(), new HashMap<>()); taskMap.put(person.getId(), new HashMap<>());
personMapCopy.put(person.getId(), person); name2IdMap.put(person.getName(), person.getId());
name2IdMapCopy.put(person.getName(), person.getId()); id2NameMap.put(person.getId(), person.getName());
//NPC相关数据
PersonInfoDto personInfo = new PersonInfoDto();
Map<Integer, List<Integer>> clueSourceMap = new ConcurrentHashMap<>();
Map<Integer, Integer> demandTaskSwitchMap = new ConcurrentHashMap<>();
personInfo.setId(person.getId());
// List<ClueDto> clueList = person.getClues();
// for (ClueDto clue : clueList) {
// clueSourceMap.put(clue.getClueId(), new ArrayList<>());
// }
List<DemandTaskDto> demandTaskList = person.getDemandTasks();
for (DemandTaskDto demandTask : demandTaskList) {
demandTaskSwitchMap.put(demandTask.getDemandTaskId(), demandTask.getClueSwitch());
}
personInfo.setClueSourceMap(clueSourceMap);
personInfo.setDemandTaskSwitchMap(demandTaskSwitchMap);
personInfoMap.put(person.getId(), personInfo);
} }
player.setTaskMap(taskMapCopy); player.setTaskMap(taskMap);
player.setPersonMap(personMapCopy); player.setPersonInfoMap(personInfoMap);
player.setName2IdMap(name2IdMapCopy); player.setName2IdMap(name2IdMap);
player.setId2NameMap(id2NameMap);
//给玩家分配场所和对话人物 //给玩家分配场所和对话人物
Map<String, List<Integer>> locationPersonMap = new HashMap<>(); Map<String, List<Integer>> locationPersonMap = new HashMap<>();
Map<Integer, Person> personMap = player.getPersonMap(); for (Person person : personCopyList) {
for (Map.Entry<Integer, Person> entry : personMap.entrySet()) {
Person person = entry.getValue();
if (!StringUtils.isEmpty(person.getLocation())) { if (!StringUtils.isEmpty(person.getLocation())) {
//没有当前场所 //没有当前场所
if (StringUtils.isEmpty(locationPersonMap.get(person.getLocation()))) { if (StringUtils.isEmpty(locationPersonMap.get(person.getLocation()))) {
List<Integer> personList = new ArrayList<>(); List<Integer> personList = new ArrayList<>();
personList.add(entry.getKey()); personList.add(person.getId());
locationPersonMap.put(person.getLocation(), personList); locationPersonMap.put(person.getLocation(), personList);
} }
//有当前场所,但是没有这个人 //有当前场所,但是没有这个人
List<Integer> persons = locationPersonMap.get(person.getLocation()); List<Integer> persons = locationPersonMap.get(person.getLocation());
if (!persons.contains(entry.getKey())) { if (!persons.contains(person.getId())) {
persons.add(entry.getKey()); persons.add(person.getId());
} }
} }
} }
...@@ -85,16 +129,48 @@ public class LoginServiceImpl implements LoginService { ...@@ -85,16 +129,48 @@ public class LoginServiceImpl implements LoginService {
int num = RandomUtil.randomInt(personList.size()); int num = RandomUtil.randomInt(personList.size());
player.setPersonId(personList.get(num)); player.setPersonId(personList.get(num));
//生成场所表,包含场所隐藏状态和必现场所 //生成场所表,包含场所隐藏状态和必现场所
Map<String, LocationInfoDto> locationMap = PlayerUtil.makeLocationMap(locationPersonMap); Map<String, LocationInfoDto> locationMap = PlayerUtil.makeLocationMap(uid, locationPersonMap, series);
player.setLocationMap(locationMap); player.setLocationMap(locationMap);
//记录玩家第一次的任务个数更新时间 //记录玩家第一次的任务个数更新时间
player.setNumUpdateTime(nowTime); player.setNumUpdateTime(nowTime);
//初始货币值
// player.setCurrency((double)0);
//初始时间值
String initTime = TimingAcquisition.seriesSystemConfigMap.get(player.getSeries()).get("init_time").getValue();
player.setInitTime(Integer.parseInt(initTime));
TimingAcquisition.playerMap.put(uid, player); TimingAcquisition.playerMap.put(uid, player);
String playerStr = JSON.toJSONString(player); String playerStr = JSON.toJSONString(player);
//创建玩家数据路径
String path = MD5Util.changeToPath(uid, series);
//持久化玩家数据 //持久化玩家数据
PersistenceUtil.saveDataToFile(userFilePath, uid, playerStr); PersistenceUtil.saveDataToFile(path, player.getGateNo(), playerStr);
sidGateNoMap.put(uid, player.getGateNo()); uidGateNoMap.put(uid, player.getGateNo());
TimingAcquisition.uidGateNoMap.putAll(sidGateNoMap); TimingAcquisition.uidGateNoMap.putAll(uidGateNoMap);
//保存所有玩家的uid
TimingAcquisition.uidList.add(uid);
//该玩家以唯一标识加入全局缓存,用于玩家离线判断
String uniqueUid = uid + "%#%online%#%";
CacheUtil.put(uniqueUid, "", Long.parseLong(offlineTime));
// String seriesPlayerStr = JSON.toJSONString(TimingAcquisition.seriesPlayerMap);
//持久化系列的玩家数据
// PersistenceUtil.saveDataToFile(dataFilePath, "seriesPlayer", seriesPlayerStr);
//-----------------初始化系列中的玩家汇总数据------------
PlayerUtil.initSeriesPlayer(uid, series);
//--------------持久化该玩家系列汇总的数据---------------
String dataPath = MD5Util.changeToDataPath(uid, series);
PersistenceUtil.saveDataToFile(dataPath, uid, JSON.toJSONString(TimingAcquisition.seriesPlayerMap.get(series).get(uid)));
//-----------存入redis缓存中-------------
redisUtil.setStr(series + "::"+ uid, JSON.toJSONString(TimingAcquisition.seriesPlayerMap.get(series).get(uid)));
//更新系列和关卡中玩家的排名
ReputationDto reputation = new ReputationDto();
reputation.setUid(player.getUid());
reputation.setReputation(player.getReputation());
//更新关卡排行榜
PlayerUtil.updateGateNoReputation(player, reputation);
//更新系列排行榜
PlayerUtil.updateSeriesReputation(uid, series, reputation);
resultResponse.set反馈ID(100000); resultResponse.set反馈ID(100000);
resultResponse.set反馈文本("登录成功"); resultResponse.set反馈文本("登录成功");
...@@ -103,37 +179,54 @@ public class LoginServiceImpl implements LoginService { ...@@ -103,37 +179,54 @@ public class LoginServiceImpl implements LoginService {
} }
@Override @Override
public CommonResult<ResultVarsResponse> startGame(OperationRequest operationReq) { public CommonResult<ResultVarsResponse> startGame(CommonRequest commonRequest) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse(); ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse(); ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid(); String uid = commonRequest.getUid();
String text = "";
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
String seriesName = player.getSeries();
//数据重置 //数据重置
if (player.getFinished() == 1) { if (player.getFinished() == 1) {
log.info(uid + "通关过,开始重置数据");
//初始化推理游戏人物 //初始化推理游戏人物
List<String> keys = new ArrayList<>(TimingAcquisition.gateInfoMap.keySet()); List<Person> personsCopy = TimingAcquisition.gateInfoMap.get(player.getGateNo());
int random = RandomUtil.randomInt(keys.size());
player.setGateNo(keys.get(random));
List<Person> personsCopy = TimingAcquisition.gateInfoMap.get(keys.get(random));
//深拷贝list //深拷贝list
List<Person> personCopyList = PlayerUtil.deepCopyList(personsCopy); List<Person> personCopyList = PlayerUtil.deepCopyList(personsCopy);
Map<Integer,Map<Integer,Integer>> taskMapCopy = new HashMap<>(); //过滤掉系列中已加入的伙伴
Map<Integer,Person> personMapCopy = new HashMap<>(); // personCopyList = PlayerUtil.filterPerson(uid, personCopyList);
Map<String,Integer> name2IdMapCopy = new HashMap<>(); Map<Integer,Map<Integer,Integer>> taskMap = new HashMap<>();
Map<Integer, PersonInfoDto> personInfoMap = new HashMap<>();
Map<String,Integer> name2IdMap = new HashMap<>();
Map<Integer, String> id2NameMap = new HashMap<>();
for (Person person : personCopyList) { for (Person person : personCopyList) {
taskMapCopy.put(person.getId(), new HashMap<>()); taskMap.put(person.getId(), new HashMap<>());
personMapCopy.put(person.getId(), person); name2IdMap.put(person.getName(), person.getId());
name2IdMapCopy.put(person.getName(), person.getId()); id2NameMap.put(person.getId(), person.getName());
//NPC相关数据
PersonInfoDto personInfo = new PersonInfoDto();
Map<Integer, List<Integer>> clueSourceMap = new ConcurrentHashMap<>();
Map<Integer, Integer> demandTaskSwitchMap = new ConcurrentHashMap<>();
personInfo.setId(person.getId());
// List<ClueDto> clueList = person.getClues();
// for (ClueDto clue : clueList) {
// clueSourceMap.put(clue.getClueId(), new ArrayList<>());
// }
List<DemandTaskDto> demandTaskList = person.getDemandTasks();
for (DemandTaskDto demandTask : demandTaskList) {
demandTaskSwitchMap.put(demandTask.getDemandTaskId(), demandTask.getClueSwitch());
}
personInfo.setClueSourceMap(clueSourceMap);
personInfo.setDemandTaskSwitchMap(demandTaskSwitchMap);
personInfoMap.put(person.getId(), personInfo);
} }
player.setTaskMap(taskMapCopy); player.setTaskMap(taskMap);
player.setPersonMap(personMapCopy); player.setPersonInfoMap(personInfoMap);
player.setName2IdMap(name2IdMapCopy); player.setName2IdMap(name2IdMap);
player.setCurrency(3000.0); player.setId2NameMap(id2NameMap);
//给玩家分配场所和对话人物 //给玩家分配场所和对话人物
Map<String, List<Integer>> locationPersonMap = new HashMap<>(); Map<String, List<Integer>> locationPersonMap = new HashMap<>();
Map<Integer, Person> personMap = player.getPersonMap(); Map<Integer, Person> personMap = PlayerUtil.getPersonMap(uid);
for (Map.Entry<Integer, Person> entry : personMap.entrySet()) { for (Map.Entry<Integer, Person> entry : personMap.entrySet()) {
Person person = entry.getValue(); Person person = entry.getValue();
if (!StringUtils.isEmpty(person.getLocation())) { if (!StringUtils.isEmpty(person.getLocation())) {
...@@ -158,31 +251,137 @@ public class LoginServiceImpl implements LoginService { ...@@ -158,31 +251,137 @@ public class LoginServiceImpl implements LoginService {
List<Integer> personList = locationPersonMap.get(locationId); List<Integer> personList = locationPersonMap.get(locationId);
int num = RandomUtil.randomInt(personList.size()); int num = RandomUtil.randomInt(personList.size());
player.setPersonId(personList.get(num)); player.setPersonId(personList.get(num));
//初始货币值
// player.setCurrency((double)0);
//初始时间值
String initTime = TimingAcquisition.seriesSystemConfigMap.get(player.getSeries()).get("init_time").getValue();
player.setInitTime(Integer.parseInt(initTime));
//生成场所表,包含场所隐藏状态和必现场所 //生成场所表,包含场所隐藏状态和必现场所
Map<String, LocationInfoDto> locationMap = PlayerUtil.makeLocationMap(locationPersonMap); Map<String, LocationInfoDto> locationMap = PlayerUtil.makeLocationMap(uid, locationPersonMap, player.getSeries());
player.setLocationMap(locationMap); player.setLocationMap(locationMap);
player.setPoint(0);
player.setClueMap(new HashMap<>());
player.setFinishedTaskNum(0);
player.setTipFlag(false);
player.setOperateTextNum(1);
player.setAskAndNumMap(new HashMap<>());
player.setFinished(0);
String playerStr = JSON.toJSONString(player);
//创建玩家数据路径
String path = MD5Util.changeToPath(uid, player.getSeries());
//持久化玩家数据
PersistenceUtil.saveDataToFile(path, player.getGateNo(), playerStr);
log.info(uid + "的数据重置成功");
} }
//关卡编号 String initMoney = TimingAcquisition.seriesSystemConfigMap.get(seriesName).get("init_money").getValue();
String gateNo = player.getGateNo(); if (StringUtils.isEmpty(initMoney)) {
int size = TimingAcquisition.barrierTaskKeyMap.get(gateNo).size(); //远程获取货币数量进行同步
Integer demandTaskId = TimingAcquisition.barrierTaskKeyMap.get(gateNo).get(size - 1).getDemandTaskId(); CallResponse callMoney = remoteGardenService.getMoney(uid);
Map<Integer, EndGoal> endGoalMap = TimingAcquisition.endGoalMap; initMoney = callMoney.getData();
for (Map.Entry<Integer, EndGoal> entry : endGoalMap.entrySet()) { //关卡现有货币数量
EndGoal endGoal = entry.getValue(); int money = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getMoney();
List<String> associatedTaskIds = Arrays.asList(endGoal.getAssociatedTaskId().split("\\|")); if (money != Integer.parseInt(initMoney)) {
if (associatedTaskIds.contains(demandTaskId.toString())) { TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).setMoney(Integer.parseInt(initMoney));
text = "【旁白@正常】" + endGoal.getName();
text += "【旁白@正常】" + endGoal.getDescription();
text += SpeechUtil.getAskSpeech(Constants.SPEECH_PERSON, 103001);
text += SpeechUtil.getAskSpeech(Constants.SPEECH_PERSON, 103002);
String location = TimingAcquisition.locationMap.get(TimingAcquisition.playerMap.get(uid).getLocation()).getName();
String name = PlayerUtil.getNameByPersonId(uid, TimingAcquisition.playerMap.get(uid).getPersonId());
text = SpeechUtil.speechReplaceNum(text, location, name);
break;
} }
//获取物品进行同步
CallResponse callItems = remoteGardenService.getItems(uid);
List<ItemDto> itemList = JSON.parseObject(callItems.getData(), new TypeReference<List<ItemDto>>(){});
//同步物品信息
ConfigDataUtil.synItems(uid, itemList);
} }
//关卡编号
String gateNo = player.getGateNo();
//获取开场白话术
String text = SpeechUtil.getPrologueSpeech(uid, gateNo);
resultResponse.set反馈ID(100009); resultResponse.set反馈ID(100009);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set当前对话角色身份(PlayerUtil.getPerson(uid, player.getPersonId()).getIdentityName());
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
@Override
public CommonResult<ResultVarsResponse> loadPlayerData(CommonRequest commonRequest) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = commonRequest.getUid();
String seriesName = commonRequest.getVars().get系列名称();
String gateName = commonRequest.getVars().get关卡名称();
String gateNo = TimingAcquisition.gateNameToNoMap.get(gateName);
//创建玩家数据路径
String path = MD5Util.changeToPath(uid, seriesName);
String playStr = PersistenceUtil.loadPlayerData(path, gateNo);
//第一次进入该关卡
if (StringUtils.isEmpty(playStr)) {
return login(commonRequest);
}
Player player = JSON.parseObject(playStr, new TypeReference<Player>(){});
player.setOnlineTime(DateUtil.getCurrentTime());
player.setStatus(Constants.ONLINE);
//玩家数据加入缓存
TimingAcquisition.playerMap.put(uid, player);
//该玩家以唯一标识加入全局缓存,用于玩家离线判断
String uniqueUid = uid + "%#%online%#%";
CacheUtil.put(uniqueUid, "", Long.parseLong(offlineTime));
//----------------加载该玩家的系列汇总数据-----------------
PersistenceUtil.loadSeriesPlayer(uid, seriesName);
//-------------------存入redis缓存中------------------
redisUtil.setStr(seriesName + "::"+ uid, JSON.toJSONString(TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid)));
resultResponse.set反馈ID(100010);
resultResponse.set反馈文本(uid + "的" + gateName + "数据加载完成");
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 换关卡后,重新加载新关卡的数据
* @param commonRequest
* @return
*/
@Override
public CommonResult<ResultVarsResponse> reloadPlayerData(CommonRequest commonRequest) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = commonRequest.getUid();
String gateName = commonRequest.getVars().get关卡名称();
String gateNo = TimingAcquisition.gateNameToNoMap.get(gateName);
Player player = TimingAcquisition.playerMap.get(uid);
//更新玩家为离线状态
player.setStatus(Constants.OFFLINE);
//修改下线时间
player.setOfflineTime(DateUtil.getCurrentTime());
//创建玩家数据路径
String path = MD5Util.changeToPath(uid, player.getSeries());
//--------------持久化该园丁信息---------------
PersistenceUtil.saveDataToFile(path, player.getGateNo(), JSON.toJSONString(player));
//-----------------重新加载该玩家的关卡数据到缓存-----------------
String playStr = PersistenceUtil.loadPlayerData(path, gateNo);
//第一次进入该关卡
if (StringUtils.isEmpty(playStr)) {
return login(commonRequest);
}
Player playerNew = JSON.parseObject(playStr, new TypeReference<Player>(){});
player.setOnlineTime(DateUtil.getCurrentTime());
player.setStatus(Constants.ONLINE);
//玩家数据加入缓存
TimingAcquisition.playerMap.put(uid, playerNew);
//该玩家以唯一标识加入全局缓存,用于玩家离线判断
String uniqueUid = uid + "%#%online%#%";
CacheUtil.put(uniqueUid, "", Long.parseLong(offlineTime));
//-------------------存入redis缓存中------------------
redisUtil.setStr(player.getSeries() + "::"+ uid, JSON.toJSONString(TimingAcquisition.seriesPlayerMap.get(player.getSeries()).get(uid)));
resultResponse.set反馈ID(100010);
resultResponse.set反馈文本(uid + "的" + gateName + "关卡数据加载完成");
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
......
package com.qiwu.inference.service.partner;
import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultVarsResponse;
public interface PartnerService {
CommonResult<ResultVarsResponse> operate(OperationRequest operationReq);
}
package com.qiwu.inference.service.partner.impl;
import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.cache.CacheGlobal;
import com.qiwu.inference.common.utils.CacheUtil;
import com.qiwu.inference.common.utils.ConfigDataUtil;
import com.qiwu.inference.common.utils.PlayerUtil;
import com.qiwu.inference.common.utils.SpeechUtil;
import com.qiwu.inference.dto.*;
import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse;
import com.qiwu.inference.pojo.BackpackNum;
import com.qiwu.inference.pojo.PartnerItem;
import com.qiwu.inference.service.chat.impl.ChatServiceImpl;
import com.qiwu.inference.service.partner.PartnerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.PostConstruct;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class PartnerServiceImpl implements PartnerService {
Logger log = LoggerFactory.getLogger(PartnerServiceImpl.class);
@Autowired
private ChatServiceImpl chatService;
Map<String, Function<OperationRequest, CommonResult<ResultVarsResponse>>> operateMap = new HashMap<>();
@PostConstruct
private void dispatcher() {
operateMap.put("7001", this::useAbility);
operateMap.put("7002", this::useItem);
operateMap.put("7003", this::disbandPartnerCheck);
operateMap.put("700303", this::disbandPartner);
operateMap.put("7004", this::disbandItemCheck);
operateMap.put("700403", this::disbandItem);
operateMap.put("7005", this::checkPartnerItem);
operateMap.put("7006", this::checkTeam);
operateMap.put("7007", this::checkBackpack);
operateMap.put("700801", this::agreeGain);
operateMap.put("700802", this::agreeGainRefuse);
}
@Override
public CommonResult<ResultVarsResponse> operate(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String methodId = operationReq.getMethodId();
Function<OperationRequest, CommonResult<ResultVarsResponse>> result = operateMap.get(methodId);
if (!StringUtils.isEmpty(result)) {
return result.apply(operationReq);
}
resultResponse.set反馈ID(7000);
resultResponse.set反馈文本("没有指定操作编号");
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 7001:伙伴使用能力
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> useAbility(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Integer partnerId = operationReq.getPartnerItemId(); //获取伙伴id
if (StringUtils.isEmpty(partnerId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700103);
resultResponse.set反馈ID(700103);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Player player = TimingAcquisition.playerMap.get(uid);
Integer subjectId = player.getPersonId();
//当前对话的人物配置信息
Person currentNPC = PlayerUtil.getPerson(uid, subjectId);
//当前对话人
PersonInfoDto talk = player.getPersonInfoMap().get(subjectId);
//获取该伙伴的信息
ItemNumDto partnerInfo = PlayerUtil.getPartnerNumById(uid, partnerId);
//玩家还没有该伙伴
if (StringUtils.isEmpty(partnerInfo)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700106);
resultResponse.set反馈ID(700106);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
//伙伴配置数据
PartnerItem partner = TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(partnerId);
//同一伙伴已对目标NPC使用过一次能力
if (player.getPersonInfoMap().get(subjectId).getPartnerItemIdList().contains(partnerId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700105);
text = SpeechUtil.speechReplaceNum(text, partner.getName());
resultResponse.set反馈ID(700105);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//能力对应性格
String dispositions = partner.getDispositions();
if (!StringUtils.isEmpty(dispositions)) {
List<Integer> dispositionList = Arrays.stream(dispositions.split("\\|")).map(Integer::new).collect(Collectors.toList());
//不存在对应的性格
if (!Collections.disjoint(dispositionList, currentNPC.getDispositions())) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700102);
text = SpeechUtil.speechReplaceNum(text, partner.getName());
resultResponse.set反馈ID(700102);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//能力对应身份
String identity = partner.getIdentity();
if (!StringUtils.isEmpty(identity)) {
List<Integer> identityList = Arrays.stream(identity.split("\\|")).map(Integer::new).collect(Collectors.toList());
//不存在对应的身份
if (!identityList.contains(currentNPC.getIdentityId())) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700102);
text = SpeechUtil.speechReplaceNum(text, partner.getName());
resultResponse.set反馈ID(700102);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//对NPC使用技能
//配置了信任值增减
if (!StringUtils.isEmpty(partner.getTrust())) {
talk.setTrustDegree(talk.getTrustDegree() + partner.getTrust());
}
//配置了威慑度增减
if (!StringUtils.isEmpty(partner.getDeterrence())) {
talk.setDeterrenceDegree(talk.getDeterrenceDegree() + partner.getDeterrence());
}
//配置了任务ID
if (!StringUtils.isEmpty(partner.getTaskId())) {
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, partner.getTaskId());
if (!StringUtils.isEmpty(demandTask)) {
//NPC有这个任务则完成
PlayerUtil.taskFinished(uid, subjectId, partner.getTaskId());
}
}
//获取对应话术
String text = "";
//出手次数减1
int abilityTimes = partnerInfo.getTimes();
//还有剩余次数
if (abilityTimes > 0) {
text = partner.getAnswer();
abilityTimes--;
if (abilityTimes == 0) {
abilityTimes = -1;
text = partner.getLastAnswer();
}
partnerInfo.setTimes(abilityTimes);
}
log.info(uid + "伙伴" + partner.getName() + "剩余能力次数:" + abilityTimes);
//次数已用完
if (abilityTimes == -1) {
//删除该伙伴
PlayerUtil.removePartnerItemById(uid, partnerId);
//获取对应话术
text += SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700107);
text = SpeechUtil.speechReplaceNum(text, partner.getName());
resultResponse.set反馈ID(700107);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//记录该伙伴已经对当前NPC使用功能
player.getPersonInfoMap().get(subjectId).getPartnerItemIdList().add(partnerId);
resultResponse.set反馈ID(700101);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 7002:使用物品
*/
public CommonResult<ResultVarsResponse> useItem(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Integer itemId = operationReq.getPartnerItemId(); //获取物品id
//未提供物品名称
if (StringUtils.isEmpty(itemId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700203);
resultResponse.set反馈ID(700203);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Player player = TimingAcquisition.playerMap.get(uid);
Integer subjectId = player.getPersonId();
//当前对话的人物配置信息
Person currentNPC = PlayerUtil.getPerson(uid, subjectId);
//当前对话人
PersonInfoDto talk = player.getPersonInfoMap().get(subjectId);
//获取该物品的信息
ItemNumDto itemInfo = PlayerUtil.getItemNumById(uid, itemId);
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
//物品配置数据
PartnerItem item = TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(itemId);
//玩家还没有该物品
if (StringUtils.isEmpty(itemInfo)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700206);
text = SpeechUtil.speechReplaceNum(text, item.getName());
resultResponse.set反馈ID(700206);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//同一物品已对目标NPC使用过一次能力
if (player.getPersonInfoMap().get(subjectId).getPartnerItemIdList().contains(itemId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700205);
text = SpeechUtil.speechReplaceNum(text, item.getName());
resultResponse.set反馈ID(700205);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//能力对应性格
String dispositions = item.getDispositions();
if (!StringUtils.isEmpty(dispositions)) {
List<Integer> dispositionList = Arrays.stream(dispositions.split("\\|")).map(Integer::new).collect(Collectors.toList());
//不存在对应的性格
if (!Collections.disjoint(dispositionList, currentNPC.getDispositions())) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700202);
text = SpeechUtil.speechReplaceNum(text, item.getName());
resultResponse.set反馈ID(700202);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//能力对应身份
String identity = item.getIdentity();
if (!StringUtils.isEmpty(identity)) {
List<Integer> identityList = Arrays.stream(identity.split("\\|")).map(Integer::new).collect(Collectors.toList());
//不存在对应的身份
if (!identityList.contains(currentNPC.getIdentityId())) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700202);
text = SpeechUtil.speechReplaceNum(text, item.getName());
resultResponse.set反馈ID(700202);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//对NPC使用技能
//配置了信任值增减
if (!StringUtils.isEmpty(item.getTrust())) {
talk.setTrustDegree(talk.getTrustDegree() + item.getTrust());
}
//配置了威慑度增减
if (!StringUtils.isEmpty(item.getDeterrence())) {
talk.setDeterrenceDegree(talk.getDeterrenceDegree() + item.getDeterrence());
}
//配置了任务ID
if (!StringUtils.isEmpty(item.getTaskId())) {
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, item.getTaskId());
if (!StringUtils.isEmpty(demandTask)) {
//NPC有这个任务则完成
PlayerUtil.taskFinished(uid, subjectId, item.getTaskId());
}
}
//能力使用文本
String text = "";
int abilityTimes = itemInfo.getTimes();
//还有剩余次数
if (abilityTimes > 0) {
text = item.getAnswer();
abilityTimes--;
if (abilityTimes == 0) {
abilityTimes = -1;
text = item.getLastAnswer();
}
itemInfo.setTimes(abilityTimes);
}
log.info(uid + "物品:" + item.getName() + "剩余次数:" + abilityTimes);
//次数已用完
if (abilityTimes == -1) {
//删除该物品
PlayerUtil.removePartnerItemById(uid, itemId);
//获取对应话术
text += SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700207);
text = SpeechUtil.speechReplaceNum(text, item.getName());
resultResponse.set反馈ID(700207);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//记录该物品已经对当前NPC使用功能
player.getPersonInfoMap().get(subjectId).getPartnerItemIdList().add(itemId);
resultResponse.set反馈ID(700201);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 7003:遣散伙伴校验
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> disbandPartnerCheck(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Integer partnerId = operationReq.getPartnerItemId(); //获取伙伴id
if (StringUtils.isEmpty(partnerId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700305);
resultResponse.set反馈ID(700305);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
if (StringUtils.isEmpty(TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).
getPartnerItemMap().get(Constants.ITEM_PARTNER))) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700302);
resultResponse.set反馈ID(700302);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, ItemNumDto> partnerInfoMap = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).
getPartnerItemMap().get(Constants.ITEM_PARTNER).getItemInfoMap();
List<Integer> partnerIdList = new ArrayList<>(partnerInfoMap.keySet());
//没有该伙伴
if (!partnerIdList.contains(partnerId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700302);
resultResponse.set反馈ID(700302);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//伙伴物品配置数据
PartnerItem partnerItem = TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(partnerId);
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700301);
text = SpeechUtil.speechReplaceNum(text, partnerItem.getName());
//存在该伙伴,需二次确认删除
resultResponse.set反馈ID(700301);
resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("遣散伙伴回复1");
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 700303:确认遣散伙伴
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> disbandPartner(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Integer partnerId = operationReq.getPartnerItemId(); //获取伙伴id
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
Map<Integer, ItemNumDto> partnerInfoMap = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).
getPartnerItemMap().get(Constants.ITEM_PARTNER).getItemInfoMap();
//伙伴物品配置数据
PartnerItem partnerItem = TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(partnerId);
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700303);
text = SpeechUtil.speechReplaceNum(text, partnerItem.getName());
//存在该伙伴,删除
partnerInfoMap.remove(partnerId);
resultResponse.set反馈ID(700303);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 7004:丢弃物品校验
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> disbandItemCheck(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Integer itemId = operationReq.getPartnerItemId(); //获取物品id
if (StringUtils.isEmpty(itemId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700405);
resultResponse.set反馈ID(700405);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
if (StringUtils.isEmpty(TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).
getPartnerItemMap().get(Constants.ITEM_PROPS))) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700402);
resultResponse.set反馈ID(700402);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, ItemNumDto> itemInfoMap = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).
getPartnerItemMap().get(Constants.ITEM_PROPS).getItemInfoMap();
List<Integer> itemIdList = new ArrayList<>(itemInfoMap.keySet());
//没有该物品
if (!itemIdList.contains(itemId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700402);
resultResponse.set反馈ID(700402);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//伙伴物品配置数据
PartnerItem partnerItem = TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(itemId);
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700401);
text = SpeechUtil.speechReplaceNum(text, partnerItem.getName());
//存在该物品,需二次确认删除
resultResponse.set反馈ID(700401);
resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("丢弃物品回复1");
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 700403:确认丢弃该物品
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> disbandItem(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Integer itemId = operationReq.getPartnerItemId(); //获取伙伴id
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
Map<Integer, ItemNumDto> itemInfoMap = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).
getPartnerItemMap().get(Constants.ITEM_PROPS).getItemInfoMap();
//伙伴物品配置数据
PartnerItem partnerItem = TimingAcquisition.seriesPartnerItemMap.get(seriesName).get(itemId);
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700403);
text = SpeechUtil.speechReplaceNum(text, partnerItem.getName());
//存在该伙伴,删除
itemInfoMap.remove(itemId);
resultResponse.set反馈ID(700403);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 7005:查看指定的伙伴或物品
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> checkPartnerItem(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Integer partnerItemId = operationReq.getPartnerItemId(); //获取伙伴物品id
if (StringUtils.isEmpty(partnerItemId)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700506);
resultResponse.set反馈ID(700506);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//系列名称
String seriesName = TimingAcquisition.playerMap.get(uid).getSeries();
//玩家已有的伙伴和物品
PartnerItemDto partnerItem = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getPartnerItemMap().get(Constants.ITEM_PARTNER);
//还没有伙伴或物品
if (StringUtils.isEmpty(partnerItem)) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700502);
resultResponse.set反馈ID(700502);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, PartnerItem> partnerItemInfoMap = TimingAcquisition.seriesPartnerItemMap.get(seriesName);
//没有指定的伙伴或物品
if (StringUtils.isEmpty(partnerItemInfoMap.get(partnerItemId))) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700502);
resultResponse.set反馈ID(700502);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//获取对应话术
String text = "";
//查看的是伙伴或物品
if (!StringUtils.isEmpty(partnerItem.getItemInfoMap().get(partnerItemId))
|| !StringUtils.isEmpty(partnerItem.getItemInfoMap().get(partnerItemId))) {
//剩余使用次数
int times = partnerItem.getItemInfoMap().get(partnerItemId).getTimes();
if (times != 0) {
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700501);
text = SpeechUtil.speechReplaceNum(text, partnerItemInfoMap.get(partnerItemId).getName(),
partnerItemInfoMap.get(partnerItemId).getAbilityDes(), String.valueOf(times));
} else {
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700503);
text = SpeechUtil.speechReplaceNum(text, partnerItemInfoMap.get(partnerItemId).getName(), partnerItemInfoMap.get(partnerItemId).getAbilityDes());
}
resultResponse.set反馈ID(700501);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//查看指定的是伙伴
if (partnerItemInfoMap.get(partnerItemId).getType() == 1) {
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700504);
resultResponse.set反馈ID(700504);
} else {
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700505);
resultResponse.set反馈ID(700505);
}
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 7006:查看队伍
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> checkTeam(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Player player = TimingAcquisition.playerMap.get(uid);
//系列名称
String seriesName = player.getSeries();
PlayerSeriesDto playerSeries = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid);
//还没有伙伴或物品
if (StringUtils.isEmpty(playerSeries.getPartnerItemMap().get(Constants.ITEM_PARTNER))) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700604);
resultResponse.set反馈ID(700604);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, ItemNumDto> partnerInfoMap = playerSeries.getPartnerItemMap().get(Constants.ITEM_PARTNER).getItemInfoMap();
//伙伴名称
StringBuilder partnerNames = new StringBuilder();
for (Map.Entry<Integer, ItemNumDto> entry : partnerInfoMap.entrySet()) {
partnerNames.append(ConfigDataUtil.getPartnerItemName(uid, entry.getKey())).append(",");
}
if (partnerNames.length() > 0) {
partnerNames.deleteCharAt(partnerNames.length() - 1);
}
//当前玩家的伙伴人数上限
int partnerNumMax = playerSeries.getPartnerItemMap().get(Constants.ITEM_PARTNER).getMax();
//空位
int freeSeat = partnerNumMax - partnerInfoMap.size();
//下一次增加人数上限的配置
BackpackNum nextPartnerNum = ConfigDataUtil.getNextPartnerNum(uid);
String text = "";
//已达到最高
if (StringUtils.isEmpty(nextPartnerNum)) {
//获取对应话术
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700603);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(partnerInfoMap.size()), partnerNames.toString(),
String.valueOf(freeSeat));
resultResponse.set反馈ID(700603);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
if (freeSeat == 0) {
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700602);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(partnerInfoMap.size()), partnerNames.toString(),
String.valueOf(nextPartnerNum.getReputation()), String.valueOf(nextPartnerNum.getMax()));
resultResponse.set反馈ID(700602);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700601);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(partnerInfoMap.size()), partnerNames.toString(),
String.valueOf(freeSeat), String.valueOf(nextPartnerNum.getReputation()), String.valueOf(nextPartnerNum.getMax()));
resultResponse.set反馈ID(700601);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 7007: 查看背包
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> checkBackpack(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Player player = TimingAcquisition.playerMap.get(uid);
//系列名称
String seriesName = player.getSeries();
PlayerSeriesDto playerSeries = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid);
//还没有伙伴或物品
if (StringUtils.isEmpty(playerSeries.getPartnerItemMap().get(Constants.ITEM_PROPS))
&& StringUtils.isEmpty(playerSeries.getPartnerItemMap().get(Constants.ITEM_NOR))) {
//获取对应话术
String text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700705);
resultResponse.set反馈ID(700705);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
String text = "";
//遍历道具
if (!StringUtils.isEmpty(playerSeries.getPartnerItemMap().get(Constants.ITEM_PROPS))) {
//物品名称
StringBuilder itemNames = new StringBuilder();
//道具
Map<Integer, ItemNumDto> propsInfoMap = playerSeries.getPartnerItemMap().get(Constants.ITEM_PROPS).getItemInfoMap();
for (Map.Entry<Integer, ItemNumDto> entry : propsInfoMap.entrySet()) {
itemNames.append(ConfigDataUtil.getPartnerItemName(uid, entry.getKey())).append("、");
}
if (itemNames.length() > 0) {
itemNames.deleteCharAt(itemNames.length() - 1);
//当前玩家的背包道具数量上限
int itemNumMax = playerSeries.getPartnerItemMap().get(Constants.ITEM_PROPS).getMax();
//剩余容量
int freeSeat = itemNumMax - propsInfoMap.size();
//下一次增加背包上限的配置
BackpackNum nextBackpackNum = ConfigDataUtil.getNextItemNum(uid);
//已达到最高
if (StringUtils.isEmpty(nextBackpackNum)) {
//获取对应话术
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700703);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(propsInfoMap.size()), itemNames.toString(),
String.valueOf(freeSeat));
} else {
if (freeSeat == 0) {
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700702);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(propsInfoMap.size()), itemNames.toString(),
String.valueOf(nextBackpackNum.getReputation()), String.valueOf(nextBackpackNum.getMax()));
} else {
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700701);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(propsInfoMap.size()), itemNames.toString(),
String.valueOf(freeSeat), String.valueOf(nextBackpackNum.getReputation()), String.valueOf(nextBackpackNum.getMax()));
}
}
}
}
//遍历普通物品
if (!StringUtils.isEmpty(playerSeries.getPartnerItemMap().get(Constants.ITEM_NOR))) {
//物品名称
StringBuilder itemNames = new StringBuilder();
int count = 0;
//普通物品
Map<Integer, ItemNumDto> itemInfoMap = playerSeries.getPartnerItemMap().get(Constants.ITEM_NOR).getItemInfoMap();
for (Map.Entry<Integer, ItemNumDto> entry : itemInfoMap.entrySet()) {
itemNames.append(ConfigDataUtil.getPartnerItemName(uid, entry.getKey())).append(entry.getValue().getNum()).append("个、");
count += entry.getValue().getNum();
}
if (itemNames.length() > 0) {
itemNames.deleteCharAt(itemNames.length() - 1);
//获取对应话术
text += SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700704);
text = SpeechUtil.speechReplaceNum(text, String.valueOf(count), itemNames.toString());
}
}
if (StringUtils.isEmpty(text)) {
//获取对应话术
text = SpeechUtil.getPartnerItemSpeech(uid, Constants.SPEECH_ASIDE, 700705);
resultResponse.set反馈ID(700705);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
resultResponse.set反馈ID(700701);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 700801:同意获取
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> agreeGain(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Player player = TimingAcquisition.playerMap.get(uid);
String unique = uid + player.getGateNo(); //用户uid和关卡编号组成唯一标识
//当前玩家上一轮保存的数据
ReplyDto reply = (ReplyDto) CacheUtil.get(unique);
//走闲聊
if (StringUtils.isEmpty(reply)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
}
//掉落的物品或伙伴,<id, 数量>
Map<Integer, Integer> idNumMap = reply.getIdNumMap();
Integer demandTaskId = reply.getDemandTaskId();
Integer subjectId = reply.getSubjectId();
//找到对应任务
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, demandTaskId);
if (StringUtils.isEmpty(demandTask)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
}
//系列名称
String seriesName = player.getSeries();
//系列的玩家汇总数据
Map<Integer, PartnerItemDto> partnerItemMap = TimingAcquisition.seriesPlayerMap.get(seriesName).get(uid).getPartnerItemMap();
//系列的物品配置数据
Map<Integer, PartnerItem> partnerItemPojoMap = TimingAcquisition.seriesPartnerItemMap.get(seriesName);
//当前对话的人物
Person subject = PlayerUtil.getPerson(uid, subjectId);
String text = "";
//遍历掉落的物品或人物
for (Map.Entry<Integer, Integer> entry : idNumMap.entrySet()) {
Integer partnerItemId = entry.getKey();
//该物品的配置信息
PartnerItem partnerItemPojo = partnerItemPojoMap.get(partnerItemId);
int type = partnerItemPojo.getType();
//物品类型数量上限
int itemNumMax = TimingAcquisition.seriesBackpackNumMap.get(seriesName).get(type).get(1).getMax();
//还没有这类物品
if (StringUtils.isEmpty(partnerItemMap.get(type))) {
PartnerItemDto partnerItem = new PartnerItemDto();
Map<Integer, ItemNumDto> itemInfoMap = new HashMap<>();
partnerItem.setMax(itemNumMax);
partnerItem.setItemInfoMap(itemInfoMap);
partnerItemMap.put(type, partnerItem);
}
//根据物品类型取出对应的数据
Map<Integer, ItemNumDto> itemInfoMap = partnerItemMap.get(type).getItemInfoMap();
//该类物品的容量上限
itemNumMax = partnerItemMap.get(partnerItemPojo.getType()).getMax();
//剩余容量
int freeSeat = itemNumMax - itemInfoMap.size();
//没有空位
if (freeSeat == 0) {
//获取对应话术
continue;
}
ItemNumDto itemInfo = itemInfoMap.get(entry.getKey());
//队伍或背包中已经存在了
if (!StringUtils.isEmpty(itemInfo)) {
//普通物品可以增加数量
if (Constants.ITEM_NOR.equals(partnerItemPojo.getType())) {
itemInfo.setNum(itemInfo.getNum() + entry.getValue());
}
continue;
}
//新增物品
ItemNumDto itemInfoDto = new ItemNumDto();
itemInfoDto.setId(entry.getKey());
itemInfoDto.setNum(1);
itemInfoDto.setTimes(partnerItemPojo.getHelpTimes());
itemInfoMap.put(entry.getKey(), itemInfoDto);
text += SpeechUtil.getSuccessTaskSpeech(uid, subject, demandTask);
}
resultResponse.set反馈ID(700801);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
/**
* 700801:拒绝加入队伍
* @param operationReq
* @return
*/
public CommonResult<ResultVarsResponse> agreeGainRefuse(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
Player player = TimingAcquisition.playerMap.get(uid);
String unique = uid + player.getGateNo(); //用户uid和关卡编号组成唯一标识
//清除对应缓存
CacheGlobal.concurrentMap.remove(unique);
resultResponse.set反馈ID(600001);
resultResponse.set反馈文本("好的");
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
...@@ -54,6 +54,13 @@ public interface PlayerService { ...@@ -54,6 +54,13 @@ public interface PlayerService {
public CommonResult<ResultVarsResponse> askPrompt(OperationRequest request); public CommonResult<ResultVarsResponse> askPrompt(OperationRequest request);
/** /**
* 询问最终线索
* @param request
* @return
*/
public CommonResult<ResultVarsResponse> askFinalClue(OperationRequest request);
/**
* 执行任务 * 执行任务
* @param request * @param request
* @return * @return
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.qiwu.inference.service.remote;
import com.qiwu.inference.dto.response.CallResponse;
import java.io.IOException;
public interface RemoteService {
/**
* 获取来源
*/
String getResource();
/**
* 远程调用
* @param uid
* @return
*/
CallResponse getItems(String uid);
/**
* 更新玩家物品
* @param uid
* @return
*/
CallResponse updateItems(String uid) throws IOException;
}
package com.qiwu.inference.service.remote.impl;
import com.alibaba.fastjson.JSONObject;
import com.qiwu.inference.dto.response.CallResponse;
import com.qiwu.inference.service.remote.RemoteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Service
public class RemoteGardenImpl implements RemoteService {
Logger log = LoggerFactory.getLogger(RemoteGardenImpl.class);
@Value("${gardenSysUrl}")
private String gardenSysUrl;
@Override
public String getResource() {
return "gardenSys";
}
/**
* 获取所有物品
* @param uid
* @return
*/
@Override
public CallResponse getItems(String uid) {
RestTemplate template = new RestTemplate();
//获取用户关联ID链接
String relativeUrl = gardenSysUrl + "/player/getItems";
JSONObject object = new JSONObject();
object.put("uid", uid);
//设置请求头
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.set("Content-Type", "application/json;charset=utf-8");
HttpEntity<JSONObject> request = new HttpEntity<>(object, httpHeaders);
ResponseEntity<CallResponse> forObject = template.exchange(relativeUrl, HttpMethod.POST, request, CallResponse.class);
log.info(uid + "的物品信息:" + forObject.getBody());
if (StringUtils.isEmpty(forObject.getBody())) {
return null;
}
if (forObject.getBody().getCode() == 0) {
return null;
}
if (StringUtils.isEmpty(forObject.getBody().getData())) {
return null;
}
// JSON转换
return forObject.getBody();
}
/**
* 获取玩家的货币数量
*/
public CallResponse getMoney(String uid) {
RestTemplate template = new RestTemplate();
//获取用户关联ID链接
String relativeUrl = gardenSysUrl + "/player/getMoney";
JSONObject object = new JSONObject();
object.put("uid", uid);
//设置请求头
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.set("Content-Type", "application/json;charset=utf-8");
HttpEntity<JSONObject> request = new HttpEntity<>(object, httpHeaders);
ResponseEntity<CallResponse> forObject = new ResponseEntity<>(new CallResponse(), HttpStatus.ACCEPTED);
try {
forObject = template.exchange(relativeUrl, HttpMethod.POST, request, CallResponse.class);
} catch (Exception e) {
e.printStackTrace();
log.info("远程请求拒绝连接,远程服务可能没启动");
}
log.info(uid + "的货币数量:" + forObject.getBody());
// JSON转换
return forObject.getBody();
}
/**
* 更新玩家物品
*/
@Override
public CallResponse updateItems(String uid) {
RestTemplate template = new RestTemplate();
//获取用户关联ID链接
String relativeUrl = gardenSysUrl + "/player/updateItems";
JSONObject object = new JSONObject();
object.put("uid", uid);
//设置请求头
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.set("Content-Type", "application/json;charset=utf-8");
HttpEntity<JSONObject> request = new HttpEntity<>(object, httpHeaders);
ResponseEntity<CallResponse> forObject = new ResponseEntity<>(new CallResponse(), HttpStatus.ACCEPTED);
try {
forObject = template.exchange(relativeUrl, HttpMethod.POST, request, CallResponse.class);
} catch (Exception e) {
e.printStackTrace();
log.info("远程请求拒绝连接,远程服务可能没启动");
}
log.info(uid + "同步物品数量结果:" + forObject.getBody());
//JSON转换
return forObject.getBody();
}
}
...@@ -5,5 +5,28 @@ import com.qiwu.inference.dto.request.OperationRequest; ...@@ -5,5 +5,28 @@ import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
public interface TaskService { public interface TaskService {
/**
* 任务操作
* @param operationReq
* @return
*/
CommonResult<ResultVarsResponse> execute(OperationRequest operationReq); CommonResult<ResultVarsResponse> execute(OperationRequest operationReq);
/**
* 任务同意操作
* @param operationReq
* @return
*/
CommonResult<ResultVarsResponse> agree(OperationRequest operationReq);
/**
* 任务拒绝操作
* @param operationReq
* @return
*/
CommonResult<ResultVarsResponse> refuse(OperationRequest operationReq);
/**
* 任务中断操作
* @param operationReq
* @return
*/
CommonResult<ResultVarsResponse> interrupt(OperationRequest operationReq);
} }
package com.qiwu.inference.service.task.impl; package com.qiwu.inference.service.task.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.utils.CacheUtil; import com.qiwu.inference.common.cache.CacheGlobal;
import com.qiwu.inference.common.utils.YamlUtil; import com.qiwu.inference.common.utils.*;
import com.qiwu.inference.dto.*;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
import com.qiwu.inference.service.chat.impl.ChatServiceImpl;
import com.qiwu.inference.service.common.CommonService; import com.qiwu.inference.service.common.CommonService;
import com.qiwu.inference.service.task.TaskService; import com.qiwu.inference.service.task.TaskService;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -14,9 +21,12 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -14,9 +21,12 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.util.List;
import java.util.Map;
@Service @Service
public class TaskServiceImpl implements TaskService { public class TaskServiceImpl implements TaskService {
private Logger log = LoggerFactory.getLogger(TaskServiceImpl.class); Logger log = LoggerFactory.getLogger(TaskServiceImpl.class);
//从yml配置文件中取出对话过期时间 //从yml配置文件中取出对话过期时间
@Value("${expireTime}") @Value("${expireTime}")
...@@ -25,16 +35,298 @@ public class TaskServiceImpl implements TaskService { ...@@ -25,16 +35,298 @@ public class TaskServiceImpl implements TaskService {
@Autowired @Autowired
private CommonService commonService; private CommonService commonService;
@Autowired
private ChatServiceImpl chatService;
// @Autowired
// private RedisUtil redisUtil;
@Override @Override
public CommonResult<ResultVarsResponse> execute(OperationRequest operationReq) { public CommonResult<ResultVarsResponse> execute(OperationRequest operationReq) {
// String uid = operationReq.getUid();
// String subjectName = operationReq.getSubjectName(); //A人物名称
// //当前玩家上一轮的请求信息
// OperationRequest lastReq = (OperationRequest) CacheUtil.get(uid);
// if (!StringUtils.isEmpty(lastReq)) {
// subjectName = (subjectName == null) ? lastReq.getSubjectName() : subjectName;
// }
return commonService.operate(operationReq);
}
@Override
public CommonResult<ResultVarsResponse> agree(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid(); String uid = operationReq.getUid();
String subjectName = operationReq.getSubjectName(); //A人物名称 String taskConditionId = operationReq.getTaskConditionId(); //任务条件id
//当前玩家上一轮的请求信息 String gateNo = TimingAcquisition.playerMap.get(uid).getGateNo(); //关卡编号
OperationRequest lastReq = (OperationRequest) CacheUtil.get(uid); String unique = uid + gateNo; //用户uid和关卡编号组成唯一标识
if (!StringUtils.isEmpty(lastReq)) { Player player = TimingAcquisition.playerMap.get(uid);
subjectName = (subjectName == null) ? lastReq.getSubjectName() : subjectName; //当前对话人
PersonInfoDto talk = player.getPersonInfoMap().get(player.getPersonId());
//当前对话人物的配置信息
Person current = PlayerUtil.getPerson(uid, player.getPersonId());
//当前玩家上一轮保存的数据
ReplyDto reply = (ReplyDto) CacheUtil.get(unique);
//仅测试,可删除
// PlayerSeriesDto playerSeriesMap = JSON.parseObject(redisUtil.getStr(player.getSeries() + ":" + uid), new TypeReference<PlayerSeriesDto>(){});
// System.out.println("redis输出:" + playerSeriesMap);
//走闲聊
if (StringUtils.isEmpty(reply)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
} }
Integer subjectId = reply.getSubjectId();
Integer demandTaskId = reply.getDemandTaskId();
//找到对应任务
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, demandTaskId);
//当前对话人的数据
// PersonInfoDto talk = player.getPersonInfoMap().get(player.getPersonId());
String text = "";
if (!StringUtils.isEmpty(demandTask)) {
String[] condition1 = demandTask.getCondition1().split("\\|");
//确认意图和上轮任务是一致的
if (condition1[0].equals(taskConditionId)) {
Integer methodIdTalk = TimingAcquisition.seriesTaskConditionMap.get(player.getSeries()).get(Integer.valueOf(condition1[0])).getMethodId();
if (!StringUtils.isEmpty(demandTask.getPostTask())) {
int feedBackId = Integer.parseInt(methodIdTalk + "03");
Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap();
//2.符合阈值需求,判断是否完成副任务
if (!taskMap.containsKey(demandTask.getObject())) {
//获取对应话术
text = SpeechUtil.getTaskExceptionSpeech(uid, demandTask, "03");
text = SpeechUtil.replaceHeader(text, current.getName());
text = SpeechUtil.speechReplaceValue(uid, text, current, demandTask);
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, Integer> objectMap = taskMap.get(demandTask.getObject());
if (!objectMap.containsKey(Integer.valueOf(demandTask.getPostTask()))) {
//获取对应话术
text = SpeechUtil.getTaskExceptionSpeech(uid, demandTask, "03");
text = SpeechUtil.replaceHeader(text, current.getName());
text = SpeechUtil.speechReplaceValue(uid, text, current, demandTask);
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
// 1. 判断是否满足货币消费条件
String cost = demandTask.getCost();
if (!StringUtils.isEmpty(cost)) {
String[] costList = cost.split("\\|");
int value = Integer.parseInt(costList[0]);
int money = TimingAcquisition.seriesPlayerMap.get(player.getSeries()).get(uid).getMoney();
if (money < value) {
int feedBackId = Integer.parseInt(methodIdTalk + "04");
//获取对应话术
text = SpeechUtil.getTaskExceptionSpeech(uid, demandTask, "04");
text = SpeechUtil.replaceHeader(text, current.getName());
text = SpeechUtil.speechReplaceValue(uid, text, current, demandTask);
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//--------任务完成,更新数据-------
PlayerUtil.taskFinished(uid, subjectId, demandTaskId);
text = SpeechUtil.getSuccessTaskSpeech(uid, current, demandTask);
PlayerUtil.updateTaskStatus(uid, subjectId, demandTaskId, 6);
CacheGlobal.concurrentMap.remove(unique);
//任务链下一个任务的对应回复
CommonResult<DemandTaskDto> result = PlayerUtil.getNextTaskAnswer(uid, subjectId, demandTask.getDemandTaskId());
if (!StringUtils.isEmpty(result.getMessage())) {
text += result.getMessage();
//任务链下一任务启动
PlayerUtil.startTaskOnNext(uid, demandTask.getDemandTaskId());
DemandTaskDto nextDemandTask = result.getData();
//存在任务链下一个
if (!StringUtils.isEmpty(nextDemandTask)) {
//返回下一个任务对应的后台附加返回给bot端
String[] condition = nextDemandTask.getCondition1().split("\\|");
Integer methodId = TimingAcquisition.seriesTaskConditionMap.get(player.getSeries()).get(Integer.valueOf(condition[0])).getMethodId();
resultResponse.set后台附加返回(methodId.toString());
}
}
//任务为最终任务,或者时间值到1或以下,通关
if (demandTask.getTaskLabel() == 3 || player.getInitTime() <= 1 || text.contains(Constants.END_TEXT)) {
//数据更新与结算
PlayerUtil.clearanceUpdate(uid);
}
} else { //意图不一致,返回对应文本
//获取对应话术
text = SpeechUtil.getTaskSpeech(uid, Constants.SPEECH_PERSON, 600000);
text = SpeechUtil.replaceHeader(text, current.getName());
}
}
resultResponse.set反馈ID(600001);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
return commonService.operate(operationReq); @Override
public CommonResult<ResultVarsResponse> refuse(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
String taskConditionId = operationReq.getTaskConditionId();
String gateNo = TimingAcquisition.playerMap.get(uid).getGateNo(); //关卡编号
String unique = uid + gateNo; //用户uid和关卡编号组成唯一标识
Player player = TimingAcquisition.playerMap.get(uid);
//当前对话人物的配置信息
Person current = PlayerUtil.getPerson(uid, player.getPersonId());
//当前玩家上一轮保存的数据
ReplyDto reply = (ReplyDto) CacheUtil.get(unique);
//走闲聊
if (StringUtils.isEmpty(reply)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
}
Integer subjectId = reply.getSubjectId();
Integer demandTaskId = reply.getDemandTaskId();
//找到对应任务
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, demandTaskId);
//当前对话人的数据
PersonInfoDto talk = player.getPersonInfoMap().get(player.getPersonId());
String text = "";
if (!StringUtils.isEmpty(demandTask)) {
String[] condition1 = demandTask.getCondition1().split("\\|");
//确认意图和上轮任务是一致的
if (condition1[0].equals(taskConditionId)) {
//一次性任务标识
int disposableLabel = demandTask.getDisposableLabel();
//关闭任务
if (disposableLabel != 0) {
talk.getDemandTaskSwitchMap().put(demandTaskId, 6);
}
String addText = "";
//关闭任务后,当作完成,可触发后续剧情
if (disposableLabel == 2) {
Map<Integer, Integer> map = player.getTaskMap().get(subjectId);
int num = 0;
if (!StringUtils.isEmpty(map.get(demandTaskId))) {
num = map.get(demandTaskId);
}
//1.任务完成
map.put(demandTaskId, num + 1);
//任务链下一个任务的对应回复
CommonResult<DemandTaskDto> result = PlayerUtil.getNextTaskAnswer(uid, subjectId, demandTask.getDemandTaskId());
if (!StringUtils.isEmpty(result.getMessage())) {
addText = result.getMessage();
//任务链下一任务启动
PlayerUtil.startTaskOnNext(uid, demandTask.getDemandTaskId());
DemandTaskDto nextDemandTask = result.getData();
//存在任务链下一个
if (!StringUtils.isEmpty(nextDemandTask)) {
//返回下一个任务对应的后台附加返回给bot端
String[] condition = nextDemandTask.getCondition1().split("\\|");
Integer methodId = TimingAcquisition.seriesTaskConditionMap.get(player.getSeries()).get(Integer.valueOf(condition[0])).getMethodId();
resultResponse.set后台附加返回(methodId.toString());
}
}
}
//任务挂起或关闭文本
text = SpeechUtil.getPreSuccessTaskSpeech(uid, current, demandTask, 5);
// text = SpeechUtil.addHeader(text, current.getName());
text += addText;
Integer methodId = TimingAcquisition.seriesTaskConditionMap.get(player.getSeries()).get(Integer.valueOf(condition1[0])).getMethodId();
resultResponse.set后台附加返回(methodId.toString());
} else { //意图不一致,返回对应文本
// 获取对应话术
text = SpeechUtil.getTaskSpeech(uid, Constants.SPEECH_PERSON, 600000);
text = SpeechUtil.replaceHeader(text, current.getName());
}
}
resultResponse.set反馈ID(600002);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
@Override
public CommonResult<ResultVarsResponse> interrupt(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
String taskConditionId = operationReq.getTaskConditionId();
String gateNo = TimingAcquisition.playerMap.get(uid).getGateNo(); //关卡编号
String unique = uid + gateNo; //用户uid和关卡编号组成唯一标识
Player player = TimingAcquisition.playerMap.get(uid);
//当前对话的人物
Person current = PlayerUtil.getPerson(uid, player.getPersonId());
//当前玩家上一轮保存的数据
ReplyDto reply = (ReplyDto) CacheUtil.get(unique);
//走闲聊
if (StringUtils.isEmpty(reply)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
}
Integer subjectId = reply.getSubjectId();
Integer demandTaskId = reply.getDemandTaskId();
//找到对应任务
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, demandTaskId);
//当前对话人的数据
PersonInfoDto talk = player.getPersonInfoMap().get(player.getPersonId());
String text = "";
if (!StringUtils.isEmpty(demandTask)) {
String[] condition1 = demandTask.getCondition1().split("\\|");
//确认意图和上轮任务是一致的
if (condition1[0].equals(taskConditionId)) {
//一次性任务标识
int disposableLabel = demandTask.getDisposableLabel();
String addText = "";
//关闭任务后,当作完成,可触发后续剧情
if (disposableLabel == 2) {
//关闭任务
talk.getDemandTaskSwitchMap().put(demandTaskId, 6);
//任务当作完成
Map<Integer, Integer> map = player.getTaskMap().get(subjectId);
int num = 0;
if (!StringUtils.isEmpty(map.get(demandTaskId))) {
num = map.get(demandTaskId);
}
//1.任务完成
map.put(demandTaskId, num + 1);
//任务链下一个任务的对应回复
CommonResult<DemandTaskDto> result = PlayerUtil.getNextTaskAnswer(uid, subjectId, demandTask.getDemandTaskId());
if (!StringUtils.isEmpty(result.getMessage())) {
addText = result.getMessage();
//任务链下一任务启动
PlayerUtil.startTaskOnNext(uid, demandTask.getDemandTaskId());
DemandTaskDto nextDemandTask = result.getData();
//存在任务链下一个
if (!StringUtils.isEmpty(nextDemandTask)) {
//返回下一个任务对应的后台附加返回给bot端
String[] condition = nextDemandTask.getCondition1().split("\\|");
Integer methodId = TimingAcquisition.seriesTaskConditionMap.get(player.getSeries()).get(Integer.valueOf(condition[0])).getMethodId();
resultResponse.set后台附加返回(methodId.toString());
}
}
}
//任务挂起或关闭文本
text = SpeechUtil.getPreSuccessTaskSpeech(uid, current, demandTask, 4);
// text = SpeechUtil.addHeader(text, current.getName());
text += addText;
Integer methodId = TimingAcquisition.seriesTaskConditionMap.get(player.getSeries()).get(Integer.valueOf(condition1[0])).getMethodId();
resultResponse.set后台附加返回(methodId.toString());
} else { //意图不一致,返回对应文本
//获取对应话术
text = SpeechUtil.getTaskSpeech(uid, Constants.SPEECH_PERSON, 600000);
text = SpeechUtil.replaceHeader(text, current.getName());
}
}
resultResponse.set反馈ID(600003);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
} }
} }
server:
port: 60019
serlvet:
context-type:/inference
#设置当前服务名
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/inference_brick?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username: root
password: dgKNTmt2iLHNjEQajkDEZkq8
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
#配置间隔多久才进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis: 20000
#配置一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
#对话过期时间
expireTime: 180000
#玩家无操作时长,默认下线
offlineTime: 180000
dataFilePath: /home/jiaoyou/projects/inferenceBrick/data/
configFilePath: /home/jiaoyou/projects/inferenceBrick/config/
userFilePath: /home/jiaoyou/projects/inferenceBrick/user/
...@@ -20,16 +20,34 @@ spring: ...@@ -20,16 +20,34 @@ spring:
time-between-eviction-runs-millis: 20000 time-between-eviction-runs-millis: 20000
#配置一个连接在池中最小生存的时间 #配置一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000 min-evictable-idle-time-millis: 300000
#redis配置
redis:
host: localhost
port: 6379
# password: dgKNTmt2iLHNjEQajkDEZkq8
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 5000
#对话过期时间 #对话过期时间
expireTime: 180000 expireTime: 180000
#redis的key过期时间
redisExpireTime: 360000
#玩家无操作时长,默认下线 #玩家无操作时长,默认下线
offlineTime: 180000 offlineTime: 180000
speechFilePath: /home/inferenceGame/speech/ dataFilePath: /home/jiaoyou/projects/inferenceGame/data/
configFilePath: /home/jiaoyou/projects/inferenceGame/config/
userFilePath: /home/jiaoyou/projects/inferenceGame/user/
configFilePath: /home/inferenceGame/config/
userFilePath: /home/inferenceGame/user/ #花仙系统的请求链接
gardenSysUrl: http://127.0.0.1:8082
...@@ -27,7 +27,7 @@ expireTime: 180000 ...@@ -27,7 +27,7 @@ expireTime: 180000
#玩家无操作时长,默认下线 #玩家无操作时长,默认下线
offlineTime: 180000 offlineTime: 180000
speechFilePath: /home/jiaoyou/projects/inferenceGame/speech/ dataFilePath: /home/jiaoyou/projects/inferenceGame/data/
configFilePath: /home/jiaoyou/projects/inferenceGame/config/ configFilePath: /home/jiaoyou/projects/inferenceGame/config/
......
server:
port: 60020
serlvet:
context-type:/inference
#设置当前服务名
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/inference_reflection?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username: root
password: dgKNTmt2iLHNjEQajkDEZkq8
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
#配置间隔多久才进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis: 20000
#配置一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
#对话过期时间
expireTime: 180000
#玩家无操作时长,默认下线
offlineTime: 180000
configFilePath: /home/jiaoyou/projects/inferenceReflection/config/
userFilePath: /home/jiaoyou/projects/inferenceReflection/user/
server:
port: 60021
serlvet:
context-type:/inference
#设置当前服务名
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/inference_reflection?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username: root
password: dgKNTmt2iLHNjEQajkDEZkq8
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
#配置间隔多久才进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis: 20000
#配置一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
#对话过期时间
expireTime: 180000
#玩家无操作时长,默认下线
offlineTime: 180000
dataFilePath: /home/jiaoyou/projects/inferenceTotal/data/
configFilePath: /home/jiaoyou/projects/inferenceTotal/config/
userFilePath: /home/jiaoyou/projects/inferenceTotal/user/
...@@ -7,7 +7,7 @@ server: ...@@ -7,7 +7,7 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/inference_game?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC url: jdbc:mysql://localhost:3306/inference_reflection?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username: root username: root
password: dgKNTmt2iLHNjEQajkDEZkq8 password: dgKNTmt2iLHNjEQajkDEZkq8
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
...@@ -20,16 +20,32 @@ spring: ...@@ -20,16 +20,32 @@ spring:
time-between-eviction-runs-millis: 20000 time-between-eviction-runs-millis: 20000
#配置一个连接在池中最小生存的时间 #配置一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000 min-evictable-idle-time-millis: 300000
#redis配置
redis:
host: localhost
port: 6379
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 5000
#对话过期时间 #对话过期时间
expireTime: 180000 expireTime: 180000
#redis的key过期时间
redisExpireTime: 360000
#玩家无操作时长,默认下线 #玩家无操作时长,默认下线
offlineTime: 180000 offlineTime: 180000
speechFilePath: /home/jiaoyou/projects/inferenceGame/speech/ dataFilePath: /home/jiaoyou/projects/inferenceGame/data/
configFilePath: /home/jiaoyou/projects/inferenceGame/config/ configFilePath: /home/jiaoyou/projects/inferenceGame/config/
userFilePath: /home/jiaoyou/projects/inferenceGame/user/ userFilePath: /home/jiaoyou/projects/inferenceGame/user/
#花仙系统的请求链接
gardenSysUrl: http://127.0.0.1:60016
server:
port: 60022
serlvet:
context-type:/inference
#设置当前服务名
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/inference_reflection?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username: root
password: dgKNTmt2iLHNjEQajkDEZkq8
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
#配置间隔多久才进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis: 20000
#配置一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
#redis配置
redis:
host: localhost
port: 6379
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 5000
#对话过期时间
expireTime: 180000
#玩家无操作时长,默认下线
offlineTime: 180000
#redis的key过期时间
redisExpireTime: 360000
dataFilePath: /home/jiaoyou/projects/inferenceXiuxian/data/
configFilePath: /home/jiaoyou/projects/inferenceXiuxian/config/
userFilePath: /home/jiaoyou/projects/inferenceXiuxian/user/
#花仙系统的请求链接
gardenSysUrl: http://127.0.0.1:60016
spring: spring:
profiles: profiles:
active: pro active: dev
\ No newline at end of file \ No newline at end of file
#存放路径已改为:/home/inferenceGame/speech/ #询问话术
aside: aside:
100001: 100001:
- 【旁白@正常】您还没告诉我想看谁呢。 - 【旁白@正常】您还没告诉我想看谁呢。
...@@ -20,142 +20,144 @@ aside: ...@@ -20,142 +20,144 @@ aside:
100101: 100101:
- 【旁白@正常】【1】。 - 【旁白@正常】【1】。
100102: 100102:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100103: 100103:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
100104: 100104:
- 【旁白@正常】 - 【旁白@正常】
100105: 100105:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100106: 100106:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1002: 询问A是否是某个性格 #1002: 询问A是否是某个性格
100203: 100203:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100204: 100204:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1003: 询问A和B是什么关系 #1003: 询问A和B是什么关系
100302: 100302:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100303: 100303:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1004: 询问A和B是不是某个关系 #1004: 询问A和B是不是某个关系
100403: 100403:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100404: 100404:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1005: 询问和A有某个关系的人是谁 #1005: 询问和A有某个关系的人是谁
100502: 100502:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100503: 100503:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1006: 询问谁和谁有某个关系 #1006: 询问谁和谁有某个关系
100602: 100602:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100603: 100603:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1007: 询问A有过什么行为 #1007: 询问A有过什么行为
100702: 100702:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100703: 100703:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1008: 询问A和B有什么行为 #1008: 询问A和B有什么行为
100802: 100802:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100803: 100803:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1009: 询问A和谁有了某个行为 #1009: 询问A和谁有了某个行为
100902: 100902:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100903: 100903:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1010: 询问A有没有发生过某个行为 #1010: 询问A有没有发生过某个行为
101003: 101003:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101004: 101004:
- 【旁白@正常】 - 【旁白@正常】
#1011: 询问A和B有没有发生过某个行为 #1011: 询问A和B有没有发生过某个行为
101103: 101103:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101104: 101104:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1012: 询问A知道/看见了B和C的什么行为 #1012: 询问A知道/看见了B和C的什么行为
101202: 101202:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101203: 101203:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1013: 询问A有没有看到B和C发生了某个行为 #1013: 询问A有没有看到B和C发生了某个行为
101303: 101303:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101304: 101304:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1014: 询问A知道什么行为事件 #1014: 询问A知道什么行为事件
101402: 101402:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101403: 101403:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不??道
#1015: 询问A的提升信任度任务 #1015: 询问A的提升信任度任务
101502: 101502:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101503: 101503:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1016: 询问A的提升威慑度任务 #1016: 询问A的提升威慑度任务
101602: 101602:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101603: 101603:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1017: 询问A是否有某个提升信任度的任务 #1017: 询问A是否有某个提升信任度的任务
101702: 101702:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101703: 101703:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1018: 询问A是否有某个提升威慑度的任务 #1018: 询问A是否有某个提升威慑度的任务
101803: 101803:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101804: 101804:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1019: 询问A降低信任度的任务 #1019: 询问A降低信任度的任务
101902: 101902:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101903: 101903:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1020: 询问A降低威慑度的任务 #1020: 询问A降低威慑度的任务
102002: 102002:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102003: 102003:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1021: 询问A是否有某个降低信任度的任务 #1021: 询问A是否有某个降低信任度的任务
102103: 102103:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102104: 102104:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道。
#1022: 询问A是否有某个降低威慑度的任务 #1022: 询问A是否有某个降低威慑度的任务
102203: 102203:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102204: 102204:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1023: 询问A是什么身份 #1023: 询问A是什么身份
102301: 102301:
- 【旁白@正常】【1】。 - 【旁白@正常】【1】。
102302: 102302:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102303: 102303:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1024: 询问A是不是某个身份 #1024: 询问A是不是某个身份
102401: 102401:
- 【旁白@正常】【1】。 - 【旁白@正常】【1】。
102402: 102402:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102403: 102403:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1025: 询问A在哪个场所 #1025: 询问A在哪个场所
102502: 102502:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102503: 102503:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1026: 询问A是不是在某个场所 #1026: 询问A是不是在某个场所
102603: 102603:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102604: 102604:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
...@@ -169,11 +171,15 @@ person: ...@@ -169,11 +171,15 @@ person:
100101: 100101:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100102: 100102:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。。
10010201: 10010201:
- 【人物名称@正常】我又不认识你,为什么要告诉你关于我的事。 - 【人物名称@正常】这个我不方便回答。也许你可以四处走走看看有没别的消息。
100103: 100103:
- 【人物名称@正常】不好意思,我不知道【1】的性格。 - 【人物名称@正常】不好意思,我不知道【1】的性格。
10010301:
- 【人物名称@正常】不好意思,我不知道【1】的爱好。
100104: 100104:
- 【人物名称@正常】 - 【人物名称@正常】
100105: 100105:
...@@ -184,217 +190,282 @@ person: ...@@ -184,217 +190,282 @@ person:
100201: 100201:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
100202: 100202:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
100203: 100203:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。。
10020301: 10020301:
- 【人物名称@正常】我又不认识你,为什么要告诉你我的事? - 【人物名称@正常】这个我不方便回答。也许你可以四处走走看看有没别的消息。
100204: 100204:
- 【人物名称@正常】不好意思,我不知道【1】的性格。 - 【人物名称@正常】不好意思,我不知道【1】的性格。
#1003: 询问A和B是什么关系 #1003: 询问A和B是什么关系
100301: 100301:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100302: 100302:
- 【人物名称@正常】我又不认识你,为什么要告诉你他们的关系? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。。
10030201: 10030201:
- 【人物名称@正常】我又不认识你,为什么要告诉你我们的关系? - 【人物名称@正常】这个我不方便回答。也许你可以四处走走看看有没别的消息。?
100303: 100303:
- 【人物名称@正常】不好意思,我不知道他们的关系。 - 【人物名称@正常】不好意思,我不知道他们的关系。
10030301: 10030301:
- 【人物名称@正常】【1】吗?我好像不认识这个人啊 - 【人物名称@正常】你这样问,我也不好回答啊。
#1004: 询问A和B是不是某个关系 #1004: 询问A和B是不是某个关系
100401: 100401:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
100402: 100402:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
100403: 100403:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100404: 100404:
- 【人物名称@正常】不好意思,我不知道他们的关系。 - 【人物名称@正常】不好意思,我不知道他们的关系。
#1005: 询问和A有某个关系的人是谁 #1005: 询问和A有某个关系的人是谁
100501: 100501:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100502: 100502:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100503: 100503:
- 【人物名称@正常】不好意思,我不知道【1】【2】是谁。 - 【人物名称@正常】不好意思,我不知道【1】和谁有【2】关系。
#1006: 询问谁和谁有某个关系 #1006: 询问谁和谁有某个关系
100601: 100601:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100602: 100602:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100603: 100603:
- 【人物名称@正常】不好意思,我不知道有【1】关系的人。 - 【人物名称@正常】不好意思,我不知道有【1】关系的人。
#1007: 询问A有过什么行为 #1007: 询问A有过什么行为
100701: 100701:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100702: 100702:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100703: 100703:
- 【人物名称@正常】不好意思,我不知道【1】干过什么。 - 【人物名称@正常】不好意思,我不知道【1】干过什么。
#1008: 询问A和B有什么行为 #1008: 询问A和B有什么行为
100801: 100801:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100802: 100802:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100803: 100803:
- 【人物名称@正常】不好意思,我不知道他们干过什么。 - 【人物名称@正常】不好意思,我不知道他们干过什么。
#1009: 询问A和谁有了某个行为 #1009: 询问A和谁有了某个行为
100901: 100901:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100902: 100902:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
100903: 100903:
- 【人物名称@正常】不好意思,我不知道【1】和谁【2】了。 - 【人物名称@正常】不好意思,我不知道【1】和谁【2】了。
#1010: 询问A有没有发生过某个行为 #1010: 询问A有没有发生过某个行为
101001: 101001:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101002: 101002:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101003: 101003:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101004: 101004:
- 【人物名称@正常】不好意思,我不知道【1】有没有【2】过。 - 【人物名称@正常】不好意思,我不知道【1】有没有【2】过。
#1011: 询问A和B有没有发生过某个行为 #1011: 询问A和B有没有发生过某个行为
101101: 101101:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101102: 101102:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101103: 101103:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101104: 101104:
- 【人物名称@正常】不好意思,我不知道他们有没有【1】过。 - 【人物名称@正常】不好意思,我不知道他们有没有【1】过。
#1012: 询问A知道/看见了B和C的什么行为 #1012: 询问A知道/看见了B和C的什么行为
101201: 101201:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101202: 101202:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101203: 101203:
- 【人物名称@正常】不好意思,我不知道。 - 【人物名称@正常】不好意思,我不知道。
#1013: 询问A有没有看到B和C发生了某个行为 #1013: 询问A有没有看到B和C发生了某个行为
101301: 101301:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101302: 101302:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101303: 101303:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101304: 101304:
- 【人物名称@正常】不好意思,我不知道 - 【人物名称@正常】不好意思,我不知道
#1014: 询问A知道什么行为事件 #1014: 询问A知道什么行为事件
101401: 101401:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101402: 101402:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101403: 101403:
- 【人物名称@正常】不好意思,我不知道【1】。 - 【人物名称@正常】不好意思,我不知道【1】。
#1015: 询问A的提升信任度任务 #1015: 询问A的提升信任度任务
101501: 101501:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101502: 101502:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101503: 101503:
- 【人物名称@正常】你想知道的我都已经告诉过你了。 - 【人物名称@正常】你想知道的我都已经告诉过你了。
101504: 101504:
- 【人物名称@正常】不好意思,我不知道【1】想干什么。 - 【人物名称@正常】不好意思,我不知道【1】想干什么。
101505:
- 【人物名称@正常】你可以等下再来找我吗?
【搭档名称@正常】我们先出去逛逛再回来吧。
- 【人物名称@正常】我有点累了,你晚点再来好吗?
【搭档名称@正常】我们先出去逛逛再回来吧。
- 【人物名称@正常】我有点累了。晚点再来好吗?
【搭档名称@正常】过会儿再来找【1】吧。
- 【人物名称@正常】我现在有急事,你可以晚点再来吗?
【搭档名称@正常】我建议你过会儿再来找【1】吧。
101506:
- 【人物名称@正常】没有,我没什么可说的了。
101507:
- 【搭档名称@正常】有空可以去找【1】看看吧。
#1016: 询问A的提升威慑度任务 #1016: 询问A的提升威慑度任务
101601: 101601:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101602: 101602:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101603: 101603:
- 【人物名称@正常】不好意思,我不知道【1】怕什么。 - 【人物名称@正常】不好意思,我不知道【1】怕什么。
101604:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
101605:
- 【人物名称@正常】你问这个是什么用意?小心我报官啊。
101606:
- 【人物名称@正常】你可以等下再来找我吗?
【搭档名称@正常】我们先出去逛逛再回来吧。
- 【人物名称@正常】我有点累了,你晚点再来好吗?
【搭档名称@正常】我们先出去逛逛再回来吧。
- 【人物名称@正常】我有点累了。晚点再来好吗?
【搭档名称@正常】过会儿再来找【1】吧。
- 【人物名称@正常】我现在有急事,你可以晚点再来吗?
【搭档名称@正常】我建议你过会儿再来找【1】吧。
101607:
- 【搭档名称@正常】有空可以去找【1】看看吧。
#1017: 询问A是否有某个提升信任度的任务 #1017: 询问A是否有某个提升信任度的任务
101701: 101701:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101702: 101702:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101703: 101703:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101704: 101704:
- 【人物名称@正常】不好意思,我不知道可不可以。 - 【人物名称@正常】不好意思,我不知道可不可以。
101705:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
#1018: 询问A是否有某个提升威慑度的任务 #1018: 询问A是否有某个提升威慑度的任务
101801: 101801:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101802: 101802:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101803: 101803:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101804: 101804:
- 【人物名称@正常】不好意思,我不知道这样【1】会不会怕你。 - 【人物名称@正常】不好意思,我不知道这样【1】会不会怕你。
101805:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
101806:
- 【人物名称@正常】你别没事找事,我可不怕你。
#1019: 询问A降低信任度的任务 #1019: 询问A降低信任度的任务
101901: 101901:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101902: 101902:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
101903: 101903:
- 【人物名称@正常】不好意思,我不知道这样【1】会不会不喜欢你。 - 【人物名称@正常】不好意思,我不知道这样【1】会不会不喜欢你。
101904:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
101905:
- 【人物名称@正常】别这样问我,我们关系还不错吧,又不讨厌你。
#1020: 询问A降低威慑度的任务 #1020: 询问A降低威慑度的任务
102001: 102001:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
102002: 102002:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102003: 102003:
- 【人物名称@正常】不好意思,我不知道【1】会不会对你改观。 - 【人物名称@正常】不好意思,我不知道【1】会不会对你改观。
102004:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
102005:
- 【人物名称@正常】没用的,我们关系暂时就这样了。
#1021: 询问A是否有某个降低信任度的任务 #1021: 询问A是否有某个降低信任度的任务
102101: 102101:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
102102: 102102:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
102103: 102103:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102104: 102104:
- 【人物名称@正常】不好意思,我不知道这样【1】会不会不喜欢你。 - 【人物名称@正常】不好意思,我不知道这样【1】会不会不喜欢你。
102105:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
102106:
- 【人物名称@正常】没有,你人挺好的。
#1022: 询问A是否有某个降低威慑度的任务 #1022: 询问A是否有某个降低威慑度的任务
102201: 102201:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
102202: 102202:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
102203: 102203:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102204: 102204:
- 【人物名称@正常】不好意思,我不知道能不能让【1】不讨厌你。 - 【人物名称@正常】不好意思,我不知道能不能让【1】不讨厌你。
102205:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
102206:
- 【人物名称@正常】我现在暂时还不想理你,别问了。
#1023: 询问A是什么身份 #1023: 询问A是什么身份
102301: 102301:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
102302: 102302:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102303: 102303:
- 【人物名称@正常】不好意思,我不知道【1】的身份。 - 【人物名称@正常】不好意思,我不知道【1】的身份。
#1024: 询问A是不是某个身份 #1024: 询问A是不是某个身份
102401: 102401:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
102402: 102402:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
102403: 102403:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102404: 102404:
- 【人物名称@正常】不好意思,我不知道是不是【1】。 - 【人物名称@正常】不好意思,我不知道是不是【1】。
#1025: 询问A在哪个场所 #1025: 询问A在哪个场所
102501: 102501:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
102502: 102502:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102503: 102503:
- 【人物名称@正常】不好意思,我不知道【1】在哪。 - 【人物名称@正常】不好意思,我不知道【1】在哪。
102504:
- 【人物名称@正常】我不就在【1】吗。
#1026: 询问A是不是在某个场所 #1026: 询问A是不是在某个场所
102601: 102601:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
102602: 102602:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
102603: 102603:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
102604: 102604:
- 【人物名称@正常】不好意思,我不知道【1】在哪。 - 【人物名称@正常】不好意思,我不知道【1】在哪。
#1027: 询问提示 #1027: 询问提示
102701: 102701:
- 【人物名称@正常】你可以去问问【1】,他可能知道点什么。 - 【人物名称@正常】你可以去问问【1】,他可能知道点什么。
102702: 102702:
- 【人物名称@正常】抱歉,爱莫能助。 - 【人物名称@正常】抱歉,爱莫能助。我们去其他地方看看吧?
#1029: 询问玩家所在场所 #1029: 询问玩家所在场所
102901: 102901:
- 【人物名称@正常】主人,我们在【1】呀。 - 【人物名称@正常】我们在【1】呀。
#1030: 搭档说话 #1030: 询问最终线索
103001:
- 【寒烟@正常】这个县城里有各色各样的人物,您可以试着从打招呼、送小费开始,到帮助对方解决麻烦,来拉进和对方的关系,或者使用暴力,让对方畏惧于你,以逐步挖掘更深的线索,并最终找出目标。如果一开始没有头绪,少主也可以四处走走,多跟人聊聊天,搜集一下信息。您想去哪里或者找谁,直接说就好。如果发现了任何蛛丝马迹,我会及时提醒少主的。另外,关于人物、地点和关系,如果少主不记得了,也可以随时向我提问。
103002: 103002:
- 【寒烟@正常】我们现在在【1】,看到【2】了,我们过去打个招呼吧。 - 【人物名称@正常】关系不足。也许你可以到处走走,看看有没有新的事件发生。
103003:
- 【人物名称@正常】不好意思,我不知道这件事。
#1031: 搭档说话
103101:
- 【人物名称@正常】这个县城有各色各样的人物,您可以试着从打招呼、送钱开始,到帮助对方解决麻烦,拉进彼此关系,或者使用暴力,让对方畏惧于你,以逐步挖掘更深的线索,并最终找出目标。如果一开始没有头绪,少爷也可以四处走走,多跟人聊聊天,搜集一下信息,如果发现了任何蛛丝马迹,我会及时提醒少主的。如果不知道去哪里,可以说“我可以去哪里”。另外,关于这里的人物和关系,如果少爷不记得了,也可以随时向我提问。
103102:
- 【主持人@正常】你回来了,让我们继续录制这段浪漫的恋爱之旅吧。你可以说“查看场所”看看有哪些地方可以去探索。
#1032: 搭档说话
103201:
- 我们走吧,这人暂时问不出更重要的消息了,去先找别人问问吧。
- 我们去问问其他人吧,也许会有别的线索呢!
- 感觉从这个人身上得不到什么有用的信息,我们换个人问问吧。
- 我们去找其他人问问吧,感觉这个人身上没有什么有用的线索。
\ No newline at end of file
...@@ -10,9 +10,11 @@ aside: ...@@ -10,9 +10,11 @@ aside:
400103: 400103:
- 【旁白@正常】不知道您说的这个地方在哪呢。 - 【旁白@正常】不知道您说的这个地方在哪呢。
400104: 400104:
- 【旁白@正常】这个地方没有你要找的人。 - 【旁白@正常】没有这个地方,换其他地方试试吧,您可以说:我可以去哪里。
400105: 400105:
- 【旁白@正常】你想要去哪里呢?目前已知场所有:【1】。 - 【旁白@正常】你想要去哪里呢?目前已知场所有:【1】。
400106:
- 【旁白@正常】序号过大了,目前最多只有【1】哦。
#4002: 开启对话 #4002: 开启对话
400201: 400201:
- 【旁白@正常】【1】当前线索有:【2】,您要详细查看哪一类的线索呢? - 【旁白@正常】【1】当前线索有:【2】,您要详细查看哪一类的线索呢?
...@@ -36,6 +38,13 @@ aside: ...@@ -36,6 +38,13 @@ aside:
- 【旁白@正常】好的,您已放弃挑战本关卡,请重新挑选一个关卡等级进行挑战。 - 【旁白@正常】好的,您已放弃挑战本关卡,请重新挑选一个关卡等级进行挑战。
400403: 400403:
- 【旁白@正常】好的,您将继续挑战本关卡。 - 【旁白@正常】好的,您将继续挑战本关卡。
#4005: 退出关卡
400501:
- 【旁白@正常】你想要退出土之秘境吗?这样你将错过很多精彩剧情,并无法其他更多获得奖励,请问你确定吗?
400502:
- 【旁白@正常】好的,您已放弃挑战土之秘境,现在已回到花园,下次若准备妥当可重新挑战。
400503:
- 【旁白@正常】好的,您将继续挑战次秘境。
......
...@@ -31,7 +31,7 @@ aside: ...@@ -31,7 +31,7 @@ aside:
300501: 300501:
- 【旁白@正常】您当前已知线索【1】条,请问想要查看关于人物的线索还是不同类型的线索呢? - 【旁白@正常】您当前已知线索【1】条,请问想要查看关于人物的线索还是不同类型的线索呢?
30050101: 30050101:
- 【旁白@正常】您当前还没有获得任何线索,我能给您提供点建议。 - 您当前还没有获得任何线索,我能给您提供点建议。
300502: 300502:
- 【旁白@正常】当前已知人物【1】名:【2】,想要知道哪个人物的相关线索呢?说出他的名称即可。 - 【旁白@正常】当前已知人物【1】名:【2】,想要知道哪个人物的相关线索呢?说出他的名称即可。
30050201: 30050201:
...@@ -39,7 +39,7 @@ aside: ...@@ -39,7 +39,7 @@ aside:
300503: 300503:
- 【旁白@正常】当前已知【1】,想要知晓哪个类型线索呢? - 【旁白@正常】当前已知【1】,想要知晓哪个类型线索呢?
30050301: 30050301:
- 【旁白@正常】您当前还没有收集到线索,我能给您提供点建议。 - 您当前还没有收集到线索,我能给您提供点建议。
300504: 300504:
- 【旁白@正常】【1】已知线索【2】条,其中【3】,想要了解【1】的哪种线索呢? - 【旁白@正常】【1】已知线索【2】条,其中【3】,想要了解【1】的哪种线索呢?
30050401: 30050401:
...@@ -62,17 +62,25 @@ aside: ...@@ -62,17 +62,25 @@ aside:
- 【旁白@正常】您想看什么类型的线索呢? - 【旁白@正常】您想看什么类型的线索呢?
30050605: 30050605:
- 【旁白@正常】没有这种类型的线索哦。 - 【旁白@正常】没有这种类型的线索哦。
30050606:
- 【旁白@正常】【1】的【2】线索共【3】条,第【4】条:【5】
30050607:
- 【旁白@正常】【1】的【2】线索共【3】条,第【4】条:【5】要重新查看吗?
#3006: 询问谁和谁有某个关系 #3006: 询问谁和谁有某个关系
300601: 300601:
- 【旁白@正常】您当前排名积分为:【1】。 - 【旁白@正常】您当前排名积分为:【1】。
#3007: 询问某人的模糊处理操作
3007:
- 【搭档名称@正常】那我们下次再说吧。
- 【搭档名称@正常】嗯嗯,我们下次再说这件事。
#3101: 询问某人的模糊处理操作 #3101: 询问某人的模糊处理操作
310101: 310101:
- 【寒烟@正常】您还没告诉要看谁的呢。 - 【人物名称@正常】您还没告诉要看谁的呢。
310102: 310102:
- 【寒烟@正常】没有您说的这个人哦。 - 【人物名称@正常】没有您说的这个人哦。
310103: 310103:
- 【寒烟@正常】【1】,年龄【2】,性别【3】,身份【4】,其他信息不详。 - 【人物名称@正常】【1】,年龄【2】,性别【3】,身份【4】,其他信息不详。
310104: 310104:
- 【寒烟@正常】【1】,年龄【2】,性别【3】,身份【4】,【5】对你的信任度为:【6】、威慑度为:【7】。 - 【人物名称@正常】【1】,年龄【2】,性别【3】,身份【4】,【5】对你的信任度为:【6】、威慑度为:【7】。
#伙伴系统话术
aside:
#使用伙伴能力
700102:
- 【旁白@正常】【1】的能力需求条件不满足,无法对他使用能力。
700103:
- 【旁白@正常】您要使用谁的能力呢?告诉我一个伙伴名称。
700104:
- 【旁白@正常】您要对谁使用能力呢?告诉我一个目标名称。
700105:
- 【旁白@正常】【1】已经对他使用过能力了。
700106:
- 【旁白@正常】你还没有该伙伴。
700107:
- 【旁白@正常】【1】现在帮不了你忙了。
#使用物品能力
700202:
- 【旁白@正常】【1】的能力需求条件不满足,无法对他使用能力。
700203:
- 【旁白@正常】您要使用哪个物品的能力呢?
700204:
- 【旁白@正常】您要对谁使用能力呢?告诉我一个目标名称。
700205:
- 【旁白@正常】【1】已经对他使用过能力了。
700206:
- 【旁白@正常】你还没有【1】。
700207:
- 【旁白@正常】你已经用完了【1】哦。
#遣散伙伴
700301:
- 【旁白@正常】【1】即将离开队伍,离队后无法使用他的能力,确定让他离队吗?
700302:
- 【旁白@正常】队伍中没有这个人。
700303:
- 【旁白@正常】【1】已离开队伍。
700304:
- 【旁白@正常】好的。
700305:
- 【旁白@正常】你想遣散谁呢?
#丢弃物品
700401:
- 【旁白@正常】即将丢弃【1】,丢弃后无法再次使用能力,确定丢弃吗?
700402:
- 【旁白@正常】背包中没有这个物品。
700403:
- 【旁白@正常】已丢弃【1】。
700404:
- 【旁白@正常】好的。
700405:
- 【旁白@正常】你想丢掉哪个呢?
#查看伙伴/物品
700501:
- 【旁白@正常】【1】,【2】,还可以使用【3】次能力。
700502:
- 【旁白@正常】找不到你说的这个。
700503:
- 【旁白@正常】【1】,【2】。
700504:
- 【旁白@正常】这个人还没有成为你的伙伴哦。
700505:
- 【旁白@正常】你还没有这个物品哦。
700506:
- 【旁白@正常】你要看什么呢?
#查看队伍
700601:
- 【旁白@正常】队伍中有【1】名伙伴:【2】。队伍中还有【3】个空位,声望达到【4】可增加位置上限【5】。
700602:
- 【旁白@正常】队伍中有【1】名伙伴:【2】。队伍中已经满了,声望达到【3】可增加位置上限【4】。
700603:
- 【旁白@正常】队伍中有【1】名伙伴:【2】。队伍中还有【3】个空位。
700604:
- 【旁白@正常】队伍中还没有伙伴。
#查看背包
700701:
- 【旁白@正常】背包中有【1】件道具:【2】。背包中还有【3】个空位,声望达到【4】可增加位置上限【5】。
700702:
- 【旁白@正常】背包中有【1】件道具:【2】。背包中满了,声望达到【4】可增加位置上限【5】。
700703:
- 【旁白@正常】背包中有【1】件道具:【2】。
700704:
- 【旁白@正常】背包中有【1】件杂物:【2】。
700705:
- 【旁白@正常】背包中还没有物品。
#加入背包
700802:
- 【旁白@正常】已经放不下了。
\ No newline at end of file
#存放路径已改为:/home/inferenceGame/speech/ #存放路径已改为:/home/inferenceGame/speech/
aside: aside:
#2001: 饮酒 #2001: 饮酒
200101: 200101:
...@@ -99,35 +99,35 @@ aside: ...@@ -99,35 +99,35 @@ aside:
#2019: 探听身家 #2019: 探听身家
201901: 201901:
- 【旁白@正常】【1】得意地对你伸出五个手指。 - 【旁白@正常】【1】得意地对你伸出五个手指。
#2020:解救被绑女孩 #2020:解救被绑女孩
202001: 202001:
- 【旁白@正常】 - 【旁白@正常】
202002: 202002:
- 【旁白@正常】 - 【旁白@正常】
202003: 202003:
- 【旁白@正常】 - 【旁白@正常】
#2021:审问罪犯供出老巢 #2021:审问罪犯供出老巢
202101: 202101:
- 【旁白@正常】 - 【旁白@正常】
202102: 202102:
- 【旁白@正常】 - 【旁白@正常】
202103: 202103:
- 【旁白@正常】 - 【旁白@正常】
#2022:交出藏宝图 #2022:交出藏宝图
202201: 202201:
- 【旁白@正常】 - 【旁白@正常】
202202: 202202:
- 【旁白@正常】 - 【旁白@正常】
202203: 202203:
- 【旁白@正常】 - 【旁白@正常】
#2023:抓捕人犯 #2023:抓捕人犯
202301: 202301:
- 【旁白@正常】 - 【旁白@正常】
202302: 202302:
- 【旁白@正常】 - 【旁白@正常】
202303: 202303:
- 【旁白@正常】 - 【旁白@正常】
#2024:抓捕人犯 #2024:抓捕人犯
202401: 202401:
- 【旁白@正常】 - 【旁白@正常】
202402: 202402:
...@@ -136,7 +136,7 @@ aside: ...@@ -136,7 +136,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
202404: 202404:
- 【旁白@正常】 - 【旁白@正常】
#2025:购买物品完成 #2025:购买物品完成
202501: 202501:
- 【旁白@正常】 - 【旁白@正常】
202502: 202502:
...@@ -147,7 +147,7 @@ aside: ...@@ -147,7 +147,7 @@ aside:
- 【旁白@正常】【1】冷淡地看了你一眼。 - 【旁白@正常】【1】冷淡地看了你一眼。
202505: 202505:
- 【旁白@正常】你将【1】转交给【2】,虽然这是假的,但【3】依然对你表示了感激。 - 【旁白@正常】你将【1】转交给【2】,虽然这是假的,但【3】依然对你表示了感激。
#2026:大夫出诊完成 #2026:大夫出诊完成
202601: 202601:
- 【旁白@正常】 - 【旁白@正常】
202602: 202602:
...@@ -156,7 +156,7 @@ aside: ...@@ -156,7 +156,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
202604: 202604:
- 【旁白@正常】【1】冷淡地看了你一眼。 - 【旁白@正常】【1】冷淡地看了你一眼。
#2027:寻回物品完成 #2027:寻回物品完成
202701: 202701:
- 【旁白@正常】 - 【旁白@正常】
202702: 202702:
...@@ -165,7 +165,7 @@ aside: ...@@ -165,7 +165,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
202704: 202704:
- 【旁白@正常】【1】冷淡地看了你一眼。 - 【旁白@正常】【1】冷淡地看了你一眼。
#2028:打探肥羊完成 #2028:打探肥羊完成
202801: 202801:
- 【旁白@正常】 - 【旁白@正常】
202802: 202802:
...@@ -174,7 +174,7 @@ aside: ...@@ -174,7 +174,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
202804: 202804:
- 【旁白@正常】【1】冷淡地看了你一眼。 - 【旁白@正常】【1】冷淡地看了你一眼。
#2029:催账完成 #2029:催账完成
202901: 202901:
- 【旁白@正常】 - 【旁白@正常】
202902: 202902:
...@@ -183,14 +183,14 @@ aside: ...@@ -183,14 +183,14 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
202904: 202904:
- 【旁白@正常】 - 【旁白@正常】
#2030:催账 #2030:催账
203001: 203001:
- 【旁白@正常】 - 【旁白@正常】
203002: 203002:
- 【旁白@正常】 - 【旁白@正常】
203003: 203003:
- 【旁白@正常】 - 【旁白@正常】
#2031:砸场子完成 #2031:砸场子完成
203101: 203101:
- 【旁白@正常】 - 【旁白@正常】
203102: 203102:
...@@ -199,14 +199,14 @@ aside: ...@@ -199,14 +199,14 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
203104: 203104:
- 【旁白@正常】 - 【旁白@正常】
#2032:砸场子 #2032:砸场子
203201: 203201:
- 【旁白@正常】 - 【旁白@正常】
203202: 203202:
- 【旁白@正常】 - 【旁白@正常】
203203: 203203:
- 【旁白@正常】【1】挥拳朝你扑过来,你被打得鼻青脸肿。 - 【旁白@正常】【1】挥拳朝你扑过来,你被打得鼻青脸肿。
#2033:探听隐私完成 #2033:探听隐私完成
203301: 203301:
- 【旁白@正常】 - 【旁白@正常】
203302: 203302:
...@@ -215,14 +215,14 @@ aside: ...@@ -215,14 +215,14 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
203304: 203304:
- 【旁白@正常】 - 【旁白@正常】
#2034:探听隐私 #2034:探听隐私
203401: 203401:
- 【旁白@正常】【1】 - 【旁白@正常】【1】
203402: 203402:
- 【旁白@正常】你已经知道他的隐私了。 - 【旁白@正常】你已经知道他的隐私了。
203403: 203403:
- 【旁白@正常】【1】挥拳朝你扑过来,你被打得鼻青脸肿。 - 【旁白@正常】【1】挥拳朝你扑过来,你被打得鼻青脸肿。
#2035:试药 #2035:试药
203501: 203501:
- 【旁白@正常】 - 【旁白@正常】
203502: 203502:
...@@ -231,7 +231,7 @@ aside: ...@@ -231,7 +231,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
203504: 203504:
- 【旁白@正常】【1】不屑地冲你摆摆手。 - 【旁白@正常】【1】不屑地冲你摆摆手。
#2036:证据账本完成 #2036:证据账本完成
203601: 203601:
- 【旁白@正常】 - 【旁白@正常】
203602: 203602:
...@@ -242,7 +242,7 @@ aside: ...@@ -242,7 +242,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
203605: 203605:
- 【旁白@正常】 - 【旁白@正常】
#2037:证据账本 #2037:证据账本
203701: 203701:
- 【旁白@正常】 - 【旁白@正常】
203702: 203702:
...@@ -251,7 +251,7 @@ aside: ...@@ -251,7 +251,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
203704: 203704:
- 【旁白@正常】【1】挥拳朝你扑过来,你被打得鼻青脸肿。 - 【旁白@正常】【1】挥拳朝你扑过来,你被打得鼻青脸肿。
#2038:证据账本类型2完成 #2038:证据账本类型2完成
203801: 203801:
- 【旁白@正常】 - 【旁白@正常】
203802: 203802:
...@@ -260,7 +260,7 @@ aside: ...@@ -260,7 +260,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
203804: 203804:
- 【旁白@正常】 - 【旁白@正常】
#2039:栽赃陷害完成 #2039:栽赃陷害完成
203901: 203901:
- 【旁白@正常】 - 【旁白@正常】
203902: 203902:
...@@ -269,7 +269,7 @@ aside: ...@@ -269,7 +269,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
203904: 203904:
- 【旁白@正常】 - 【旁白@正常】
#2040:栽赃陷害类型2完成 #2040:栽赃陷害类型2完成
204001: 204001:
- 【旁白@正常】 - 【旁白@正常】
204002: 204002:
...@@ -278,7 +278,7 @@ aside: ...@@ -278,7 +278,7 @@ aside:
- 【旁白@正常】 - 【旁白@正常】
204004: 204004:
- 【旁白@正常】 - 【旁白@正常】
#2041:栽赃陷害类型2完成 #2041:栽赃陷害类型2完成
204101: 204101:
- 【旁白@正常】 - 【旁白@正常】
204102: 204102:
...@@ -301,8 +301,10 @@ person: ...@@ -301,8 +301,10 @@ person:
- 【人物名称@正常】好酒!嗝儿! - 【人物名称@正常】好酒!嗝儿!
200103: 200103:
- 【人物名称@正常】酒逢知己千杯少,话不投机半句多…… - 【人物名称@正常】酒逢知己千杯少,话不投机半句多……
200104:
- 【人物名称@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
200105: 200105:
- 【人物名称@正常】这酒还是算了吧。 - 【人物名称@正常】凭你我的关系,喝酒还是算了吧。
200106: 200106:
- 【人物名称@正常】谢谢,我不喝酒。 - 【人物名称@正常】谢谢,我不喝酒。
#2002: 打招呼 #2002: 打招呼
...@@ -311,31 +313,31 @@ person: ...@@ -311,31 +313,31 @@ person:
200202: 200202:
- 【人物名称@正常】又是你啊,有事吗? - 【人物名称@正常】又是你啊,有事吗?
200203: 200203:
- 【人物名称@正常】找我何事? - 【旁白@正常】【A】淡淡地扫了你一眼,仿佛没听见。【人物名称@正常】找我何事?
200204: 200205:
- 【人物名称@正常】不好意思,我很忙。 - 【人物名称@正常】不好意思,我很忙。
#2003: 买古董 #2003: 卖古董
200301: 200301:
- 【人物名称@正常】既然出得起价钱,此物便交予你了。 - 【人物名称@正常】既然出得起价钱,此物便交予你了。
200302: 200302:
- 【人物名称@正常】罢了。惹不起你。此物便卖给你吧。 - 【人物名称@正常】罢了。惹不起你。此物便卖给你吧。
200303: 200303:
- 【人物名称@正常】【1】文,不能再少了。你身上的钱可不够。
200304:
- 【人物名称@正常】我们好像不熟吧?抱歉这是我心爱之物,不能随意割爱。 - 【人物名称@正常】我们好像不熟吧?抱歉这是我心爱之物,不能随意割爱。
200304:
- 【人物名称@正常】【条件2】文,不能再少了。你身上的钱可不够。
200305: 200305:
- 【人物名称@正常】抱歉,我这不买这东西。 - 【人物名称@正常】没有没有,快走快走。
#2004: 买药 #2004: 买药
200401: 200401:
- 【人物名称@正常】自无不可。 - 【人物名称@正常】自无不可。
200402: 200402:
- 【人物名称@正常】你已经买过金疮药了。此物多买无益。 - 【人物名称@正常】你已经买过金疮药了。此物多买无益。
200403: 200403:
- 【人物名称@正常】你身上连【1】文都没有,可不足以买我的药。
200404:
- 【人物名称@正常】我的药不卖给险恶之人。快走快走。 - 【人物名称@正常】我的药不卖给险恶之人。快走快走。
200404:
- 【人物名称@正常】你身上连【条件2】文都没有,可不足以买我的药。
200405: 200405:
- 【人物名称@正常】抱歉,我没有药可卖。 - 【人物名称@正常】没有没有,快走快走。
#2005: 获赠金疮药 #2005: 获赠金疮药
200501: 200501:
- 【人物名称@正常】以你我的交情,还谈什么钱。这份金疮药我送你了。 - 【人物名称@正常】以你我的交情,还谈什么钱。这份金疮药我送你了。
...@@ -343,54 +345,56 @@ person: ...@@ -343,54 +345,56 @@ person:
- 【人物名称@正常】你已经买过金疮药了。此物多买无益。 - 【人物名称@正常】你已经买过金疮药了。此物多买无益。
200503: 200503:
- 【人物名称@正常】我这金疮药得来不易,以你我的交情,还不足以让我割爱。 - 【人物名称@正常】我这金疮药得来不易,以你我的交情,还不足以让我割爱。
200504: 200505:
- 【人物名称@正常】我没有金疮药,卖不了。 - 【人物名称@正常】没有没有,快走快走。
#2006: 揍人 #2006: 揍人
200601: 200601:
- 【人物名称@正常】我和你无冤无仇……哎哟!哎哟! - 【人物名称@正常】我和你无冤无仇……哎哟!哎哟!
200602: 200602:
- 【人物名称@正常】刚刚才被你欺负了一场,怎么又来!哎哟! - 【人物名称@正常】刚刚才被你欺负了一场,怎么又来!哎哟!【旁白@正常】你狠狠揍了【A】一顿。
200603: 200603:
- 【人物名称@正常】呸,凭你的细胳膊细腿也配和我动手?找死。 - 【人物名称@正常】呸,凭你的细胳膊细腿也配和我动手?找死。【旁白@正常】你被【A】狠狠收拾了一顿,被揍得鼻青脸肿。
200604: 200605:
- 【人物名称@正常】别动手啊,告诉你,打我也没用。 - 【人物名称@正常】我和你往日无冤,近日无仇,随便动我小心吃官司。
#2007: 请吃饭 #2007: 请吃饭
200701: 200701:
- 【人物名称@正常】盛情难却,这次让你破费了。感谢,感谢。 - 【人物名称@正常】盛情难却,这次让你破费了。感谢,感谢。
200702: 200702:
- 【人物名称@正常】这不是刚吃过没多久吗?您也太客气了。 - 【旁白@正常】你邀请【A】到酒楼,满满点了一桌子。【人物名称@正常】这不是刚吃过没多久吗?您也太客气了。
200703: 200703:
- 【人物名称@正常】怎么,你这是耍我呢?
200704:
- 【人物名称@正常】你的饭菜,我可吃不起。 - 【人物名称@正常】你的饭菜,我可吃不起。
200704:
- 【旁白@正常】最便宜的一桌饭菜也需要【条件2】文,你的钱不够了。【人物名称@正常】怎么,你这是耍我呢?
200705: 200705:
- 【人物名称@正常】我不饿,你也别请了,请客对我没用。 - 【人物名称@正常】我不饿,你也别请了,请客对我没用。
#2008: 好处费 #2008: 好处费
200801: 200801:
- 【人物名称@正常】哎哟,这,这多不好意思的。 - 【人物名称@正常】哎哟,这,这多不好意思的。
200802: 200802:
- 【人物名称@正常】哎哟,这,这多不好意思的。 - 【旁白@正常】你偷偷摸出【条件2】文递给【A】。【人物名称@正常】哎哟,这,这多不好意思的。【旁白@正常】【A】不着痕迹地把银子塞进袖子里。因为打赏次数太多,信任度已经无法提升。
200803:
- 【旁白@正常】你偷偷摸出【条件2】文递给【A】。【人物名称@正常】哎哟,您的钱我可不敢收,怕烫手。
200804: 200804:
- 【人物名称@正常】哎哟,您的钱我可不敢收,怕烫手。 - 【旁白@正常】打赏一次要【条件2】文,你的钱不够了。
200805: 200805:
- 【人物名称@正常】我不收礼,没用的,放弃吧。 - 【人物名称@正常】我不收礼,没用的,放弃吧。
#2009: 帮挑水 #2009: 帮挑水
200901: 200901:
- 【人物名称@正常】这可太感谢你了。 - 【人物名称@正常】这可太感谢你了。
200902: 200902:
- 【人物名称@正常】这可太感谢你了。 - 【人物名称@正常】这可太感谢你了。【旁白@正常】你吭哧吭哧为【A】把水缸挑满。但是挑水这种小事已经无法再提高【第三人称】的信任度。
200903: 200903:
- 【人物名称@正常】非亲非故的,不敢劳驾你。 - 【人物名称@正常】非亲非故的,不敢劳驾你。
200904: 200905:
- 【人物名称@正常】家里不缺水,不用你给挑。 - 【人物名称@正常】家里不缺水,不用你给挑。
#2010: 一起钓鱼 #2010: 一起钓鱼
201001: 201001:
- 【人物名称@正常】正合我意。走! - 【人物名称@正常】正合我意。走!
201002: 201002:
- 【人物名称@正常】想不到你兴致这么浓。那我陪你去吧。 - 【人物名称@正常】想不到你兴致这么浓。那我陪你去吧。【旁白@正常】你陪着【A】又去钓了一场鱼。信任度没有提高。但是你顺手把钓到的小鱼卖了,获利【奖励】文。
201003: 201003:
- 【人物名称@正常】钓鱼须得三五好友,情投意合才有乐趣。我跟你个陌生人去钓什么鱼! - 【人物名称@正常】钓鱼须得三五好友,情投意合才有乐趣。我跟你个陌生人去钓什么鱼!
201004: 201005:
- 【人物名称@正常】我不钓鱼,你找别人吧。 - 【人物名称@正常】我不钓鱼,你找别人吧。
#2011: 送货 #2011: 送货
201101: 201101:
...@@ -399,26 +403,28 @@ person: ...@@ -399,26 +403,28 @@ person:
- 【人物名称@正常】你不是已经给过我了吗? - 【人物名称@正常】你不是已经给过我了吗?
201103: 201103:
- 【人物名称@正常】我看你面目可憎,这货我是不敢收的。回去换个人给我送吧。 - 【人物名称@正常】我看你面目可憎,这货我是不敢收的。回去换个人给我送吧。
201104: 201105:
- 【人物名称@正常】我没有东西要收,你找错人了吧。 - 【人物名称@正常】我没有东西要收,你找错人了吧。
#2012: 给钱 #2012: 给钱
201201: 201201:
- 【人物名称@正常】太客气了太客气了。 - 【人物名称@正常】太客气了太客气了。
201202: 201202:
- 【人物名称@正常】太客气了太客气了。 - 【人物名称@正常】太客气了太客气了。【旁白@正常】你多次给【A】送钱,【第三人称】已经习惯成自然,信任度没有提升。
201204: 201203:
- 【人物名称@正常】你这是干什么?非亲非故送人钱财,怕是不安好心。收回去吧。 - 【人物名称@正常】你这是干什么?非亲非故送人钱财,怕是不安好心。收回去吧。
201204:
- 【旁白@正常】你的钱财不足,已经拿不出手了。
201205: 201205:
- 【人物名称@正常】我差这么点钱吗,别给我来这套。 - 【人物名称@正常】我差这么点钱吗,太小看我了吧。
#2013: 邀请医生 #2013: 邀请医生
201301: 201301:
- 【人物名称@正常】医者父母心,我这就陪你走一趟。诊金么,先预付个【1】文吧。 - 【人物名称@正常】医者父母心,我这就陪你走一趟。诊金么,先预付个【条件2】文吧。
201302: 201302:
- 【人物名称@正常】医者父母心,陪你出诊倒是无妨。可是此人明明生龙活虎,你是想戏弄于我吗? - 【人物名称@正常】医者父母心,陪你出诊倒是无妨。可是此人明明生龙活虎,你是想戏弄于我吗?
201303: 201303:
- 【人物名称@正常】医者父母心,我这就陪你走一趟。不过这个诊金么,先预付个【1】文吧。
201304:
- 【人物名称@正常】话不投机,想要我陪你去却是万万不能。 - 【人物名称@正常】话不投机,想要我陪你去却是万万不能。
201304:
- 【人物名称@正常】医者父母心,我这就陪你走一趟。不过这个诊金么,先预付个【条件2】文吧。【旁白】很遗憾,你掏不出【条件2】的诊金。
201305: 201305:
- 【人物名称@正常】不好意思,你另请高明吧。 - 【人物名称@正常】不好意思,你另请高明吧。
#2014: 给钱买茶具 #2014: 给钱买茶具
...@@ -427,20 +433,20 @@ person: ...@@ -427,20 +433,20 @@ person:
201402: 201402:
- 【人物名称@正常】不是已经被你买走了吗?没有了没有了。你还来折腾什么? - 【人物名称@正常】不是已经被你买走了吗?没有了没有了。你还来折腾什么?
201403: 201403:
- 【人物名称@正常】我这茶具不便宜。你口袋里那几个钱可不够。
201404:
- 【人物名称@正常】别以为有两个破钱就了不起。这药不卖! - 【人物名称@正常】别以为有两个破钱就了不起。这药不卖!
201404:
- 【人物名称@正常】我这茶具不便宜。你口袋里那几个钱可不够。
201405: 201405:
- 【人物名称@正常】我没有茶具这东西,你找别人问问吧。 - 【人物名称@正常】没有没有,快走快走。
#2015: 开怀畅饮 #2015: 开怀畅饮
201501: 201501:
- 【人物名称@正常】好酒!好酒!劳您破费了,咱们不醉不归! - 【人物名称@正常】好酒!好酒!劳您破费了,咱们不醉不归!
201502: 201502:
- 【人物名称@正常】太,太,太客气了,咱们再,再,再喝。 - 【人物名称@正常】太,太,太客气了,咱们再,再,再喝。【旁白@正常】:前不久你刚和【A】畅饮过一轮,【第三人称】的酒意未消,再喝也没有效果。
201503: 201503:
- 【人物名称@正常】我的酒量不小,你的身上的钱财怕是不够,还是算了吧。
201504:
- 【人物名称@正常】咱们不熟,这顿酒还是免了吧。 - 【人物名称@正常】咱们不熟,这顿酒还是免了吧。
201504:
- 【人物名称@正常】我的酒量不小,你的身上的钱财怕是不够,还是算了吧。
201505: 201505:
- 【人物名称@正常】谢谢啊,我真不喝酒。 - 【人物名称@正常】谢谢啊,我真不喝酒。
#2016: 买回钗子 #2016: 买回钗子
...@@ -449,11 +455,11 @@ person: ...@@ -449,11 +455,11 @@ person:
201602: 201602:
- 【人物名称@正常】不是已经把钗子卖给你了吗? - 【人物名称@正常】不是已经把钗子卖给你了吗?
201603: 201603:
- 【人物名称@正常】这钗子最少得【1】文钱,你那点钱可不够!
201604:
- 【人物名称@正常】休想。这可是美人儿贴身的钗子,怎么能卖给你。 - 【人物名称@正常】休想。这可是美人儿贴身的钗子,怎么能卖给你。
201604:
- 【人物名称@正常】这钗子最少得【条件2】文钱,你那点钱可不够!
201605: 201605:
- 【人物名称@正常】别问我,我这真没钗子这样的东西。 - 【人物名称@正常】我可没有什么钗子。你怕是听错了。
#2017: 抢回钗子 #2017: 抢回钗子
201701: 201701:
- 【人物名称@正常】别,别动手,钗子在这里。给你给你。 - 【人物名称@正常】别,别动手,钗子在这里。给你给你。
...@@ -461,8 +467,8 @@ person: ...@@ -461,8 +467,8 @@ person:
- 【人物名称@正常】我,我不是已经把钗子给你了吗?哪里能给你再变个钗子出来! - 【人物名称@正常】我,我不是已经把钗子给你了吗?哪里能给你再变个钗子出来!
201703: 201703:
- 【人物名称@正常】想得美!想要回钗子,让她自己来跟我说! - 【人物名称@正常】想得美!想要回钗子,让她自己来跟我说!
201704: 201705:
- 【人物名称@正常】抢没用,我这没有钗子。 - 【人物名称@正常】我可没有什么钗子。你怕是听错了。
#2018: 追回私吞款项 #2018: 追回私吞款项
201801: 201801:
- 【人物名称@正常】别,别动手,有话好好说,钱,钱我这就给你。 - 【人物名称@正常】别,别动手,有话好好说,钱,钱我这就给你。
...@@ -470,8 +476,8 @@ person: ...@@ -470,8 +476,8 @@ person:
- 【人物名称@正常】我,我不是已经把钱给你了吗?你还想做什么?! - 【人物名称@正常】我,我不是已经把钱给你了吗?你还想做什么?!
201803: 201803:
- 【人物名称@正常】就凭你?也敢找我追账?知道死字怎么写吗? - 【人物名称@正常】就凭你?也敢找我追账?知道死字怎么写吗?
201804: 201805:
- 【人物名称@正常】你找我追什么帐,你找其他人吧。 - 【人物名称@正常】欠账?我怎么不记得。
#2019: 探听身家 #2019: 探听身家
201901: 201901:
- 【人物名称@正常】别看我平时低调,悄悄跟你说,我的身家,最少有这个数,嘿嘿。 - 【人物名称@正常】别看我平时低调,悄悄跟你说,我的身家,最少有这个数,嘿嘿。
...@@ -479,9 +485,9 @@ person: ...@@ -479,9 +485,9 @@ person:
- 【人物名称@正常】不是跟你说过了吗? - 【人物名称@正常】不是跟你说过了吗?
201903: 201903:
- 【人物名称@正常】你打听这个作什么?无可奉告! - 【人物名称@正常】你打听这个作什么?无可奉告!
201904: 201905:
- 【人物名称@正常】我这没什么可问的。 - 【人物名称@正常】我这没什么可问的。
#2020:解救被绑女孩 #2020:解救被绑女孩
202001: 202001:
- 【人物名称@正常】你,你怎么知道的? - 【人物名称@正常】你,你怎么知道的?
【旁白@正常】在你的威吓之下,【1】战战兢兢地打开了地窖,一位柔弱的女子正蜷缩在里面哭泣。 【旁白@正常】在你的威吓之下,【1】战战兢兢地打开了地窖,一位柔弱的女子正蜷缩在里面哭泣。
...@@ -490,9 +496,9 @@ person: ...@@ -490,9 +496,9 @@ person:
- 【人物名称@正常】你不是已经把人救走了吗,还想干嘛。 - 【人物名称@正常】你不是已经把人救走了吗,还想干嘛。
202003: 202003:
- 【人物名称@正常】你在说什么,我完全听不懂! - 【人物名称@正常】你在说什么,我完全听不懂!
202004: 202005:
- 【人物名称@正常】你找错人了吧。 - 【人物名称@正常】你找错人了吧。
#2021:审问罪犯供出老巢 #2021:审问罪犯供出老巢
202101: 202101:
- 【人物名称@正常】别动手,别动手,我说。 - 【人物名称@正常】别动手,别动手,我说。
【旁白@正常】在你的威吓之下,【1】老老实实供出了老巢所在。你在一个月黑风高之日前去,起出了大笔金银财宝。 【旁白@正常】在你的威吓之下,【1】老老实实供出了老巢所在。你在一个月黑风高之日前去,起出了大笔金银财宝。
...@@ -500,9 +506,9 @@ person: ...@@ -500,9 +506,9 @@ person:
- 【人物名称@正常】我不是告诉你了吗,你已经得到答案。 - 【人物名称@正常】我不是告诉你了吗,你已经得到答案。
202103: 202103:
- 【人物名称@正常】呸,你休想知道。 - 【人物名称@正常】呸,你休想知道。
202104: 202105:
- 【人物名称@正常】此事与我无关,不知道你在说什么。 - 【人物名称@正常】此事与我无关,不知道你在说什么。
#2022:交出藏宝图 #2022:交出藏宝图
202201: 202201:
- 【人物名称@正常】想不到你居然能打听到如此隐秘之事。 - 【人物名称@正常】想不到你居然能打听到如此隐秘之事。
【旁白@正常】【1】趁你不备,掏出匕首向你捅来,却被你灵活闪过。一番争斗后,【1】不是你的对手,被迫交出了藏宝图。你在一个月黑风高的夜晚去挖出了藏宝,从此声名大振,富可敌国。 【旁白@正常】【1】趁你不备,掏出匕首向你捅来,却被你灵活闪过。一番争斗后,【1】不是你的对手,被迫交出了藏宝图。你在一个月黑风高的夜晚去挖出了藏宝,从此声名大振,富可敌国。
...@@ -510,9 +516,9 @@ person: ...@@ -510,9 +516,9 @@ person:
- 【人物名称@正常】你不是已经破解了藏宝图了吗? - 【人物名称@正常】你不是已经破解了藏宝图了吗?
202203: 202203:
- 【人物名称@正常】我的秘药可不是随便给人用的。告辞! - 【人物名称@正常】我的秘药可不是随便给人用的。告辞!
202204: 202205:
- 【人物名称@正常】不好意思,我没有这东西。 - 【人物名称@正常】不好意思,我没有这东西。
#2023:抓捕人犯 #2023:抓捕人犯
202301: 202301:
- 【人物名称@正常】我自以为天衣无缝,居然还是被你发现了。天意啊,天意。 - 【人物名称@正常】我自以为天衣无缝,居然还是被你发现了。天意啊,天意。
【旁白@正常】你和【1】一番惊天动地的大战。你浑身是伤,最终【1】不是你的对手,束手就擒,你成功破获了此案,声名大振,从此仕途一帆风顺,成为一代名捕。 【旁白@正常】你和【1】一番惊天动地的大战。你浑身是伤,最终【1】不是你的对手,束手就擒,你成功破获了此案,声名大振,从此仕途一帆风顺,成为一代名捕。
...@@ -520,20 +526,20 @@ person: ...@@ -520,20 +526,20 @@ person:
- 【人物名称@正常】我不是已经认罪了吗?你这是想做什么! - 【人物名称@正常】我不是已经认罪了吗?你这是想做什么!
202303: 202303:
- 【人物名称@正常】就凭你,还不足以让我认罪。给我滚! - 【人物名称@正常】就凭你,还不足以让我认罪。给我滚!
202304: 202305:
- 【人物名称@正常】拜托你别乱抓人好不好,别逮谁都像坏人。 - 【人物名称@正常】拜托你别乱抓人好不好,别逮谁都像坏人。
#2024:购买犯人信息 #2024:购买犯人信息
202401: 202401:
- 【人物名称@正常】嘿嘿,这还差不多,我告诉你啊,那天我刚好路过,听到一声惨叫,偷偷探头一看,发现【1】满脸鲜血,正在行凶! - 【人物名称@正常】嘿嘿,这还差不多,我告诉你啊,那天我刚好路过,听到一声惨叫,偷偷探头一看,发现【1】满脸鲜血,正在行凶!
202402: 202402:
- 【人物名称@正常】不是告诉你了吗,行凶的是【1】。 - 【人物名称@正常】不是告诉你了吗,行凶的是【A】。
202403: 202403:
- 【人物名称@正常】我这消息,最少值【1】文钱,你的钱可不够买我这消息。
202404:
- 【人物名称@正常】我跟你很熟吗?这钱我可不敢要。 - 【人物名称@正常】我跟你很熟吗?这钱我可不敢要。
202404:
- 【人物名称@正常】我这消息,最少值【条件2】文钱,你的钱可不够买我这消息。
202405: 202405:
- 【人物名称@正常】抱歉,我没有这消息。 - 【人物名称@正常】抱歉,我没有这消息。
#2025:购买物品完成 #2025:购买物品完成
202501: 202501:
- 【人物名称@正常】且让我看看。这,这正是我所需之物。感激不尽。 - 【人物名称@正常】且让我看看。这,这正是我所需之物。感激不尽。
【旁白@正常】你将东西转交给【1】,【2】对你深表感激。 【旁白@正常】你将东西转交给【1】,【2】对你深表感激。
...@@ -547,7 +553,7 @@ person: ...@@ -547,7 +553,7 @@ person:
- 【人物名称@正常】且让我看看。这,这根本是假货啊!你被人骗了!算了,算了。你辛苦一场,也不容易。这点钱你收下。 - 【人物名称@正常】且让我看看。这,这根本是假货啊!你被人骗了!算了,算了。你辛苦一场,也不容易。这点钱你收下。
202506: 202506:
- 【人物名称@正常】你找错人了吧,我可没叫你帮我带东西。 - 【人物名称@正常】你找错人了吧,我可没叫你帮我带东西。
#2026:大夫出诊完成 #2026:大夫出诊完成
202601: 202601:
- 【人物名称@正常】大夫刚才已经来过,我感觉好多了。请受我一拜。 - 【人物名称@正常】大夫刚才已经来过,我感觉好多了。请受我一拜。
【旁白@正常】你与【1】的友好度变为【2】点,威慑度变为【3】点。 【旁白@正常】你与【1】的友好度变为【2】点,威慑度变为【3】点。
...@@ -558,8 +564,8 @@ person: ...@@ -558,8 +564,8 @@ person:
202604: 202604:
- 【人物名称@正常】大夫虽然来过,但是不是你请回来的我可不确定。 - 【人物名称@正常】大夫虽然来过,但是不是你请回来的我可不确定。
202605: 202605:
- 【人物名称@正常】抱歉,我不是大夫。你找错人了。 - 【人物名称@正常】抱歉,没有确切病人的消息前我不会出诊。
#2027:寻回物品完成 #2027:寻回物品完成
202701: 202701:
- 【人物名称@正常】哎呀,这正是我丢失的。太谢谢你了。 - 【人物名称@正常】哎呀,这正是我丢失的。太谢谢你了。
【旁白@正常】你与【1】的友好度变为【2】点,威慑度变为【3】点。 【旁白@正常】你与【1】的友好度变为【2】点,威慑度变为【3】点。
...@@ -570,8 +576,8 @@ person: ...@@ -570,8 +576,8 @@ person:
202704: 202704:
- 【人物名称@正常】虽然我一直想寻回此物,但是你给的我可不敢收。 - 【人物名称@正常】虽然我一直想寻回此物,但是你给的我可不敢收。
202705: 202705:
- 【人物名称@正常】我没有让你找东西啊,你问错人了吧。 - 【人物名称@正常】你这是何意,该不是问错人了吧。
#2028:打探肥羊完成 #2028:打探肥羊完成
202801: 202801:
- 【人物名称@正常】想不到你还挺能干。很好。 - 【人物名称@正常】想不到你还挺能干。很好。
【旁白@正常】你与【1】的友好度变为【2】点,威慑度变为【3】点。 【旁白@正常】你与【1】的友好度变为【2】点,威慑度变为【3】点。
...@@ -583,7 +589,7 @@ person: ...@@ -583,7 +589,7 @@ person:
- 【人物名称@正常】以我俩的交情,你这话的的真假,可说不准啊。 - 【人物名称@正常】以我俩的交情,你这话的的真假,可说不准啊。
202805: 202805:
- 【人物名称@正常】我没有让你去问啊,你搞错了吧。 - 【人物名称@正常】我没有让你去问啊,你搞错了吧。
#2029:催账完成 #2029:催账完成
202901: 202901:
- 【人物名称@正常】你居然帮我把那个老赖的钱收回来了?这是一点点感谢,不成敬意。 - 【人物名称@正常】你居然帮我把那个老赖的钱收回来了?这是一点点感谢,不成敬意。
【旁白@正常】你帮【1】收回了【2】的欠款,【3】对你满口感谢,并递给你【4】文钱作为谢礼。 【旁白@正常】你帮【1】收回了【2】的欠款,【3】对你满口感谢,并递给你【4】文钱作为谢礼。
...@@ -595,8 +601,8 @@ person: ...@@ -595,8 +601,8 @@ person:
202904: 202904:
- 【人物名称@正常】无事献殷勤,来历不明的钱我可不敢收。 - 【人物名称@正常】无事献殷勤,来历不明的钱我可不敢收。
202905: 202905:
- 【人物名称@正常】别人没欠我钱,你问错人啦。 - 【人物名称@正常】你找谁催账了,弄错人了吧。
#2030:催账 #2030:催账
203001: 203001:
- 【人物名称@正常】我给,我给。别动手。 - 【人物名称@正常】我给,我给。别动手。
【旁白@正常】你从【1】手上要到了拖欠的债款。 【旁白@正常】你从【1】手上要到了拖欠的债款。
...@@ -604,9 +610,9 @@ person: ...@@ -604,9 +610,9 @@ person:
- 【人物名称@正常】我不是已经给你了吗?难道你想讹诈我? - 【人物名称@正常】我不是已经给你了吗?难道你想讹诈我?
203003: 203003:
- 【人物名称@正常】你算老几,敢来找我要钱。 - 【人物名称@正常】你算老几,敢来找我要钱。
203004: 203005:
- 【人物名称@正常】别找我,我可没欠任何人钱。 - 【人物名称@正常】什么?欠账?拿出证据来。
#2031:砸场子完成 #2031:砸场子完成
203101: 203101:
- 【人物名称@正常】哈哈哈,太好了。你果然没让我失望。这点钱你收下,就当是辛苦费。 - 【人物名称@正常】哈哈哈,太好了。你果然没让我失望。这点钱你收下,就当是辛苦费。
【旁白@正常】你帮【1】大大出了一口气,你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得【4】文作为辛苦费。 【旁白@正常】你帮【1】大大出了一口气,你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得【4】文作为辛苦费。
...@@ -618,7 +624,7 @@ person: ...@@ -618,7 +624,7 @@ person:
- 【人物名称@正常】你自己做下的事情,与我何干。我们很熟吗? - 【人物名称@正常】你自己做下的事情,与我何干。我们很熟吗?
203105: 203105:
- 【人物名称@正常】没有这事,你看错人了吧。 - 【人物名称@正常】没有这事,你看错人了吧。
#2032:砸场子 #2032:砸场子
203201: 203201:
- 【人物名称@正常】你,你欺人太甚!快住手。 - 【人物名称@正常】你,你欺人太甚!快住手。
【旁白@正常】你无视【1】的阻拦,将眼前一切可以砸的都砸了个稀巴烂。 【旁白@正常】你无视【1】的阻拦,将眼前一切可以砸的都砸了个稀巴烂。
...@@ -627,9 +633,9 @@ person: ...@@ -627,9 +633,9 @@ person:
- 【人物名称@正常】你,你还来做什么,这里还有什么可以砸的吗? - 【人物名称@正常】你,你还来做什么,这里还有什么可以砸的吗?
203203: 203203:
- 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死? - 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死?
203204: 203205:
- 【人物名称@正常】别乱来,你找错人了。 - 【人物名称@正常】没凭没据你可别乱来,小心吃官司。
#2033:探听隐私完成 #2033:探听隐私完成
203301: 203301:
- 【人物名称@正常】什,什么,竟有此事? - 【人物名称@正常】什,什么,竟有此事?
【旁白@正常】【1】大惊失色。 【旁白@正常】【1】大惊失色。
...@@ -643,7 +649,7 @@ person: ...@@ -643,7 +649,7 @@ person:
- 【人物名称@正常】只凭你我关系,还不足以让我信任于你。 - 【人物名称@正常】只凭你我关系,还不足以让我信任于你。
203305: 203305:
- 【人物名称@正常】我没有让你去问吧,你搞错了。 - 【人物名称@正常】我没有让你去问吧,你搞错了。
#2034:探听隐私 #2034:探听隐私
203401: 203401:
- 【人物名称@正常】莫名其妙。 - 【人物名称@正常】莫名其妙。
【旁白@正常】【1】警惕地扫了你一眼,转身离去。你小心翼翼观察了下周围,远远跟在了【2】身后。 【旁白@正常】【1】警惕地扫了你一眼,转身离去。你小心翼翼观察了下周围,远远跟在了【2】身后。
...@@ -651,66 +657,66 @@ person: ...@@ -651,66 +657,66 @@ person:
【旁白@正常】你悄悄爬上屋顶,掀开一片瓦片,烛光下,【1】对着镜子,正轻轻把自己的脸皮撕了下来。那居然是一张人皮面具!面具下,是一张陌生的人脸!震惊之下,你赶紧溜下了屋檐。 【旁白@正常】你悄悄爬上屋顶,掀开一片瓦片,烛光下,【1】对着镜子,正轻轻把自己的脸皮撕了下来。那居然是一张人皮面具!面具下,是一张陌生的人脸!震惊之下,你赶紧溜下了屋檐。
【旁白@正常】你成功打探到了【1】的隐私!你与【1】的友好度变为【3】点,威慑度变为【4】点。 【旁白@正常】你成功打探到了【1】的隐私!你与【1】的友好度变为【3】点,威慑度变为【4】点。
203402: 203402:
- 【人物名称@正常】你已经知道他的隐私了。 - 【旁白@正常】你已经知道他的隐私了。
203403: 203403:
- 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死? - 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死?【旁白@正常】【A】挥拳朝你扑过来,你被打得鼻青脸肿。
203404: 203405:
- 【人物名称@正常】我没什么可说,你找其他人吧。 - 【人物名称@正常】我没什么可说,你找其他人吧。
#2035:试药 #2035:试药
203501: 203501:
- 【人物名称@正常】太好了。我正在找敢试药的人呢。你且来试试。先说好,出问题了可不关我事。 - 【人物名称@正常】太好了。我正在找敢试药的人呢。你且来试试。先说好,出问题了可不关我事。
【旁白@正常】你一脸视死如归地接过了那鸽蛋大的药丸,张口就吞了下去。 【旁白@正常】你一脸视死如归地接过了那鸽蛋大的药丸,张口就吞了下去。
【旁白@正常】你满面红光,感到浑身充满了力量。 【旁白@正常】你满面红光,感到浑身充满了力量。
【人物名称@正常】成,成功了??太好了。这是你的报酬。拿了钱,以后有什么头疼胸闷啥的可不许赖我。 【人物名称@正常】成,成功了??太好了。这是你的报酬。拿了钱,以后有什么头疼胸闷啥的可不许赖我。
【旁白@正常】你勇敢地帮【1】试药成功,你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得【4】文酬劳。 【旁白@正常】你勇敢地帮【1】试药成功,你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得【4】文酬劳。
203502: 203510:
- 【人物名称@正常】太好了。我正在找敢试药的人呢。你且来试试。先说好,出问题了可不关我事。 - 【人物名称@正常】太好了。我正在找敢试药的人呢。你且来试试。先说好,出问题了可不关我事。
【旁白@正常】你一脸视死如归地接过了那鸽蛋大的药丸,张口就吞了下去。 【旁白@正常】你一脸视死如归地接过了那鸽蛋大的药丸,张口就吞了下去。
【旁白@正常】你眼前一黑,一头栽倒在地。 【旁白@正常】你眼前一黑,一头栽倒在地。
【旁白@正常】过了很久,你才悠悠醒过来,感到浑身像散架了一样。 【旁白@正常】过了很久,你才悠悠醒过来,感到浑身像散架了一样。
【人物名称@正常】这,这可是你自愿的。不关我事,这点钱拿着,就算我给你的补偿。 【人物名称@正常】这,这可是你自愿的。不关我事,这点钱拿着,就算我给你的补偿。
【旁白@正常】很遗憾,你帮【1】试药失败,你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得【4】文补偿。 【旁白@正常】很遗憾,你帮【A】试药失败,你与【A】的友好度变为【信任值】点,威慑度变为【威慑度】点。你获得【奖励】文补偿。
203503: 203502:
- 【人物名称@正常】你,你还来做什么,我没有药可以试了,快走快走。 - 【人物名称@正常】你,你还来做什么,我没有药可以试了,快走快走。
203504: 203503:
- 【人物名称@正常】我们很熟吗? - 【人物名称@正常】我们很熟吗?
203505: 203505:
- 【人物名称@正常】我药都没有,来我这试什么药。 - 【人物名称@正常】你从哪里得来的小道消息,没有没有。
#2036:证据账本完成 #2036:证据账本完成
203601: 203601:
- 【人物名称@正常】快让我看看。 - 【人物名称@正常】快让我看看。
【旁白@正常】【1】接过账本,翻看几下,大笑起来。 【旁白@正常】【1】接过账本,翻看几下,大笑起来。
【人物名称@正常】好,好,好,【2】你这次在劫难逃!壮士果然身手不凡。小小心意,还请收下。 【人物名称@正常】好,好,好,【2】你这次在劫难逃!壮士果然身手不凡。小小心意,还请收下。
【旁白@正常】你与【1】的友好度变为【3】点,威慑度变为【4】点。你获得【5】文酬劳。 【旁白@正常】你与【1】的友好度变为【3】点,威慑度变为【4】点。你获得【5】文酬劳。
203602: 203610:
- 【人物名称@正常】快让我看看。 - 【人物名称@正常】快让我看看。
【旁白@正常】【1】接过账本,翻看几下,脸色难看起来。 【旁白@正常】【A】接过账本,翻看几下,脸色难看起来。
【人物名称@正常】此物是假的。看来【2】早有准备。再去也无益。罢了。无论如何,多谢壮士相助,壮士身手不凡,这点心意还请收下。 【人物名称@正常】此物是假的。看来【B】早有准备。再去也无益。罢了。无论如何,多谢壮士相助,壮士身手不凡,这点心意还请收下。
【旁白@正常】你与【1】的友好度变为【3】点,威慑度变为【4】点。你获得【5】文酬劳。 【旁白@正常】你与【A】的友好度变为【信任值】点,威慑度变为【威慑度】点。你获得【奖励】文酬劳。
203603: 203602:
- 【人物名称@正常】你不是已经给过我了吗?此事关联甚大,千万不要乱传。 - 【人物名称@正常】你不是已经给过我了吗?此事关联甚大,千万不要乱传。
203604: 203603:
- 【人物名称@正常】快给我看看!什么,没有?你是在戏弄我吗? - 【人物名称@正常】快给我看看!什么,没有?你是在戏弄我吗?
203605: 203604:
- 【人物名称@正常】只凭你我关系,还不足以让我认定此物真假。 - 【人物名称@正常】只凭你我关系,还不足以让我认定此物真假。
203606: 203605:
- 【人物名称@正常】你搞错了吧,我没让你去查这个啊。 - 【人物名称@正常】你搞错了吧,我没让你去查这个啊。
#2037:证据账本 #2037:证据账本
203701: 203701:
- 【人物名称@正常】你说什么? - 【人物名称@正常】你说什么?
【旁白@正常】你趁【1】不注意,一掌打晕了【2】。然后翻箱倒柜。 【旁白@正常】你趁【1】不注意,一掌打晕了【2】。然后翻箱倒柜。
【旁白@正常】你成功偷取到了【2】的账本!你与【2】的友好度变为【3】点,威慑度变为【4】点。 【旁白@正常】你成功偷取到了【2】的账本!你与【2】的友好度变为【3】点,威慑度变为【4】点。
203702: 203710:
- 【人物名称@正常】你说什么? - 【人物名称@正常】你说什么?
【旁白@正常】你假装离去,趁夜摸进了【1】的密室,翻箱倒柜。 【旁白@正常】你假装离去,趁夜摸进了【A】的密室,翻箱倒柜。
【旁白@正常】你成功偷取到了【1】的账本!你与【1】的友好度变为【2】点,威慑度变为【3】点。 【旁白@正常】你成功偷取到了【A】的账本!你与【A】的友好度变为【信任值】点,威慑度变为【威慑度】点。
203702:
- 【旁白@正常】你已经知道他的隐私了。
203703: 203703:
- 【人物名称@正常】你已经知道他的隐私了。
203704:
- 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死? - 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死?
203705: 203705:
- 【人物名称@正常】不好意思,我这没有这东西。 - 【人物名称@正常】你从哪里得来的小道消息,没有没有。
#2038:证据账本类型2完成 #2038:证据账本类型2完成
203801: 203801:
- 【人物名称@正常】快让我看看。 - 【人物名称@正常】快让我看看。
【旁白@正常】【1】接过账本,翻看几下,大笑起来。 【旁白@正常】【1】接过账本,翻看几下,大笑起来。
...@@ -726,7 +732,7 @@ person: ...@@ -726,7 +732,7 @@ person:
- 【人物名称@正常】凭你我关系,如何才能让我相信这是真的呢? - 【人物名称@正常】凭你我关系,如何才能让我相信这是真的呢?
203805: 203805:
- 【人物名称@正常】你搞错了,我可没让你帮我找这个。 - 【人物名称@正常】你搞错了,我可没让你帮我找这个。
#2039:栽赃陷害完成 #2039:栽赃陷害完成
203901: 203901:
- 【人物名称@正常】此事当真?好,好,好! - 【人物名称@正常】此事当真?好,好,好!
【旁白@正常】【1】不住点头。 【旁白@正常】【1】不住点头。
...@@ -740,7 +746,7 @@ person: ...@@ -740,7 +746,7 @@ person:
- 【人物名称@正常】凭你我关系,如何才能让我相信这是真的呢? - 【人物名称@正常】凭你我关系,如何才能让我相信这是真的呢?
203905: 203905:
- 【人物名称@正常】什么事?都不知道你在说什么,你找其他人吧。 - 【人物名称@正常】什么事?都不知道你在说什么,你找其他人吧。
#2040:栽赃陷害类型2完成 #2040:栽赃陷害类型2完成
204001: 204001:
- 【人物名称@正常】此事当真?好,好,好! - 【人物名称@正常】此事当真?好,好,好!
【旁白@正常】【1】不住点头。 【旁白@正常】【1】不住点头。
...@@ -757,7 +763,7 @@ person: ...@@ -757,7 +763,7 @@ person:
- 【人物名称@正常】凭你我关系,如何才能让我相信这是真的呢? - 【人物名称@正常】凭你我关系,如何才能让我相信这是真的呢?
204005: 204005:
- 【人物名称@正常】什么事?都不知道你在说什么,你找其他人吧。 - 【人物名称@正常】什么事?都不知道你在说什么,你找其他人吧。
#2041:栽赃陷害类型2完成 #2041:栽赃陷害类型2完成
204101: 204101:
- 【人物名称@正常】我已知晓此事,辛苦你了。 - 【人物名称@正常】我已知晓此事,辛苦你了。
【旁白@正常】你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得了【4】文辛苦费。 【旁白@正常】你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得了【4】文辛苦费。
...@@ -769,7 +775,66 @@ person: ...@@ -769,7 +775,66 @@ person:
- 【人物名称@正常】凭你我关系,我可不敢相信。 - 【人物名称@正常】凭你我关系,我可不敢相信。
204105: 204105:
- 【人物名称@正常】不好意思,我很忙。 - 【人物名称@正常】不好意思,我很忙。
#2101:买东西 #2042:求婚
204202:
- 【人物名称@正常】你们不是已经成亲了吗?
204203:
- 【人物名称@正常】少侠先别急,现在太早了,等破了案再说不迟。
204205:
- 【人物名称@正常】公子请自重,现在谈婚论嫁还早了点。
#2043:赌场作弊
204301:
- 【人物名称@正常】哎哟,还真敢压啊。那我就不客气啦!
【旁白@正常】快速摇晃着骰盅,左右几圈后,猛然盖倒在桌上。【搭档名称】的食指悄无声息地在桌上敲击了两下,然后对你轻轻点了点头。
【人物名称@正常】开!
【旁白@正常】盖盅掀开,里面红艳艳的三个六。
【人物名称@正常】不,不可能!这绝对不可能!
【搭档名称@正常】三个六,一赔一百五!快,给钱!
204302:
- 【人物名称@正常】哎哟,还真敢压啊。那我就不客气啦!
【旁白@正常】快速摇晃着骰盅,左右几圈后,猛然盖倒在桌上。【搭档名称】的食指悄无声息地在桌上敲击了两下,然后对你轻轻点了点头。
【人物名称@正常】开!
【旁白@正常】盖盅掀开,里面红艳艳的三个一。
【人物名称@正常】不,不可能!这绝对不可能!
【搭档名称@正常】三个六,一赔一百五!快,给钱!
204303:
- 【人物名称@正常】哎哟,还真敢压啊。那我就不客气啦!
【旁白@正常】快速摇晃着骰盅,左右几圈后,猛然盖倒在桌上。【搭档名称】的食指悄无声息地在桌上敲击了两下,然后对你轻轻点了点头。
【人物名称@正常】开!
【旁白@正常】盖盅掀开,里面红艳艳的四五六,大!
【人物名称@正常】你运气真好!来,一赔一。
【搭档名称@正常】少爷,买大小赢得太少啦。不如选个赔率大的,三个六或者三个一吧!
204304:
- 【人物名称@正常】哎哟,还真敢压啊。那我就不客气啦!
【旁白@正常】快速摇晃着骰盅,左右几圈后,猛然盖倒在桌上。【搭档名称】的食指悄无声息地在桌上敲击了两下,然后对你轻轻点了点头。
【人物名称@正常】开!
【旁白@正常】骰盅掀开,里面红艳艳的一二三,小!
【人物名称@正常】你运气真好!
【搭档名称@正常】少爷,买大小赢得太少啦。不如选个赔率大的,三个六或者三个一吧!
204305:
- 【人物名称@正常】小子,会不会赌啊,我这赌桌上可没这个赌法!要么压大,要么压小,要么压三个一或者三个六!只能压一样!
204306:
- 【人物名称@正常】我的公子唉,你上次来赌,就把我输得一无所有了,您可千万别再耍我了!
204307:
- 【人物名称@正常】赌?多少人赌得倾家荡产,你可别来害我。找别人去吧。
204308:
- 【人物名称@正常】三个色子,看点数。四到十点小,十一到十七点大!买大或买小,赔率都是一赔一。
【搭档名称@正常】那三点和十八点呢?
【人物名称@正常】嘿嘿。压中三个一或者三个六的话,一赔一百五!你要有这胆量,大可以试试。不过,只能压一样!
【旁白@正常】【搭档名称】轻轻将一只手搭在赌桌上。
【搭档名称@正常】公子,放心压注,有我在呢。你想要压什么?
#2044:砸场子
204401:
- 【人物名称@正常】这……这是……这是那个隐秘之地的腰牌!
【旁白@正常】【A】大惊失色,快步走上前来,想要接过去细看,又讪讪地缩回了手。
【人物名称@正常】在下有眼不识泰山。公子恕罪,恕罪。
204402:
- 【人物名称@正常】公子出身不凡,在下如雷贯耳。还请公子把这信物收回吧。
204403:
- 【人物名称@正常】恕我眼拙,认不出它的来历。
204405:
- 【人物名称@正常】你拿这个给我看什么。
#2101:买东西
210101: 210101:
- 【人物名称@正常】既然出得起价钱,就卖给你了。 - 【人物名称@正常】既然出得起价钱,就卖给你了。
【旁白@正常】你从【1】手上买下了。 【旁白@正常】你从【1】手上买下了。
...@@ -780,5 +845,736 @@ person: ...@@ -780,5 +845,736 @@ person:
210104: 210104:
- 【人物名称@正常】抱歉,不卖给信不过的人。 - 【人物名称@正常】抱歉,不卖给信不过的人。
210105: 210105:
- 【人物名称@正常】不好意思,我这不卖东西。 - 【人物名称@正常】没有没有,快走快走。
#2102:二次回复
210202:
- 【旁白@正常】你已经完成了这个任务。
210203:
- 【人物名称@正常】不要骗我,你明明还没有完成。
210204:
- 【人物名称@正常】我们之间的交情,好像还没到这地步吧?
#--------------------------------------------职场------------------------------------------------
#2051:谴责乱扔垃圾
205102:
- 【人物名称@正常】别骂了别骂了,我知道错了,我不是已经道歉过了吗!
205103:
- 【人物名称@正常】你怎么知道的?不是,我跟你又不熟,轮得到你来说我吗。
205105:
- 【人物名称@正常】你是不是搞错了什么,我从来没乱扔过垃圾。
#2052:谴责抽烟
205202:
- 【人物名称@正常】放心,我再抽也不会被你们看到。
205203:
- 【人物名称@正常】我抽我的,你管得着吗?我跟你很熟?。
205205:
- 【人物名称@正常】你是不是搞错了什么,我不吸烟的。
#2053:谴责邋遢
205302:
- 【人物名称@正常】喂,别鸡蛋里挑骨头了,我不是已经收拾干净了吗。
205303:
- 【人物名称@正常】邋遢的是我,跟你有什么关系,又不会传染。
205305:
- 【人物名称@正常】你是不是搞错人了,我看起来哪里邋遢了。
#2054:谴责颜值
205402:
- 【人物名称@正常】我都戴上面具了你还想让我怎样。
205403:
- 【旁白@正常】【A】左顾右盼,然后转向旁边的同事,假装你说的是其他人。
【人物名称@正常】喂,他说你长得丑,是我就不忍了。
205405:
- 【人物名称@正常】你这么说就很不礼貌了,我这颜值哪里差了?
#2055:谴责骂人
205502:
- 【人物名称@正常】我不是说过了么,我以后不会再骂人了,除非实在忍不住。
205503:
- 【人物名称@正常】我没有骂人,老祖宗几千年留下的国粹,你怎么能说是骂人呢。
205505:
- 【人物名称@正常】你是不是搞错人了,我从来没骂过人啊。
#2056:谴责完成
205602:
- 【人物名称@正常】你刚才已经告诉过我了。
205603:
- 【人物名称@正常】你明明就没有,我看着呢。
205604:
- 【人物名称@正常】你说的话我不太相信。
205605:
- 【人物名称@正常】我不知道你在说什么,我没有找你帮过忙啊。
#2057:打探
205702:
- 【人物名称@正常】刚才跟你分享的那些,你回去记得要看哦,超有意思的。
205703:
- 【人物名称@正常】小帅同学,上班时间就要好好工作,别整这些有的没的。
205705:
- 【人物名称@正常】这是秘密,我是不会告诉你的。
#2058:打探完成
205802:
- 【人物名称@正常】你刚才已经告诉过我了。
205803:
- 【人物名称@正常】你这打探的都是什么啊,完全不是我想要的,你再去打探一次。
205804:
- 【人物名称@正常】不听不听王八念经。
205805:
- 【人物名称@正常】你搞错人了吧,我没有想知道这些啊。
#2059:质问打小报告
205902:
- 【人物名称@正常】你还是放过我吧,我下次不会再这样了。
205903:
- 【人物名称@正常】没有啊,不是我干的,你有什么证据吗。
205905:
- 【人物名称@正常】你搞错人了吧,我没有做过这种事啊。
#2060:质问甩锅
206002:
- 【人物名称@正常】行了我知道错了,我会好好道歉的。
206003:
- 【人物名称@正常】你是住海边的吧,管得这么宽。
206005:
- 【人物名称@正常】你搞错人了吧,我没有做过这种事啊。
#2061:质问完成
206102:
- 【人物名称@正常】嗯,我知道,但你刚才已经说过一遍了。
206103:
- 【人物名称@正常】没有吧,我盯着呢,你明明就没搞定。
206104:
- 【人物名称@正常】我觉得你不像个好人,不管你说什么,我是不会信的。
206105:
- 【人物名称@正常】你在说什么,我没有委托过这种事啊。
#2062:买高档耳机
206202:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206203:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206204:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206205:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2063:买运动手环
206302:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206303:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206304:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206305:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2064:买巧克力
206402:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206403:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206404:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206405:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2065:买茶叶
206502:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206503:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206504:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206505:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2066:买化妆品
206602:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206603:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206604:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206605:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2067:买玩偶
206702:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206703:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206704:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206705:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2067:买精致餐具
206802:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206803:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206804:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206805:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2069:买感冒药
206902:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206903:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206904:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206905:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2070:买红糖
207002:
- 【人物名称@正常】【物品名】已经卖断货了哦。
207003:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
207004:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
207005:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2071:买烟
207102:
- 【人物名称@正常】【物品名】已经卖断货了哦。
207103:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
207104:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
207105:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2072:送礼
207202:
- 【人物名称@正常】谢谢,我很喜欢。
207203:
- 【人物名称@正常】抱歉,我从不贸然收别人礼物。
207205:
- 【人物名称@正常】很抱歉,我好像不需要这个,你还是送给其他人吧。
#2073:恭维
207302:
- 【人物名称@正常】好了好了别夸了,你再夸我可要上天了。
207303:
- 【人物名称@正常】无事献殷勤,非奸即盗,我跟你又不熟,你说这话到底有什么目的。
207305:
- 【人物名称@正常】
#2074:把柄(偷窃)
207402:
- 【人物名称@正常】真的,大哥,别说出去,东西我已经还回去了。
207403:
- 【人物名称@正常】什么偷东西?你亲眼看见了?
207405:
- 【人物名称@正常】你是不是搞错了什么?我没有偷过东西。
#2075:把柄(打游戏)
207502:
- 【人物名称@正常】大哥,别说出去,我真的会给你打掩护。
207503:
- 【人物名称@正常】拜托,大哥我跟你又不熟,你管得着吗。
207505:
- 【人物名称@正常】你是不是记错人了?我从来不打游戏的。
#2076:把柄(做兼职)
207602:
- 【人物名称@正常】你别说出去,我以后保证不会再犯了。
207603:
- 【人物名称@正常】你听谁说的,我不承认。
207605:
- 【人物名称@正常】你是不是搞错人了?我从来不做兼职的。
#2077:把柄(泄密)
207702:
- 【人物名称@正常】好处费我一会就转给你,千万别说出去。
207703:
- 【人物名称@正常】话可不能乱说,小心我告你诽谤。
207705:
- 【人物名称@正常】你是不是搞错了什么,我没有做过这种事情。
#2078:把柄(早退)
207802:
- 【人物名称@正常】我是不会认错的,你想怎样随便你。
207803:
- 【人物名称@正常】不管你怎么说,我是不可能承认的。
207805:
- 【人物名称@正常】我从来没早退过啊,你记错人了吧。
#2079:举报
207902:
- 【人物名称@正常】你已经举报过了,不用再举报一遍。
207903:
- 【人物名称@正常】我没理解你想要举报什么,你最好先和当事人核对清楚再过来举报。
207904:
- 【人物名称@正常】我现在对你还不够信任,举报的事情晚点再说吧。
#2080:澄清
208002:
- 【人物名称@正常】你已经澄清过了,这件事我会处理的。
208003:
- 【人物名称@正常】你这么解释没有说服力,我建议你先找当事人当面对峙一下,再来找我汇报。
208004:
- 【人物名称@正常】你的风评已经差成这样了,还指望我会相信你?
#2081:澄清
208102:
- 【人物名称@正常】你刚才不是说过了吗?难道还有间谍,这不可能吧。
208103:
- 【人物名称@正常】真的是这样吗?你要不再确认一下吧,这么大的事要讲证据。
208104:
- 【人物名称@正常】我不太相信,总不能你说什么就是什么吧。
#---------------------恋综---------------------
600000:
- 【人物名称@正常】你跟我说的不是一回事吧。
#6001
600101:
- 【人物名称@正常】今天‘上午/下午/晚上’跟我去‘场所名称’玩吧
【人物名称@正常】太好了,我们走吧
600102:
- 【人物名称@正常】好吧,我就在这等你,如果改主意了就回来找我
600103:
- 【人物名称@正常】终于决定跟我去【1】玩了吗?
#6002
600202:
- 【人物名称@正常】你已经告白过了。
600203:
- 【人物名称@正常】暂时还不可以告白哦。
600204:
- 【人物名称@正常】现在还没到告白时间。
600205:
- 【人物名称@正常】你找错人了吧。
#6003
600301:
- 【旁白@正常】售货员收了你的爱心券并递给了你‘物品名称’
【人物名称@正常】这是你的‘物品名称’
600302:
- 【旁白@正常】你已经买过一次了。
600304:
- 【旁白@正常】你的爱心券不足,无法兑换这个礼物 。
600303:
- 【旁白@正常】暂时还无法兑换此物品。
#6004
600402:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
600403:
- 【旁白@正常】你花费【条件2】文请了【B】喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
600404:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
600405:
- 【人物名称@正常】。
#6005
600501:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
600502:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
600503:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
600504:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
600505:
- 【人物名称@正常】喝酒还是算了吧。
#6006
600602:
- 【人物名称@正常】刚才已经夸过了哦。
600603:
- 【人物名称@正常】现在说这种话不合适吧。
600604:
- 【人物名称@正常】谢谢,但是不必。
#6007
600701:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
600702:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
600703:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
600704:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
600705:
- 【人物名称@正常】喝酒还是算了吧。
#6008
600802:
- 【人物名称@正常】好啊。
600803:
- 【人物名称@正常】这不太合适,有点太急了吧。
600804:
- 【人物名称@正常】这不太合适,有点太急了吧。
#6009
600902:
- 【人物名称@正常】求签这种事,一次就好,第二次就不准确了哦。
600904:
- 【旁白@正常】您的爱心券好像不太够了。
600903:
- 【人物名称@正常】暂时还不行,晚点再来吧。
#6010
601001:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
601002:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
601003:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
601004:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
601005:
- 【人物名称@正常】喝酒还是算了吧。
#6012
601201:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
601202:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
601203:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
601204:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
601205:
- 【人物名称@正常】喝酒还是算了吧。
#6014
601401:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
601402:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
601403:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
601404:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
601405:
- 【人物名称@正常】喝酒还是算了吧。
#6015
601501:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
601502:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
601503:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
601504:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
601505:
- 【人物名称@正常】喝酒还是算了吧。
#6016
601601:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
601602:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
601603:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
601604:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
601605:
- 【人物名称@正常】喝酒还是算了吧。
#6017
601701:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
601702:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
601703:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
601704:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
601705:
- 【人物名称@正常】喝酒还是算了吧。
#6018
601801:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
601802:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
601803:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
601804:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
601805:
- 【人物名称@正常】喝酒还是算了吧。
#6019
601901:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。 21
601902:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
601903:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
601904:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
601905:
- 【人物名称@正常】喝酒还是算了吧。
#6020
602001:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
602002:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602003:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602004:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602005:
- 【人物名称@正常】喝酒还是算了吧。
#6021
602101:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
602102:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602103:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602104:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602105:
- 【人物名称@正常】喝酒还是算了吧。
#6022
602201:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。 23
602202:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602203:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602204:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602205:
- 【人物名称@正常】喝酒还是算了吧。
#6023
602301:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
602302:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602303:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602304:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602305:
- 【人物名称@正常】喝酒还是算了吧。
#6024
602401:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
602402:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602403:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602404:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602405:
- 【人物名称@正常】喝酒还是算了吧。
#6025
602501:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
602502:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602503:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602504:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602505:
- 【人物名称@正常】喝酒还是算了吧。
#6026
602601:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。 20
602602:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602603:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602604:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602605:
- 【人物名称@正常】喝酒还是算了吧。
#6027
602701:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
602702:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602703:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602704:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602705:
- 【人物名称@正常】喝酒还是算了吧。
#6028
602801:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
602802:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602803:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602804:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602805:
- 【人物名称@正常】喝酒还是算了吧。
#6029
602901:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
602902:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
602903:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
602904:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
602905:
- 【人物名称@正常】喝酒还是算了吧。
#6030
603001:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
603002:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
603003:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
603004:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
603005:
- 【人物名称@正常】喝酒还是算了吧。
#6031
603101:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好……好酒!嗝儿!
【旁白@正常】你花费【条件2】文请【人物名称@正常】喝了一杯,拉近了交情。你与【人物名称@正常】的友好度改变【信任度增减】点,威慑度改变【威慑度增减】点。
603102:
- 【旁白@正常】你请了‘人物名称’喝了一杯酒,他对你的态度变好了一点。
【人物名称@正常】好酒!嗝儿!
【旁白@正常】你又请【人物名称@正常】喝了一杯。可惜刚刚喝过了,信任度没有提升。
603103:
- 【旁白@正常】你花费【条件2】文请了‘人物名称’喝了一杯酒,看来他不是很买账。
【人物名称@正常】酒逢知己千杯少,话不投机半句多……
603104:
- 【旁白@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
603105:
- 【人物名称@正常】喝酒还是算了吧。
603602:
- 【人物名称@正常】已经画完了。
603603:
- 【人物名称@正常】你在说什么?
603605:
- 【人物名称@正常】你在说什么?
#6037
603702:
- 【人物名称@正常】已经画完了。
603703:
- 【人物名称@正常】你在说什么?
603705:
- 【人物名称@正常】你在说什么?
#6038
603801:
603802:
- 【人物名称@正常】鬼屋已经闭馆了哦,你不是刚从鬼屋出来吗。
603803:
- 【人物名称@正常】鬼屋暂不开放。
603805:
- 【人物名称@正常】鬼屋暂不对外营业。
#6039
603902:
- 【人物名称@正常】你们不是刚从迷宫出来么,还进去干什么。
603903:
- 【人物名称@正常】迷宫咱不开放。
603905:
- 【人物名称@正常】迷宫暂时不营业。
#6053
605302:
- 【人物名称@正常】拍卖已经结束了哦。
605303:
- 【人物名称@正常】拍卖尚未开始。
605305:
- 【人物名称@正常】你在说什么,这里可没有拍卖。
#6054
605402:
- 【人物名称@正常】你不是才涂过么,还涂什么。
605403:
- 【人物名称@正常】这里不可以涂鸦,至少现在不行。
605405:
- 【人物名称@正常】这里不准涂鸦。
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment