Commit a665650b by 周君强

1.线上问题修复

parent 1b803042
......@@ -173,6 +173,10 @@ public class Constants {
*/
public static final Integer BUY_GOODS = 4001;
/**
* 购买物品
*/
public static final Integer SELL_ITEMS = 4002;
/**
* 查看商品
*/
public static final Integer CHECK_GOODS = 4003;
......
......@@ -360,16 +360,23 @@ public class TimingAcquisition {
* 更新动态词组到bot服务器
*/
public static void updatePhraseToBotServer() {
//更新玩家地址的动态词组
// //更新玩家地址的动态词组
// if (addressMap.size() != 0 ) {
// //所有玩家地址
// List<String> playerList = new ArrayList<>();
// for (String region : addressMap.keySet()) {
// List<String> regionPlayerList = new ArrayList<>(addressMap.get(region).keySet());
// playerList.addAll(regionPlayerList);
// }
// String address = String.join("+", playerList);
// HttpUtil.doPut("项目词组玩家地址", address);
// }
//更新玩家地区的动态词组
if (addressMap.size() != 0 ) {
//所有玩家地址
List<String> playerList = new ArrayList<>();
for (String region : addressMap.keySet()) {
List<String> regionPlayerList = new ArrayList<>(addressMap.get(region).keySet());
playerList.addAll(regionPlayerList);
}
String address = String.join("+", playerList);
HttpUtil.doPut("项目词组玩家地址", address);
//所有玩家地区
List<String> regionList = regionIPMap.values().stream().map(RegionPojo::getPlace).collect(Collectors.toList());
String regions = String.join("+", regionList);
HttpUtil.doPut("项目词组玩家地址", regions);
}
//更新植物名称的动态词组
if (plantMap.size() != 0) {
......@@ -1557,8 +1564,6 @@ public class TimingAcquisition {
//该地区所有玩家地址
Map<String, RegionDto> regionMap = addressMap.get(place);
List<String> addressList = new ArrayList<>(regionMap.keySet());
//去除玩家本人
addressList.removeIf(location::contains);
addressList.sort(new Comparator<String>() {
@Override
public int compare(String s, String t1) {
......@@ -1566,7 +1571,10 @@ public class TimingAcquisition {
}
});
int pos = addressList.indexOf(location);
if (addressList.size() == 1) {
List<String> addressCopyList = new ArrayList<>(addressList);
//去除玩家本人
addressCopyList.removeIf(location::contains);
if (addressCopyList.size() == 0) {
return null;
}
//已经是最后一个
......
......@@ -356,6 +356,26 @@ public class RequestConversionUtil {
if (!StringUtils.isEmpty(address)) {
operationRequest.setAddress(address);
}
//-------------存在玩家地区------------
String addressRegion = callRequest.get玩家地区();
if (!StringUtils.isEmpty(addressRegion)) {
if ("随机".equals(addressRegion)) {
operationRequest.setAddress(addressRegion);
} else {
//-------------存在地区编号------------
String addressNum = callRequest.get地区编号();
if (!StringUtils.isEmpty(addressNum)) {
//找到中文数字对应的阿拉伯数字
Integer number = TypeConvertUtil.change2Integer(addressNum);
//中文中不包含中文数字时,提取阿拉伯数字
if (number == 0) {
number = TypeConvertUtil.extractNum(addressNum);
}
String numStr = String.format("%04d", number); //1转成0001
operationRequest.setAddress(addressRegion + numStr);
}
}
}
//----------存在植物状态--------------
String plantStatus = callRequest.get植物状态();
if (!StringUtils.isEmpty(plantStatus)) {
......
......@@ -109,6 +109,14 @@ public class CallRequest {
*/
private String 玩家地址;
/**
* 玩家地区
*/
private String 玩家地区;
/**
* 地区编号
*/
private String 地区编号;
/**
* 植物状态
*/
private String 植物状态;
......
......@@ -4,13 +4,15 @@ import com.qiwuai.garden.dto.base.CommonResponse;
import com.qiwuai.garden.dto.request.OperationRequest;
import com.qiwuai.garden.dto.response.PhraseResponse;
import java.text.ParseException;
public interface GardenerService {
/**
* 进入游戏。清除该玩家现有缓存
* @param
* @param
*/
CommonResponse enterGame(OperationRequest operationReq);
CommonResponse enterGame(OperationRequest operationReq) throws ParseException;
/**
* 创建园丁
* @param
......
......@@ -45,7 +45,7 @@ public class GardenerServiceImpl implements GardenerService {
String expireTime = YamlUtil.getValueByKey("expireTime");
@Override
public CommonResponse enterGame(OperationRequest operationReq) {
public CommonResponse enterGame(OperationRequest operationReq) throws ParseException {
CommonResponse commonResponse = new CommonResponse();
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
......@@ -83,8 +83,44 @@ public class GardenerServiceImpl implements GardenerService {
e.printStackTrace();
}
}
//玩家间隔登录超过简报过期后,简报提示消息的个数置0
long subTime = DateUtil.subTime(DateUtil.getCurrentTime(), gardener.getOfflineTime());
subTime = subTime/(60 * 60); //单位为小时
//帮助简报保留时间
String helpReportKeepTime = TimingAcquisition.systemConfigMap.get("help_report_keep_time").getValue();
//留言保留时间
String messageKeepTime = TimingAcquisition.systemConfigMap.get("message_keep_time").getValue();
//获取玩家的所有消息提醒
Map<String, Integer> notice = TimingAcquisition.gardenerMap.get(uid).getNotice();
if (subTime > Long.parseLong(helpReportKeepTime)) {
//偷菜简报提示个数设置为0
if (!StringUtils.isEmpty(notice.get(Constants.STEAL_REPORT_NOTICE))) {
if (notice.get(Constants.STEAL_REPORT_NOTICE) > 0) {
notice.put(Constants.STEAL_REPORT_NOTICE, 0);
}
}
//帮助简报提示个数设置为0
if (!StringUtils.isEmpty(notice.get(Constants.HELP_REPORT_NOTICE))) {
if (notice.get(Constants.HELP_REPORT_NOTICE) > 0) {
notice.put(Constants.HELP_REPORT_NOTICE, 0);
}
}
}
if (subTime > Long.parseLong(messageKeepTime)) {
//好友留言提示个数设置为0
if (!StringUtils.isEmpty(notice.get(Constants.MESSAGE_NOTICE))) {
if (notice.get(Constants.MESSAGE_NOTICE) > 0) {
notice.put(Constants.MESSAGE_NOTICE, 0);
}
}
}
//清除缓存,本轮对话结束
CacheGlobal.concurrentMap.remove(uid);
//---------------------------持久化该园丁信息----------------------------
Map<String, GardenerDto> gardenerMap = new ConcurrentHashMap<>();
gardenerMap.put(uid, TimingAcquisition.gardenerMap.get(uid));
String gardenerStr = JSON.toJSONString(gardenerMap);
PersistenceUtil.saveDataToFile(uid, gardenerStr);
//获取对应话术
String text = SpeechUtil.getGardenerSpeech(Constants.SPEECH_ASIDE, "enter_game");
commonResponse.setCode(1);
......@@ -219,8 +255,8 @@ public class GardenerServiceImpl implements GardenerService {
playerList.addAll(regionPlayerList);
}
String address = String.join("+", playerList);
HttpUtil.doPut("项目词组玩家地址", address);
HttpUtil.doPutCrazyGardener("项目词组玩家地址", address);
// HttpUtil.doPut("项目词组玩家地址", address);
// HttpUtil.doPutCrazyGardener("项目词组玩家地址", address);
}
//玩家初始宠物id
String initialPet = TimingAcquisition.systemConfigMap.get("initial_pet").getValue();
......
......@@ -357,6 +357,7 @@ public class MarketServiceImpl implements MarketService {
commonResponse.setMsg("成功");
resultResponse.set反馈ID(400103);
resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("购买物品回复3");
resultVarsResponse.setVars(resultResponse);
commonResponse.setData(resultVarsResponse);
return commonResponse;
......@@ -449,14 +450,17 @@ public class MarketServiceImpl implements MarketService {
OperationRequest lastReq = (OperationRequest) CacheUtil.get(uid);
//存在上一轮对话
if (!StringUtils.isEmpty(lastReq)) {
itemId =( itemId == null) ? lastReq.getItemId() : itemId; //需要出售的物品id
itemTypeId = (itemTypeId == null) ? lastReq.getItemTypeId() : itemTypeId; //物品类型
number = (number == null) ? lastReq.getNumber() : number; //出售物品的数量
if (Constants.SELL_ITEMS.equals(lastReq.getOperationLabel())) {
itemId = (itemId == null) ? lastReq.getItemId() : itemId; //需要出售的物品id
itemTypeId = (itemTypeId == null) ? lastReq.getItemTypeId() : itemTypeId; //物品类型
number = (number == null) ? lastReq.getNumber() : number; //出售物品的数量
}
}
//保存玩家这轮的请求信息,用于下一步的操作
operationReq.setItemId(itemId);
operationReq.setItemTypeId(itemTypeId);
operationReq.setNumber(number);
operationReq.setOperationLabel(Constants.SELL_ITEMS);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//园丁性别
String gender = TimingAcquisition.getGardenerGender(uid);
......@@ -559,6 +563,7 @@ public class MarketServiceImpl implements MarketService {
operationReq.setItemId(itemId);
operationReq.setItemTypeId(itemTypeId);
operationReq.setNumber(item.getItemNum()); //保存最大数量,提供给下一步操作
operationReq.setOperationLabel(Constants.SELL_ITEMS);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
commonResponse.setCode(1);
commonResponse.setMsg("成功");
......@@ -576,6 +581,7 @@ public class MarketServiceImpl implements MarketService {
operationReq.setItemId(itemId);
operationReq.setItemTypeId(itemTypeId);
operationReq.setNumber(item.getItemNum()); //保存最大数量,提供给下一步操作
operationReq.setOperationLabel(Constants.SELL_ITEMS);
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//获取对应话术
String text = SpeechUtil.getMarketSpeech(Constants.SPEECH_ASIDE, "sell_check_success");
......
......@@ -156,7 +156,7 @@ public class NurseryServiceImpl implements NurseryService {
//花圃中植物的信息
plant = TimingAcquisition.plantMap.get(nurseryInfo.getPlantId());
//当前时间大于开花期的最后时间,即已进入成熟期
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) {
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) {
//------------------------植物成熟后吸引宠物过来-----------------------
RandomDropUtil.getPetByPlantMature(uid, nurseryNum, nurseryInfo);
String petText = "";
......@@ -262,18 +262,18 @@ public class NurseryServiceImpl implements NurseryService {
NurseryInfoDto nurseryInfo = entry.getValue();
String nowTime = DateUtil.getCurrentTime();
//植物生长期判断
if (nurseryInfo.getStatus() != Constants.PLANT_NO) {
if (!StringUtils.isEmpty(nurseryInfo.getPlantTime())) {
//当前时间大于开花期的最后时间,即已进入成熟期
if (nowTime.compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) {
if (nowTime.compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) {
matureNumList.add(entry.getKey());
//花圃还没有宠物,则有一定几率吸引宠物到来
//------------------------植物成熟后吸引宠物过来-----------------------
RandomDropUtil.getPetByPlantMature(uid, entry.getKey(), nurseryInfo);
} else if (nowTime.compareTo(nurseryInfo.getPlantTime().getGrowingTime()) > 0) {
} else if (nowTime.compareTo(nurseryInfo.getPlantTime().getGrowingTime()) >= 0) {
bloomingNumList.add(entry.getKey());
} else if (nowTime.compareTo(nurseryInfo.getPlantTime().getSowingTime()) > 0) {
} else if (nowTime.compareTo(nurseryInfo.getPlantTime().getSowingTime()) >= 0) {
growingNumList.add(entry.getKey());
} else if (nowTime.compareTo(nurseryInfo.getPlantTime().getSeedingTime()) > 0) {
} else if (nowTime.compareTo(nurseryInfo.getPlantTime().getSeedingTime()) >= 0) {
sowingNumList.add(entry.getKey());
} else {
seedingNumList.add(entry.getKey());
......
......@@ -863,9 +863,10 @@ public class PlantServiceImpl implements PlantService {
resultResponse.set任务完成("10014");
}
}
String subTime = DateUtil.subTimeToDate(nurseryInfo.getPlantTime().getMatureTime(), DateUtil.getCurrentTime());
//获取对应话术
String text = SpeechUtil.getPlantSpeech(Constants.SPEECH_ASIDE, "plant_success");
text = SpeechUtil.speechReplaceNum(text, nurseryNum.toString(), plant.getName());
text = SpeechUtil.speechReplaceNum(text, nurseryNum.toString(), plant.getName(), subTime);
text += SpeechUtil.getPlantSpeech(gender, "plant_success");
text = SpeechUtil.speechReplaceNum(text, callName.getName(), callName.getSubName());
text += updateTaskResult.getResultText(); //养成任务事件[播种]完成提醒
......@@ -1583,7 +1584,7 @@ public class PlantServiceImpl implements PlantService {
}
//触发植物成熟判断
if (!StringUtils.isEmpty(nurseryInfo.getPlantTime())) { //已经种植了植物
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) { //当前时间大于开花期的最后时间,即进入成熟
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) { //当前时间大于开花期的最后时间,即进入成熟
//------------------------植物成熟后数据更新-----------------------
RandomDropUtil.plantMature(uid, nurseryNum, nurseryInfo);
nurseryInfo.setStatus(Constants.PLANT_MATURE); //花圃中植物状态改为已成熟
......@@ -1695,7 +1696,7 @@ public class PlantServiceImpl implements PlantService {
}
//触发植物成熟判断
if (!StringUtils.isEmpty(nurseryInfo.getPlantTime())) { //已经种植了植物
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) { //当前时间大于开花期的最后时间,即进入成熟期
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) { //当前时间大于开花期的最后时间,即进入成熟期
//------------------------植物成熟后数据更新-----------------------
RandomDropUtil.plantMature(uid, entry.getKey(), nurseryInfo); //花圃中植物成熟,一定概率掉落物品
nurseryInfo.setStatus(Constants.PLANT_MATURE); //花圃中植物状态改为已成熟
......@@ -1857,7 +1858,7 @@ public class PlantServiceImpl implements PlantService {
}
//触发植物成熟判断
if (!StringUtils.isEmpty(nurseryInfo.getPlantTime())) { //已经种植了植物
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) { //当前时间大于开花期的最后时间,即进入成熟
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) { //当前时间大于开花期的最后时间,即进入成熟
//------------------------植物成熟后数据更新-----------------------
RandomDropUtil.plantMature(uid, nurseryNum, nurseryInfo);
nurseryInfo.setStatus(Constants.PLANT_MATURE); //花圃中植物状态改为已成熟
......@@ -2558,7 +2559,7 @@ public class PlantServiceImpl implements PlantService {
//2.1 花圃中的植物已经成熟
String nowTime = DateUtil.getCurrentTime();
//当前时间大于开花期的最后时间,即已进入成熟期
if (nowTime.compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) {
if (nowTime.compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) {
log.info(uid + "的花圃" + nurseryNumList.get(0) + "中的" + plantName + "已经成熟");
//------------------------植物成熟后吸引宠物过来-----------------------
RandomDropUtil.getPetByPlantMature(uid, nurseryNumList.get(0), nurseryInfo);
......@@ -2683,7 +2684,7 @@ public class PlantServiceImpl implements PlantService {
//2.花圃中的植物已经成熟
String nowTime = DateUtil.getCurrentTime();
//当前时间大于开花期的最后时间,即已进入成熟期
if (nowTime.compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) {
if (nowTime.compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) {
log.info(uid + "的花圃" + nurseryNum + "中的" + plantName + "已经成熟");
//------------------------植物成熟后吸引宠物过来-----------------------
RandomDropUtil.getPetByPlantMature(uid, nurseryNum, nurseryInfo);
......@@ -2979,6 +2980,8 @@ public class PlantServiceImpl implements PlantService {
Map<Integer, PlantPeriodDto> periodTempMap = TimingAcquisition.periodMap.get(nurseryInfo.getPlantId());
//更新植物所有生长期的所需时间
PlantTimeDto plantTime = new PlantTimeDto();
plantTime.setSeedingTime(nurseryInfo.getPlantTime().getSeedingTime());
plantTime.setSowingTime(nurseryInfo.getPlantTime().getSowingTime());
plantTime.setGrowingTime(DateUtil.addTime(nurseryInfo.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_GROWING).getEndTime()));
plantTime.setBloomingTime(DateUtil.addTime(nurseryInfo.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_BLOOMING).getEndTime()));
plantTime.setMatureTime(DateUtil.addTime(nurseryInfo.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_MATURE).getEndTime()));
......
......@@ -117,15 +117,11 @@ public class SocialServiceImpl implements SocialService {
//没有找到相邻玩家
if (StringUtils.isEmpty(nearestAddress)) {
//获取对应话术
String text = SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "visit_stranger_check_fail_no_exist");
text = SpeechUtil.speechReplaceNum(text, nearestAddress);
text += SpeechUtil.getSocialSpeech(gender, "visit_stranger_check_fail_no_exist");
text = SpeechUtil.speechReplaceNum(text, callName.getName(), callName.getSubName());
String text = SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "visit_stranger_check_fail_none");
commonResponse.setCode(1);
commonResponse.setMsg("成功");
resultResponse.set反馈ID(500108);
resultResponse.set反馈ID(500114);
resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("是否拜访相邻玩家");
resultVarsResponse.setVars(resultResponse);
commonResponse.setData(resultVarsResponse);
return commonResponse;
......@@ -1261,7 +1257,7 @@ public class SocialServiceImpl implements SocialService {
}
//触发植物成熟判断
if (!StringUtils.isEmpty(nurseryInfo.getPlantTime())) { //已经种植了植物
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) { //当前时间大于开花期的最后时间,即进入成熟期
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) { //当前时间大于开花期的最后时间,即进入成熟期
nurseryInfo.setStatus(Constants.PLANT_MATURE); //花圃中植物状态改为已成熟
friendAddressMatureList.add(friend.getAddress());
break;
......@@ -1853,7 +1849,7 @@ public class SocialServiceImpl implements SocialService {
NurseryInfoDto nurseryInfo = entry.getValue();
//触发植物成熟判断
if (!StringUtils.isEmpty(nurseryInfo.getPlantId()) && !StringUtils.isEmpty(nurseryInfo.getPlantTime())) { //已经种植了植物
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) { //当前时间大于开花期的最后时间,即进入成熟期
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) { //当前时间大于开花期的最后时间,即进入成熟期
RandomDropUtil.getPetByPlantMature(uidSide, entry.getKey(), nurseryInfo);
nurseryInfo.setStatus(Constants.PLANT_MATURE); //花圃中植物状态改为已成熟
nurseryMatureList.add(entry.getKey());
......@@ -1987,7 +1983,7 @@ public class SocialServiceImpl implements SocialService {
//已种植物的配置信息
PlantPojo plantConfig = TimingAcquisition.plantMap.get(nurseryInfo.getPlantId());
//当前时间大于开花期的最后时间,即已进入成熟期
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) > 0) {
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) >= 0) {
//获取对应话术
text = SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "garden_check_mature");
text = SpeechUtil.speechReplaceNum(text, nurseryNum.toString(), plantConfig.getName(), feedText, answer);
......@@ -2463,12 +2459,18 @@ public class SocialServiceImpl implements SocialService {
}
}
}
//对方所在地区
String place = TypeConvertUtil.extractChinese(address);
//对方uid
String uidSide = TimingAcquisition.addressMap.get(place).get(address).getUid();
//1.玩家未提供花圃编号
if (StringUtils.isEmpty(nurseryNum)) {
//保存玩家这轮的请求信息,用于下一步操作
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
String nurseryText = TimingAcquisition.getAllNurseryNum(uidSide);
//获取对应话术
String text = SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "steal_stranger_cross");
String text = SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "steal_fail_no_nursery");
text = SpeechUtil.speechReplaceNum(text, nurseryText);
text += SpeechUtil.getSocialSpeech(gender, "steal_fail_no_nursery");
text = SpeechUtil.speechReplaceNum(text, callName.getName(), callName.getSubName());
commonResponse.setCode(1);
......@@ -2496,10 +2498,6 @@ public class SocialServiceImpl implements SocialService {
commonResponse.setData(resultVarsResponse);
return commonResponse;
}
//对方所在地区
String place = TypeConvertUtil.extractChinese(address);
//对方uid
String uidSide = TimingAcquisition.addressMap.get(place).get(address).getUid();
//对方当前花圃信息
NurseryInfoDto nurseryInfo = TimingAcquisition.gardenerMap.get(uidSide).getGarden().getNurseryInfos().get(nurseryNum);
//3.对方玩家没有该花圃编号
......@@ -2615,7 +2613,7 @@ public class SocialServiceImpl implements SocialService {
return commonResponse;
}
//9.对方该花圃的植物还未成熟
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) <= 0) {
if (DateUtil.getCurrentTime().compareTo(nurseryInfo.getPlantTime().getBloomingTime()) < 0) {
log.info(uid + "偷菜失败,花圃" + nurseryNum + "的植物还未成熟");
//获取对应话术
String text = SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "steal_fail_no_mature");
......@@ -4668,14 +4666,18 @@ public class SocialServiceImpl implements SocialService {
operationReq.setRoundFightMap(stealReport.getRoundFightMap());
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
String result = (Constants.DEFEND_SUCCESS.equals(stealReport.getFightResult())) ? "对方" : "我方";
//获取对应话术
String text = SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "fight_detail_check");
text = SpeechUtil.speechReplaceNum(text, String.valueOf(stealReport.getPetSideList().size()), petText.toString(),
String.valueOf(stealReport.getPetList().size()), petSideText.toString(), String.valueOf(stealReport.getRoundFightMap().size()), result);
String text = "";
//对方玩家宠物栏没有宠物,我方不战而胜
if (stealReport.getPetList().size() != 0) {
if (stealReport.getPetList().size() == 0) {
text += SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "fight_detail_check_no_fight");
text = SpeechUtil.speechReplaceNum(text, String.valueOf(stealReport.getPetSideList().size()), petText.toString(),
String.valueOf(stealReport.getPetList().size()), result);
} else {
//获取对应话术
text = SpeechUtil.getSocialSpeech(Constants.SPEECH_ASIDE, "fight_detail_check");
text = SpeechUtil.speechReplaceNum(text, String.valueOf(stealReport.getPetSideList().size()), petText.toString(),
String.valueOf(stealReport.getPetList().size()), petSideText.toString(), String.valueOf(stealReport.getRoundFightMap().size()), result);
text += SpeechUtil.getSocialSpeech(gender, "fight_detail_check");
text = SpeechUtil.speechReplaceNum(text, callName.getName(), callName.getSubName());
resultResponse.set后台附加返回("获取战斗轮次");
}
commonResponse.setCode(1);
......@@ -7400,6 +7402,8 @@ public class SocialServiceImpl implements SocialService {
//更新植物所有生长期的所需时间
PlantTimeDto plantTime = new PlantTimeDto();
try {
plantTime.setSeedingTime(nurseryInfoSide.getPlantTime().getSeedingTime());
plantTime.setSowingTime(nurseryInfoSide.getPlantTime().getSowingTime());
plantTime.setGrowingTime(DateUtil.addTime(nurseryInfoSide.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_GROWING).getEndTime()));
plantTime.setBloomingTime(DateUtil.addTime(nurseryInfoSide.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_BLOOMING).getEndTime()));
plantTime.setMatureTime(DateUtil.addTime(nurseryInfoSide.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_MATURE).getEndTime()));
......@@ -7571,6 +7575,8 @@ public class SocialServiceImpl implements SocialService {
//更新植物所有生长期的所需时间
PlantTimeDto plantTime = new PlantTimeDto();
try {
plantTime.setSeedingTime(nurseryInfoSide.getPlantTime().getSeedingTime());
plantTime.setSowingTime(nurseryInfoSide.getPlantTime().getSowingTime());
plantTime.setGrowingTime(DateUtil.addTime(nurseryInfoSide.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_GROWING).getEndTime()));
plantTime.setBloomingTime(DateUtil.addTime(nurseryInfoSide.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_BLOOMING).getEndTime()));
plantTime.setMatureTime(DateUtil.addTime(nurseryInfoSide.getSeedingTime(), (int) periodTempMap.get(Constants.PLANT_MATURE).getEndTime()));
......
spring:
profiles:
active: dev
\ No newline at end of file
active: uat
\ No newline at end of file
......@@ -52,7 +52,7 @@ aside:
goods_check_item_success:
- 【旁白@正常】【1】,【2】,【3】。
goods_check_fail_no_name:
- 【旁白@正常】商店里现在有材料、果实两种大类的产品,你有感兴趣想看的吗?你也可以同时告诉我物品的等级或属性,会更精确找到您想要购买的商品。
- 【旁白@正常】商店里现在有材料、果实两种大类的产品,你有感兴趣想看的吗?同时你也可以告诉我想要查找的的物品的等级或属性,这样我会更精确找到您想要购买的商品。
goods_check_fail_type_no_exist:
- 【旁白@正常】这类商品不存在。商店里现在有材料、果实两种大类的产品,你有感兴趣想看的吗?你也可以同时告诉我物品的等级或属性,会更精确找到您想要购买的商品。
goods_check_fail_level_over:
......
......@@ -6,7 +6,7 @@ aside:
plant_cancel:
- 【旁白@正常】已为你取消在【1】号{花圃称呼}种植【2】。
plant_success:
- 【旁白@正常】我已经按照你的吩咐,在【1】号{花圃称呼}种上了【2】植物。
- 【旁白@正常】我已经按照你的吩咐,在【1】号{花圃称呼}种上了【2】植物。【3】后可以成熟,记得来收取哦。
plant_success_fail_no_pre:
- 【旁白@正常】你还未检查种植条件,请先确定你想种植的植物是否能在指定{花圃称呼}中种植。
plant_fail_no_nursery:
......@@ -122,7 +122,7 @@ aside:
nursery_all_fail_no_plant:
- 【旁白@正常】所有{花圃称呼}还未种植。
nursery_all_check:
- 【旁白@正常】【1】。
- 【旁白@正常】【1】。可以去收取果实了。
nursery_all_seeding:
- 中的【1】刚刚播种了,
nursery_all_sowing:
......
......@@ -5,6 +5,8 @@ aside:
- 【旁白@正常】你正在拜访【1】。
visit_stranger_check_fail_no_exist:
- 【旁白@正常】不存在该玩家。已为你找到最近的玩家【1】,是否前往?
visit_stranger_check_fail_none:
- 【旁白@正常】不存在该玩家。目前暂无邻居可拜访。
visit_stranger_check_cross:
- 【旁白@正常】前往【1】区域需要花费【2】【3】,是否前往?
visit_stranger_check_cross_fail:
......@@ -82,6 +84,8 @@ aside:
- 【旁白@正常】在【1】号{花圃称呼}没有收取到东西,需要查看战斗详情吗?
steal_stranger_cross:
- 【旁白@正常】已进入【1】的花园。
steal_fail_no_nursery:
- 【旁白@正常】你还未提供花圃编号,暂时无法攻打。目前对方有【1】。
steal_fail_not_exist:
- 【旁白@正常】【1】这里没有这个{花圃称呼}。
steal_fail_unusable:
......@@ -241,6 +245,8 @@ aside:
- 【旁白@正常】【1】
fight_detail_check:
- 【旁白@正常】本次战斗我方上阵宠物【1】只,【2】对方上阵宠物【3】只,【4】一共进行了【5】轮次,【6】获得了胜利。
fight_detail_check_no_fight:
- 【旁白@正常】本次战斗我方上阵宠物【1】只,【2】对方上阵宠物【3】只,不战而胜,【4】获得了胜利。
fight_detail_check_fail_no_pre:
- 【旁白@正常】暂时无法查看战斗详情,请先查看防守简报。
fight_detail_play_fail_none:
......@@ -433,7 +439,7 @@ man:
garden_check_fail_no_exist:
- 【男园丁@正常】【1】,我们确实没有这个{花圃称呼}。
garden_check_fail_none:
- 【男园丁@正常】还不知道【1】想看谁的{花圃称呼}呢。
- 【男园丁@正常】还不知道【1】想看谁的{花圃称呼}呢。想查看自己的{花圃称呼}的话,请先对我说“我要回家”。
#偷菜
steal_success:
- 【男园丁@正常】我们的宠物越来越强了,竟然连这样的战斗都能打赢,还是【1】【2】驯养的好!
......@@ -654,7 +660,7 @@ woman:
garden_check_fail_no_exist:
- 【女园丁@正常】【1】,是没有这个{花圃称呼}呀。
garden_check_fail_none:
- 【女园丁@正常】【1】,【2】想看谁的{花圃称呼}呢。
- 【女园丁@正常】【1】,【2】想看谁的{花圃称呼}呢。想查看自己的{花圃称呼}的话,请先对我说“我要回家”。
#偷菜
steal_success:
- 【女园丁@正常】这些宠物们也太厉害了,回去一定要好好犒劳他们啊【1】!
......
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