Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
secret-garden-game
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周君强
secret-garden-game
Commits
290107a1
Commit
290107a1
authored
Aug 30, 2022
by
周君强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.bug修复和代码优化;
2.技能加成; 3.玩家称呼替换。
parent
473b78fa
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
2091 additions
and
877 deletions
+2091
-877
Constants.java
src/main/java/com/qiwuai/garden/common/Constants.java
+84
-1
ProxyFactory.java
src/main/java/com/qiwuai/garden/common/ProxyFactory.java
+18
-0
TimingAcquisition.java
...main/java/com/qiwuai/garden/common/TimingAcquisition.java
+444
-32
ScheduleTask.java
.../java/com/qiwuai/garden/common/schedule/ScheduleTask.java
+1
-1
HttpUtil.java
src/main/java/com/qiwuai/garden/common/utils/HttpUtil.java
+2
-2
RandomDropUtil.java
...n/java/com/qiwuai/garden/common/utils/RandomDropUtil.java
+19
-14
RequestConversionUtil.java
...com/qiwuai/garden/common/utils/RequestConversionUtil.java
+22
-0
CommonController.java
...n/java/com/qiwuai/garden/controller/CommonController.java
+23
-1
ResultResponse.java
src/main/java/com/qiwuai/garden/dto/base/ResultResponse.java
+17
-2
CallRequest.java
src/main/java/com/qiwuai/garden/dto/request/CallRequest.java
+5
-0
OperationRequest.java
.../java/com/qiwuai/garden/dto/request/OperationRequest.java
+4
-0
ItemPojo.java
src/main/java/com/qiwuai/garden/pojo/ItemPojo.java
+4
-0
PetPojo.java
src/main/java/com/qiwuai/garden/pojo/PetPojo.java
+4
-0
PlantPojo.java
src/main/java/com/qiwuai/garden/pojo/PlantPojo.java
+4
-0
BackPackServiceImpl.java
...den/service/backPackService/impl/BackPackServiceImpl.java
+23
-5
GardenerServiceImpl.java
...den/service/gardenerService/impl/GardenerServiceImpl.java
+152
-31
HelpServiceImpl.java
...wuai/garden/service/helpService/impl/HelpServiceImpl.java
+7
-3
MarketService.java
...om/qiwuai/garden/service/marketService/MarketService.java
+18
-0
MarketServiceImpl.java
.../garden/service/marketService/impl/MarketServiceImpl.java
+120
-31
NurseryServiceImpl.java
...arden/service/nurseryService/impl/NurseryServiceImpl.java
+103
-23
PetServiceImpl.java
...qiwuai/garden/service/petService/impl/PetServiceImpl.java
+145
-11
PlantServiceImpl.java
...ai/garden/service/plantService/impl/PlantServiceImpl.java
+241
-124
SocialServiceImpl.java
.../garden/service/socialService/impl/SocialServiceImpl.java
+0
-0
TaskServiceImpl.java
...wuai/garden/service/taskService/impl/TaskServiceImpl.java
+8
-0
application-uat.yml
src/main/resources/application-uat.yml
+2
-2
application.yml
src/main/resources/application.yml
+2
-2
ItemMapper.xml
src/main/resources/com/qiwuai/garden/dao/ItemMapper.xml
+1
-1
PetMapper.xml
src/main/resources/com/qiwuai/garden/dao/PetMapper.xml
+1
-1
PlantMapper.xml
src/main/resources/com/qiwuai/garden/dao/PlantMapper.xml
+1
-1
gardener.yaml
src/main/resources/speech/gardener.yaml
+94
-82
help.yaml
src/main/resources/speech/help.yaml
+7
-7
market.yaml
src/main/resources/speech/market.yaml
+43
-41
pet.yaml
src/main/resources/speech/pet.yaml
+112
-111
plant.yaml
src/main/resources/speech/plant.yaml
+144
-140
social.yaml
src/main/resources/speech/social.yaml
+184
-176
task.yaml
src/main/resources/speech/task.yaml
+32
-32
No files found.
src/main/java/com/qiwuai/garden/common/Constants.java
View file @
290107a1
...
@@ -193,13 +193,21 @@ public class Constants {
...
@@ -193,13 +193,21 @@ public class Constants {
*/
*/
public
static
final
Integer
ADD_FRIEND_CHECK
=
5009
;
public
static
final
Integer
ADD_FRIEND_CHECK
=
5009
;
/**
/**
* 查看留言
*/
public
static
final
Integer
READ_MESSAGE
=
5012
;
/**
* 查看帮助简报
* 查看帮助简报
*/
*/
public
static
final
Integer
CHECK_HELP_REPORT
=
5013
;
public
static
final
Integer
CHECK_HELP_REPORT
=
5013
;
/**
/**
* 查看
偷菜
简报
* 查看
防守
简报
*/
*/
public
static
final
Integer
CHECK_STEAL_REPORT
=
5014
;
public
static
final
Integer
CHECK_STEAL_REPORT
=
5014
;
/**
* 消息推送
*/
public
static
final
Integer
CHECK_NOTICE
=
5018
;
/**
/**
...
@@ -238,6 +246,81 @@ public class Constants {
...
@@ -238,6 +246,81 @@ public class Constants {
/**
/**
* ----------------------------技能ID----------------------
* 初级种植
*/
public
static
final
int
PRIMARY_PLANT
=
1001
;
/**
* 初级驯养
*/
public
static
final
int
PRIMARY_TRAIN
=
1002
;
/**
* 园地维护
*/
public
static
final
int
GARDEN_CARE
=
1003
;
/**
* 护栏加固
*/
public
static
final
int
GARDEN_DEFEND
=
1004
;
/**
* 中级种植
*/
public
static
final
int
INTER_PLANT
=
1005
;
/**
* 中级驯养
*/
public
static
final
int
INTER_TRAIN
=
1006
;
/**
* 高效养护
*/
public
static
final
int
HIGH_EFF_CARE
=
1007
;
/**
* 战斗训练
*/
public
static
final
int
FIGHT_TRAIN
=
1008
;
/**
* 催生术
*/
public
static
final
int
SPEED_UP_PLANT
=
1009
;
/**
* 勇气训练
*/
public
static
final
int
BRAVE_TRAIN
=
1010
;
/**
* 高级种植
*/
public
static
final
int
HIGH_PLANT
=
1011
;
/**
* 高级驯养
*/
public
static
final
int
HIGH_TRAIN
=
1012
;
/**
* 花圃维护
*/
public
static
final
int
NURSERY_CARE
=
1013
;
/**
* 高效克制
*/
public
static
final
int
HIGH_EFF_RESTRAIN
=
1014
;
/**
* 收集专家
*/
public
static
final
int
COLLECT_EXPERT
=
1015
;
/**
* 高效防护
*/
public
static
final
int
HIGH_EFF_DEFEND
=
1016
;
/**
* 植物之心
*/
public
static
final
int
PLANT_HEART
=
1017
;
/**
* 宠物之心
*/
public
static
final
int
PET_HEART
=
1018
;
/**
* 帮助标记:0-未帮助
* 帮助标记:0-未帮助
*/
*/
public
static
final
int
HELP_NO_SIGN
=
0
;
public
static
final
int
HELP_NO_SIGN
=
0
;
...
...
src/main/java/com/qiwuai/garden/common/ProxyFactory.java
View file @
290107a1
...
@@ -68,6 +68,21 @@ public class ProxyFactory {
...
@@ -68,6 +68,21 @@ public class ProxyFactory {
Integer
moneyNum
=
TimingAcquisition
.
gardenerMap
.
get
(
request
.
getUid
()).
getBackPack
().
getItemBags
()
Integer
moneyNum
=
TimingAcquisition
.
gardenerMap
.
get
(
request
.
getUid
()).
getBackPack
().
getItemBags
()
.
get
(
Constants
.
ITEM_TYPE_MONEY
).
getItems
(
moneyId
).
getItemNum
();
.
get
(
Constants
.
ITEM_TYPE_MONEY
).
getItems
(
moneyId
).
getItemNum
();
commonResponse
.
getData
().
getVars
().
set
玩家金币数量
(
moneyNum
);
commonResponse
.
getData
().
getVars
().
set
玩家金币数量
(
moneyNum
);
//------------是否有宠物----------
int
petCount
=
TimingAcquisition
.
getPetNum
(
request
.
getUid
());
if
(
petCount
>
0
)
{
commonResponse
.
getData
().
getVars
().
set
是否有宠物
(
"是"
);
}
//------------是否有植物----------
boolean
plantExist
=
TimingAcquisition
.
havaNurseryPlant
(
request
.
getUid
());
if
(
plantExist
)
{
commonResponse
.
getData
().
getVars
().
set
是否有植物
(
"是"
);
}
//------------是否开启日常任务----------
boolean
dailyTaskExist
=
TimingAcquisition
.
havaDailyTask
(
request
.
getUid
());
if
(
dailyTaskExist
)
{
commonResponse
.
getData
().
getVars
().
set
是否开启日常任务
(
"是"
);
}
String
feedContent
=
"后台返回参数 = ["
+
String
feedContent
=
"后台返回参数 = ["
+
"code:"
+
commonResponse
.
getCode
()
+
"code:"
+
commonResponse
.
getCode
()
+
", msg:"
+
commonResponse
.
getMsg
()
+
", msg:"
+
commonResponse
.
getMsg
()
+
...
@@ -80,6 +95,9 @@ public class ProxyFactory {
...
@@ -80,6 +95,9 @@ public class ProxyFactory {
", 消息提醒:"
+
commonResponse
.
getData
().
getVars
().
get
消息提醒
()
+
", 消息提醒:"
+
commonResponse
.
getData
().
getVars
().
get
消息提醒
()
+
", 任务完成:"
+
commonResponse
.
getData
().
getVars
().
get
任务完成
()
+
", 任务完成:"
+
commonResponse
.
getData
().
getVars
().
get
任务完成
()
+
", 玩家金币数量:"
+
commonResponse
.
getData
().
getVars
().
get
玩家金币数量
()
+
", 玩家金币数量:"
+
commonResponse
.
getData
().
getVars
().
get
玩家金币数量
()
+
", 是否有宠物:"
+
commonResponse
.
getData
().
getVars
().
get
是否有宠物
()
+
", 是否有植物:"
+
commonResponse
.
getData
().
getVars
().
get
是否有植物
()
+
", 是否开启日常任务:"
+
commonResponse
.
getData
().
getVars
().
get
是否开启日常任务
()
+
"]"
;
"]"
;
//玩家有新消息提示
//玩家有新消息提示
log
.
info
(
feedContent
);
log
.
info
(
feedContent
);
...
...
src/main/java/com/qiwuai/garden/common/TimingAcquisition.java
View file @
290107a1
...
@@ -12,6 +12,7 @@ import com.qiwuai.garden.dto.base.ResultVarsResponse;
...
@@ -12,6 +12,7 @@ import com.qiwuai.garden.dto.base.ResultVarsResponse;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.pojo.*
;
import
com.qiwuai.garden.pojo.*
;
import
com.qiwuai.garden.service.plantService.PlantService
;
import
com.qiwuai.garden.service.plantService.PlantService
;
import
com.sun.java.swing.plaf.windows.WindowsTextAreaUI
;
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.Autowired
;
...
@@ -351,14 +352,14 @@ public class TimingAcquisition {
...
@@ -351,14 +352,14 @@ public class TimingAcquisition {
playerList
.
addAll
(
regionPlayerList
);
playerList
.
addAll
(
regionPlayerList
);
}
}
String
address
=
String
.
join
(
"+"
,
playerList
);
String
address
=
String
.
join
(
"+"
,
playerList
);
HttpUtil
.
doPut
(
"玩家地址"
,
address
);
HttpUtil
.
doPut
(
"
项目词组
玩家地址"
,
address
);
}
}
//更新植物名称的动态词组
//更新植物名称的动态词组
if
(
plantMap
.
size
()
!=
0
)
{
if
(
plantMap
.
size
()
!=
0
)
{
//所有植物名称
//所有植物名称
List
<
String
>
plantNameList
=
plantMap
.
values
().
stream
().
map
(
PlantPojo:
:
getName
).
collect
(
Collectors
.
toList
());
List
<
String
>
plantNameList
=
plantMap
.
values
().
stream
().
map
(
PlantPojo:
:
getName
).
collect
(
Collectors
.
toList
());
String
plantNames
=
String
.
join
(
"+"
,
plantNameList
);
String
plantNames
=
String
.
join
(
"+"
,
plantNameList
);
HttpUtil
.
doPut
(
"植物名称"
,
plantNames
);
HttpUtil
.
doPut
(
"
项目词组
植物名称"
,
plantNames
);
}
}
//更新果实名称的动态词组
//更新果实名称的动态词组
if
(
itemConfigMap
.
size
()
!=
0
)
{
if
(
itemConfigMap
.
size
()
!=
0
)
{
...
@@ -371,63 +372,69 @@ public class TimingAcquisition {
...
@@ -371,63 +372,69 @@ public class TimingAcquisition {
}
}
}
}
String
fruitNames
=
String
.
join
(
"+"
,
fruitNameList
);
String
fruitNames
=
String
.
join
(
"+"
,
fruitNameList
);
HttpUtil
.
doPut
(
"果实名称"
,
fruitNames
);
HttpUtil
.
doPut
(
"
项目词组
果实名称"
,
fruitNames
);
}
}
//更新宠物名称的动态词组
//更新宠物名称的动态词组
if
(
petConfigMap
.
size
()
!=
0
)
{
if
(
petConfigMap
.
size
()
!=
0
)
{
//所有宠物名称
//所有宠物名称
List
<
String
>
petNameList
=
petConfigMap
.
values
().
stream
().
map
(
PetPojo:
:
getName
).
collect
(
Collectors
.
toList
());
List
<
String
>
petNameList
=
petConfigMap
.
values
().
stream
().
map
(
PetPojo:
:
getName
).
collect
(
Collectors
.
toList
());
String
petNames
=
String
.
join
(
"+"
,
petNameList
);
String
petNames
=
String
.
join
(
"+"
,
petNameList
);
HttpUtil
.
doPut
(
"宠物名称"
,
petNames
);
HttpUtil
.
doPut
(
"
项目词组
宠物名称"
,
petNames
);
}
}
//更新
物品
名称的动态词组
//更新
材料
名称的动态词组
if
(
petConfigMap
.
size
()
!=
0
)
{
if
(
petConfigMap
.
size
()
!=
0
)
{
//所有物品名称
//所有材料名称
List
<
String
>
itemNameList
=
itemConfigMap
.
values
().
stream
().
map
(
ItemPojo:
:
getName
).
collect
(
Collectors
.
toList
());
List
<
String
>
materialNameList
=
new
ArrayList
<>();
String
itemNames
=
String
.
join
(
"+"
,
itemNameList
);
for
(
Map
.
Entry
<
Integer
,
ItemPojo
>
entry
:
itemConfigMap
.
entrySet
())
{
HttpUtil
.
doPut
(
"物品名称"
,
itemNames
);
ItemPojo
item
=
entry
.
getValue
();
if
(
item
.
getItemTypeId
()
==
Constants
.
ITEM_TYPE_MATERIAL
)
{
materialNameList
.
add
(
item
.
getName
());
}
}
String
materialNames
=
String
.
join
(
"+"
,
materialNameList
);
HttpUtil
.
doPut
(
"项目词组物品名称"
,
materialNames
);
}
}
//更新物品种类的动态词组
//更新物品种类的动态词组
if
(
itemTypeMap
.
size
()
!=
0
)
{
if
(
itemTypeMap
.
size
()
!=
0
)
{
//所有物品种类
//所有物品种类
List
<
String
>
itemTypeList
=
itemTypeMap
.
values
().
stream
().
map
(
ItemTypePojo:
:
getDescription
).
collect
(
Collectors
.
toList
());
List
<
String
>
itemTypeList
=
itemTypeMap
.
values
().
stream
().
map
(
ItemTypePojo:
:
getDescription
).
collect
(
Collectors
.
toList
());
String
itemTypes
=
String
.
join
(
"+"
,
itemTypeList
);
String
itemTypes
=
String
.
join
(
"+"
,
itemTypeList
);
HttpUtil
.
doPut
(
"物品种类"
,
itemTypes
);
HttpUtil
.
doPut
(
"
项目词组
物品种类"
,
itemTypes
);
}
}
//更新地区的动态词组
//更新地区的动态词组
if
(
regionIPMap
.
size
()
!=
0
)
{
if
(
regionIPMap
.
size
()
!=
0
)
{
//所有地区
//所有地区
List
<
String
>
placeList
=
new
ArrayList
<>(
regionIPMap
.
keySet
());
List
<
String
>
placeList
=
new
ArrayList
<>(
regionIPMap
.
keySet
());
String
places
=
String
.
join
(
"+"
,
placeList
);
String
places
=
String
.
join
(
"+"
,
placeList
);
HttpUtil
.
doPut
(
"地区"
,
places
);
HttpUtil
.
doPut
(
"
项目词组
地区"
,
places
);
}
}
//更新花圃类型的动态词组
//更新花圃类型的动态词组
if
(
nurseryConfigMap
.
size
()
!=
0
)
{
if
(
nurseryConfigMap
.
size
()
!=
0
)
{
//所有花圃类型
//所有花圃类型
List
<
String
>
nurseryNameList
=
nurseryConfigMap
.
values
().
stream
().
map
(
NurseryPojo:
:
getName
).
collect
(
Collectors
.
toList
());
List
<
String
>
nurseryNameList
=
nurseryConfigMap
.
values
().
stream
().
map
(
NurseryPojo:
:
getName
).
collect
(
Collectors
.
toList
());
String
nurseryNames
=
String
.
join
(
"+"
,
nurseryNameList
);
String
nurseryNames
=
String
.
join
(
"+"
,
nurseryNameList
);
HttpUtil
.
doPut
(
"花圃类型"
,
nurseryNames
);
HttpUtil
.
doPut
(
"
项目词组
花圃类型"
,
nurseryNames
);
}
}
//更新技能名称的动态词组
//更新技能名称的动态词组
if
(
gardenerSkillMap
.
size
()
!=
0
)
{
if
(
gardenerSkillMap
.
size
()
!=
0
)
{
//所有技能名称
//所有技能名称
List
<
String
>
skillNameList
=
gardenerSkillMap
.
values
().
stream
().
map
(
GardenerSkillPojo:
:
getName
).
collect
(
Collectors
.
toList
());
List
<
String
>
skillNameList
=
gardenerSkillMap
.
values
().
stream
().
map
(
GardenerSkillPojo:
:
getName
).
collect
(
Collectors
.
toList
());
String
skillNames
=
String
.
join
(
"+"
,
skillNameList
);
String
skillNames
=
String
.
join
(
"+"
,
skillNameList
);
HttpUtil
.
doPut
(
"技能名称"
,
skillNames
);
HttpUtil
.
doPut
(
"
项目词组
技能名称"
,
skillNames
);
}
}
//更新玩家称呼的动态词组
//更新玩家称呼的动态词组
if
(
gardenerSkillMap
.
size
()
!=
0
)
{
if
(
gardenerSkillMap
.
size
()
!=
0
)
{
//所有玩家称呼
//所有玩家称呼
List
<
String
>
callNameList
=
callNameMap
.
values
().
stream
().
map
(
CallNamePojo:
:
getName
).
collect
(
Collectors
.
toList
());
List
<
String
>
callNameList
=
callNameMap
.
values
().
stream
().
map
(
CallNamePojo:
:
getName
).
collect
(
Collectors
.
toList
());
String
callNames
=
String
.
join
(
"+"
,
callNameList
);
String
callNames
=
String
.
join
(
"+"
,
callNameList
);
HttpUtil
.
doPut
(
"玩家称呼"
,
callNames
);
HttpUtil
.
doPut
(
"
项目词组
玩家称呼"
,
callNames
);
}
}
// //更新园丁名称的动态词组
// //更新园丁名称的动态词组
// if (gardenerSkillMap.size() != 0) {
// if (gardenerSkillMap.size() != 0) {
// //所有园丁名称
// //所有园丁名称
// List<String> nameList = friendList.stream().map(FriendDto::getName).collect(Collectors.toList());
// List<String> nameList = friendList.stream().map(FriendDto::getName).collect(Collectors.toList());
// String skillNames = String.join("+", skillNameList);
// String skillNames = String.join("+", skillNameList);
// HttpUtil.doPut("园丁名称", skillNames);
// HttpUtil.doPut("
项目词组
园丁名称", skillNames);
// }
// }
}
}
...
@@ -524,6 +531,17 @@ public class TimingAcquisition {
...
@@ -524,6 +531,17 @@ public class TimingAcquisition {
PlantPojo
plant
=
entry
.
getValue
();
PlantPojo
plant
=
entry
.
getValue
();
if
(
plantName
.
equals
(
plant
.
getName
()))
{
if
(
plantName
.
equals
(
plant
.
getName
()))
{
return
plant
.
getId
();
return
plant
.
getId
();
}
else
{
//在别名里找
//所有该植物的别名
String
alias
=
plant
.
getAlias
();
if
(!
StringUtils
.
isEmpty
(
alias
))
{
if
(!
Constants
.
NON_STR
.
equals
(
alias
))
{
List
<
String
>
aliasList
=
Arrays
.
asList
(
alias
.
split
(
"\\|"
));
if
(
aliasList
.
contains
(
plantName
))
{
return
plant
.
getId
();
}
}
}
}
}
}
}
return
Constants
.
REQ_NON
;
return
Constants
.
REQ_NON
;
...
@@ -558,8 +576,20 @@ public class TimingAcquisition {
...
@@ -558,8 +576,20 @@ public class TimingAcquisition {
while
(
iterator
.
hasNext
())
{
while
(
iterator
.
hasNext
())
{
Map
.
Entry
<
Integer
,
ItemPojo
>
entry
=
iterator
.
next
();
Map
.
Entry
<
Integer
,
ItemPojo
>
entry
=
iterator
.
next
();
ItemPojo
item
=
entry
.
getValue
();
ItemPojo
item
=
entry
.
getValue
();
//先在名称里找
if
(
itemName
.
equals
(
item
.
getName
()))
{
if
(
itemName
.
equals
(
item
.
getName
()))
{
return
item
;
return
item
;
}
else
{
//在别名里找
//所有物品别名
String
alias
=
item
.
getAlias
();
if
(!
StringUtils
.
isEmpty
(
alias
))
{
if
(!
Constants
.
NON_STR
.
equals
(
alias
))
{
List
<
String
>
aliasList
=
Arrays
.
asList
(
alias
.
split
(
"\\|"
));
if
(
aliasList
.
contains
(
itemName
))
{
return
item
;
}
}
}
}
}
}
}
return
null
;
return
null
;
...
@@ -638,6 +668,8 @@ public class TimingAcquisition {
...
@@ -638,6 +668,8 @@ public class TimingAcquisition {
Map
<
Integer
,
GoodsPojo
>
goodsMap
=
new
ConcurrentHashMap
<>(
goodsLevelMap
);
Map
<
Integer
,
GoodsPojo
>
goodsMap
=
new
ConcurrentHashMap
<>(
goodsLevelMap
);
//园丁性别
//园丁性别
String
gender
=
getGardenerGender
(
uid
);
String
gender
=
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//保存根据查找条件找到的物品id集合,用于下一步的翻页操作
//保存根据查找条件找到的物品id集合,用于下一步的翻页操作
List
<
Integer
>
itemIdList
=
new
ArrayList
<>();
List
<
Integer
>
itemIdList
=
new
ArrayList
<>();
//1.玩家提供了花圃类型
//1.玩家提供了花圃类型
...
@@ -709,6 +741,7 @@ public class TimingAcquisition {
...
@@ -709,6 +741,7 @@ public class TimingAcquisition {
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_type_no_goods"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_type_no_goods"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemTypeMap
.
get
(
itemTypeId
).
getDescription
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemTypeMap
.
get
(
itemTypeId
).
getDescription
());
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_type_no_goods"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_type_no_goods"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400305
);
resultResponse
.
set
反馈
ID
(
400305
);
...
@@ -768,8 +801,9 @@ public class TimingAcquisition {
...
@@ -768,8 +801,9 @@ public class TimingAcquisition {
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_type_success"
);
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_type_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemLevelName
,
itemAttribute
,
itemType
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemLevelName
,
itemAttribute
,
itemType
,
String
.
valueOf
(
size
),
feedText
.
toString
());
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_type_success"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_type_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
}
}
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -794,6 +828,17 @@ public class TimingAcquisition {
...
@@ -794,6 +828,17 @@ public class TimingAcquisition {
PetPojo
pet
=
entry
.
getValue
();
PetPojo
pet
=
entry
.
getValue
();
if
(
petName
.
equals
(
pet
.
getName
()))
{
if
(
petName
.
equals
(
pet
.
getName
()))
{
return
pet
.
getId
();
return
pet
.
getId
();
}
else
{
//在别名里找
//所有该动物的别名
String
alias
=
pet
.
getAlias
();
if
(!
StringUtils
.
isEmpty
(
alias
))
{
if
(!
Constants
.
NON_STR
.
equals
(
alias
))
{
List
<
String
>
aliasList
=
Arrays
.
asList
(
alias
.
split
(
"\\|"
));
if
(
aliasList
.
contains
(
petName
))
{
return
pet
.
getId
();
}
}
}
}
}
}
}
return
Constants
.
REQ_NON
;
return
Constants
.
REQ_NON
;
...
@@ -865,6 +910,8 @@ public class TimingAcquisition {
...
@@ -865,6 +910,8 @@ public class TimingAcquisition {
Map
<
Integer
,
Integer
>
taskFinishMap
=
gardenerMap
.
get
(
uid
).
getTaskFinishMap
();
Map
<
Integer
,
Integer
>
taskFinishMap
=
gardenerMap
.
get
(
uid
).
getTaskFinishMap
();
//园丁性别
//园丁性别
String
gender
=
getGardenerGender
(
uid
);
String
gender
=
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
TaskResultDto
taskResult
=
new
TaskResultDto
();
//返回结果
TaskResultDto
taskResult
=
new
TaskResultDto
();
//返回结果
String
taskName
=
""
;
//任务名称
String
taskName
=
""
;
//任务名称
TaskPojo
curTask
=
new
TaskPojo
();
TaskPojo
curTask
=
new
TaskPojo
();
...
@@ -901,16 +948,30 @@ public class TimingAcquisition {
...
@@ -901,16 +948,30 @@ public class TimingAcquisition {
String
result
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"update_task_finished"
);
String
result
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"update_task_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
taskName
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
taskName
);
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"update_task_finished"
);
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"update_task_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
callName
.
getName
(),
callName
.
getSubName
());
taskResult
.
setTaskId
(
curTask
.
getId
());
taskResult
.
setTaskId
(
curTask
.
getId
());
taskResult
.
setResultText
(
result
);
taskResult
.
setResultText
(
result
);
taskResult
.
setFinished
(
false
);
taskResult
.
setFinished
(
false
);
}
}
//已完成所有升级任务
//已完成所有升级任务
if
(
count
==
taskIdList
.
length
)
{
if
(
count
>=
taskIdList
.
length
)
{
//新手引导的园丁等级1升级到2时不提示
if
(
level
==
1
)
{
log
.
info
(
uid
+
"的任务:"
+
taskName
+
"已经达成"
);
String
result
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"update_task_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
taskName
);
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"update_task_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
callName
.
getName
(),
callName
.
getSubName
());
taskResult
.
setTaskId
(
curTask
.
getId
());
taskResult
.
setResultText
(
result
);
taskResult
.
setFinished
(
false
);
return
taskResult
;
}
log
.
info
(
uid
+
"的任务:"
+
taskName
+
"已完成,园丁升级条件已满足"
);
log
.
info
(
uid
+
"的任务:"
+
taskName
+
"已完成,园丁升级条件已满足"
);
String
result
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"update_task_level_finished"
);
String
result
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"update_task_level_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
taskName
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
taskName
);
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"update_task_level_finished"
);
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"update_task_level_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
callName
.
getName
(),
callName
.
getSubName
());
taskResult
.
setTaskId
(
curTask
.
getId
());
taskResult
.
setTaskId
(
curTask
.
getId
());
taskResult
.
setResultText
(
result
);
taskResult
.
setResultText
(
result
);
taskResult
.
setFinished
(
true
);
taskResult
.
setFinished
(
true
);
...
@@ -945,6 +1006,8 @@ public class TimingAcquisition {
...
@@ -945,6 +1006,8 @@ public class TimingAcquisition {
}
}
//园丁性别
//园丁性别
String
gender
=
getGardenerGender
(
uid
);
String
gender
=
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
String
taskName
=
""
;
//任务名称
String
taskName
=
""
;
//任务名称
String
result
=
""
;
String
result
=
""
;
//该每日任务还未标记完成
//该每日任务还未标记完成
...
@@ -970,6 +1033,7 @@ public class TimingAcquisition {
...
@@ -970,6 +1033,7 @@ public class TimingAcquisition {
result
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"daily_task_finished"
);
result
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"daily_task_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
taskName
,
feedText
.
toString
());
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
taskName
,
feedText
.
toString
());
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"daily_task_finished"
);
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"daily_task_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
callName
.
getName
(),
callName
.
getSubName
());
taskResult
.
setTaskId
(
task
.
getId
());
taskResult
.
setTaskId
(
task
.
getId
());
taskResult
.
setResultText
(
result
);
taskResult
.
setResultText
(
result
);
taskResult
.
setFinished
(
true
);
taskResult
.
setFinished
(
true
);
...
@@ -1002,6 +1066,7 @@ public class TimingAcquisition {
...
@@ -1002,6 +1066,7 @@ public class TimingAcquisition {
result
+=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"daily_task_all_finished"
);
result
+=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"daily_task_all_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
dailyTaskName
,
dailyFeedText
.
toString
());
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
dailyTaskName
,
dailyFeedText
.
toString
());
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"daily_task_all_finished"
);
result
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"daily_task_all_finished"
);
result
=
SpeechUtil
.
speechReplaceNum
(
result
,
callName
.
getName
(),
callName
.
getSubName
());
taskResult
.
setTaskId
(
dailyTask
.
getId
());
taskResult
.
setTaskId
(
dailyTask
.
getId
());
taskResult
.
setResultText
(
result
);
taskResult
.
setResultText
(
result
);
taskResult
.
setFinished
(
true
);
taskResult
.
setFinished
(
true
);
...
@@ -1139,7 +1204,7 @@ public class TimingAcquisition {
...
@@ -1139,7 +1204,7 @@ public class TimingAcquisition {
}
}
/**
/**
* 随机选择一个陌生人,优先本地区查找,本地区没有再找其他地区的陌生人
* 随机选择一个
有成熟植物的
陌生人,优先本地区查找,本地区没有再找其他地区的陌生人
* @param uid
* @param uid
* @return String
* @return String
*/
*/
...
@@ -1151,6 +1216,8 @@ public class TimingAcquisition {
...
@@ -1151,6 +1216,8 @@ public class TimingAcquisition {
//当前玩家所有好友
//当前玩家所有好友
List
<
FriendDto
>
friendList
=
gardenerMap
.
get
(
uid
).
getFriendList
();
List
<
FriendDto
>
friendList
=
gardenerMap
.
get
(
uid
).
getFriendList
();
List
<
String
>
friendAddressList
=
new
ArrayList
<>();
List
<
String
>
friendAddressList
=
new
ArrayList
<>();
List
<
String
>
maturePlantPlayerList
=
new
ArrayList
<>();
//有成熟植物的玩家
String
placeSide
=
place
;
//取出该地区所有非好友玩家
//取出该地区所有非好友玩家
if
(!
StringUtils
.
isEmpty
(
friendList
))
{
if
(!
StringUtils
.
isEmpty
(
friendList
))
{
for
(
FriendDto
friend
:
friendList
)
{
for
(
FriendDto
friend
:
friendList
)
{
...
@@ -1158,28 +1225,57 @@ public class TimingAcquisition {
...
@@ -1158,28 +1225,57 @@ public class TimingAcquisition {
}
}
//去除该地区的好友
//去除该地区的好友
playerList
.
removeIf
(
friendAddressList:
:
contains
);
playerList
.
removeIf
(
friendAddressList:
:
contains
);
//去除玩家本人
playerList
.
removeIf
(
location:
:
contains
);
}
}
//本地区没有找到陌生人,去其他地区查找
//去除玩家本人
if
(
playerList
.
size
()
==
0
)
{
playerList
.
removeIf
(
location:
:
contains
);
//去除掉没有成熟植物的陌生人玩家
if
(
playerList
.
size
()
!=
0
)
{
for
(
String
address
:
playerList
)
{
String
uidSide
=
TimingAcquisition
.
addressMap
.
get
(
placeSide
).
get
(
address
).
getUid
();
//对方uid
//玩家没有成熟的植物
if
(
havaNurseryMaturePlant
(
uidSide
))
{
maturePlantPlayerList
.
add
(
address
);
}
}
}
//本地区没有找到有成熟植物的陌生人,去其他地区查找
if
(
maturePlantPlayerList
.
size
()
==
0
)
{
List
<
String
>
regionList
=
regionIPMap
.
values
().
stream
().
map
(
RegionPojo:
:
getPlace
).
collect
(
Collectors
.
toList
());
List
<
String
>
regionCloneList
=
new
ArrayList
<>();
Collections
.
copy
(
regionCloneList
,
regionList
);
regionCloneList
.
removeIf
(
place:
:
contains
);
//去除本地区
int
regionCount
=
regionCloneList
.
size
();
int
count
=
0
;
//循环查找其他其他,知道找到有陌生人为止
//循环查找其他其他,知道找到有陌生人为止
do
{
do
{
List
<
String
>
regionList
=
regionIPMap
.
values
().
stream
().
map
(
RegionPojo:
:
getPlace
).
collect
(
Collectors
.
toList
());
count
++;
List
<
String
>
regionCloneList
=
new
ArrayList
<>();
Collections
.
copy
(
regionCloneList
,
regionList
);
regionCloneList
.
removeIf
(
place:
:
contains
);
//取出本地区
int
random
=
RandomDropUtil
.
getRandomNum
(
0
,
regionCloneList
.
size
());
int
random
=
RandomDropUtil
.
getRandomNum
(
0
,
regionCloneList
.
size
());
String
placeSide
=
regionCloneList
.
get
(
random
);
placeSide
=
regionCloneList
.
get
(
random
);
//选中地区的所有玩家
//选中地区的所有玩家
playerList
=
new
ArrayList
<>(
addressMap
.
get
(
placeSide
).
keySet
());
playerList
=
new
ArrayList
<>(
addressMap
.
get
(
placeSide
).
keySet
());
//去除该地区的好友
//去除该地区的好友
playerList
.
removeIf
(
friendAddressList:
:
contains
);
playerList
.
removeIf
(
friendAddressList:
:
contains
);
}
while
(
playerList
.
size
()
==
0
);
//去除掉没有成熟植物的陌生人玩家
if
(
playerList
.
size
()
!=
0
)
{
for
(
String
address
:
playerList
)
{
String
uidSide
=
TimingAcquisition
.
addressMap
.
get
(
placeSide
).
get
(
address
).
getUid
();
//对方uid
//玩家没有成熟的植物
if
(
havaNurseryMaturePlant
(
uidSide
))
{
maturePlantPlayerList
.
add
(
address
);
}
}
}
if
(
count
>=
regionCount
)
{
break
;
}
}
while
(
maturePlantPlayerList
.
size
()
==
0
);
}
if
(
maturePlantPlayerList
.
size
()
==
0
)
{
return
null
;
}
}
//随机取一个本地区非好友的玩家
//随机取一个本地区非好友的玩家
int
randomNum
=
RandomDropUtil
.
getRandomNum
(
0
,
p
layerList
.
size
());
int
randomNum
=
RandomDropUtil
.
getRandomNum
(
0
,
maturePlantP
layerList
.
size
());
return
p
layerList
.
get
(
randomNum
);
return
maturePlantP
layerList
.
get
(
randomNum
);
}
}
/**
/**
...
@@ -1358,6 +1454,9 @@ public class TimingAcquisition {
...
@@ -1358,6 +1454,9 @@ public class TimingAcquisition {
* @return String
* @return String
*/
*/
public
static
String
findLastAddress
(
String
uid
,
String
address
)
{
public
static
String
findLastAddress
(
String
uid
,
String
address
)
{
if
(
StringUtils
.
isEmpty
(
address
))
{
return
null
;
}
//该玩家的地址
//该玩家的地址
String
location
=
gardenerMap
.
get
(
uid
).
getLocation
();
String
location
=
gardenerMap
.
get
(
uid
).
getLocation
();
String
result
=
null
;
String
result
=
null
;
...
@@ -1392,6 +1491,9 @@ public class TimingAcquisition {
...
@@ -1392,6 +1491,9 @@ public class TimingAcquisition {
* @return String
* @return String
*/
*/
public
static
String
findNextAddress
(
String
uid
,
String
address
)
{
public
static
String
findNextAddress
(
String
uid
,
String
address
)
{
if
(
StringUtils
.
isEmpty
(
address
))
{
return
null
;
}
//该玩家的地址
//该玩家的地址
String
location
=
gardenerMap
.
get
(
uid
).
getLocation
();
String
location
=
gardenerMap
.
get
(
uid
).
getLocation
();
String
result
=
null
;
String
result
=
null
;
...
@@ -1490,9 +1592,319 @@ public class TimingAcquisition {
...
@@ -1490,9 +1592,319 @@ public class TimingAcquisition {
* @return CallNamePojo
* @return CallNamePojo
*/
*/
public
static
CallNamePojo
getCallNameByUid
(
String
uid
)
{
public
static
CallNamePojo
getCallNameByUid
(
String
uid
)
{
//
园丁性别
//
玩家称呼id
Integer
callNameId
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getCallNameId
();
Integer
callNameId
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getCallNameId
();
//找到对应的称呼
id
//找到对应的称呼
信息
return
callNameMap
.
get
(
callNameId
);
return
callNameMap
.
get
(
callNameId
);
}
}
/**
* 根据玩家性别找到可选择的玩家称呼
* @param uid
* @return CallNamePojo
*/
public
static
String
getCallNameByGender
(
String
uid
)
{
//园丁性别
Integer
gender
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getGender
();
//找到对应的称呼id
List
<
CallNamePojo
>
callNamePojoList
=
callNameMap
.
values
().
stream
().
filter
(
callNamePojo
->
gender
.
equals
(
callNamePojo
.
getGender
())).
collect
(
Collectors
.
toList
());
List
<
String
>
callNameList
=
callNamePojoList
.
stream
().
map
(
CallNamePojo:
:
getName
).
collect
(
Collectors
.
toList
());
return
String
.
join
(
"、"
,
callNameList
);
}
/**
* 判断玩家是否有植物的花圃
* @param uid
* @return boolean
*/
public
static
boolean
havaNurseryPlant
(
String
uid
)
{
//玩家所有花圃
Map
<
Integer
,
NurseryInfoDto
>
nurseryMap
=
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
();
for
(
Map
.
Entry
<
Integer
,
NurseryInfoDto
>
entry
:
nurseryMap
.
entrySet
())
{
NurseryInfoDto
nurseryInfo
=
entry
.
getValue
();
if
(!
StringUtils
.
isEmpty
(
nurseryInfo
.
getPlantId
()))
{
return
true
;
}
}
return
false
;
}
/**
* 判断玩家是否有成熟植物的花圃
* @param uid
* @return boolean
*/
public
static
boolean
havaNurseryMaturePlant
(
String
uid
)
{
//玩家所有花圃
Map
<
Integer
,
NurseryInfoDto
>
nurseryMap
=
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
();
for
(
Map
.
Entry
<
Integer
,
NurseryInfoDto
>
entry
:
nurseryMap
.
entrySet
())
{
NurseryInfoDto
nurseryInfo
=
entry
.
getValue
();
//花圃中有种植植物
if
(!
StringUtils
.
isEmpty
(
nurseryInfo
.
getPlantId
()))
{
if
(!
StringUtils
.
isEmpty
(
nurseryInfo
.
getPlantTime
()))
{
//植物已成熟
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getMatureTime
())
>
0
)
{
return
true
;
}
}
}
}
return
false
;
}
/**
* 查询玩家是否有日常任务
* @param uid
* @return boolean
*/
public
static
boolean
havaDailyTask
(
String
uid
)
{
//玩家所有花圃
Map
<
Integer
,
Integer
>
dailyTaskFinishMap
=
gardenerMap
.
get
(
uid
).
getDailyTaskFinishMap
();
if
(
StringUtils
.
isEmpty
(
dailyTaskFinishMap
))
{
return
false
;
}
if
(
dailyTaskFinishMap
.
size
()
==
0
)
{
return
false
;
}
return
true
;
}
/**
* 获取玩家累计的花圃增产加成值
* @param uid
* @return BigDecimal
*/
public
static
BigDecimal
getAddProduction
(
String
uid
)
{
BigDecimal
addPro
=
new
BigDecimal
(
0
);
//玩家各等级对应的技能
Map
<
Integer
,
GardenerSkillDto
>
skills
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
if
(
StringUtils
.
isEmpty
(
skills
))
{
return
addPro
;
}
if
(
skills
.
size
()
==
0
)
{
return
addPro
;
}
for
(
Map
.
Entry
<
Integer
,
GardenerSkillDto
>
entry
:
skills
.
entrySet
())
{
GardenerSkillDto
skill
=
entry
.
getValue
();
//初级种植
if
(
skill
.
getId
().
equals
(
Constants
.
PRIMARY_PLANT
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//中级种植
if
(
skill
.
getId
().
equals
(
Constants
.
INTER_PLANT
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//高效养护
if
(
skill
.
getId
().
equals
(
Constants
.
HIGH_EFF_CARE
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//高级种植
if
(
skill
.
getId
().
equals
(
Constants
.
HIGH_PLANT
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//花圃维护
if
(
skill
.
getId
().
equals
(
Constants
.
NURSERY_CARE
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeB
());
}
//植物之心
if
(
skill
.
getId
().
equals
(
Constants
.
PLANT_HEART
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeB
());
}
}
return
addPro
;
}
/**
* 获取玩家累计的植物成熟时间减少加成值
* @param uid
* @return BigDecimal
*/
public
static
BigDecimal
getSpeedPlantMature
(
String
uid
)
{
BigDecimal
addPro
=
new
BigDecimal
(
0
);
//玩家各等级对应的技能
Map
<
Integer
,
GardenerSkillDto
>
skills
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
if
(
StringUtils
.
isEmpty
(
skills
))
{
return
addPro
;
}
if
(
skills
.
size
()
==
0
)
{
return
addPro
;
}
for
(
Map
.
Entry
<
Integer
,
GardenerSkillDto
>
entry
:
skills
.
entrySet
())
{
GardenerSkillDto
skill
=
entry
.
getValue
();
//催生术
if
(
skill
.
getId
().
equals
(
Constants
.
SPEED_UP_PLANT
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//植物之心
if
(
skill
.
getId
().
equals
(
Constants
.
PLANT_HEART
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
}
return
addPro
;
}
/**
* 获取玩家累计的增加花圃容量加成值
* @param uid
* @return BigDecimal
*/
public
static
BigDecimal
getAddNurseryCapacity
(
String
uid
)
{
BigDecimal
addPro
=
new
BigDecimal
(
0
);
//玩家各等级对应的技能
Map
<
Integer
,
GardenerSkillDto
>
skills
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
if
(
StringUtils
.
isEmpty
(
skills
))
{
return
addPro
;
}
if
(
skills
.
size
()
==
0
)
{
return
addPro
;
}
for
(
Map
.
Entry
<
Integer
,
GardenerSkillDto
>
entry
:
skills
.
entrySet
())
{
GardenerSkillDto
skill
=
entry
.
getValue
();
//园地维护
if
(
skill
.
getId
().
equals
(
Constants
.
GARDEN_CARE
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//花圃维护
if
(
skill
.
getId
().
equals
(
Constants
.
NURSERY_CARE
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//植物之心
if
(
skill
.
getId
().
equals
(
Constants
.
PLANT_HEART
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeC
());
}
}
return
addPro
;
}
/**
* 获取玩家累计的宠物生命加成值
* @param uid
* @return BigDecimal
*/
public
static
BigDecimal
getAddPetHP
(
String
uid
)
{
BigDecimal
addPro
=
new
BigDecimal
(
0
);
//玩家各等级对应的技能
Map
<
Integer
,
GardenerSkillDto
>
skills
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
if
(
StringUtils
.
isEmpty
(
skills
))
{
return
addPro
;
}
if
(
skills
.
size
()
==
0
)
{
return
addPro
;
}
for
(
Map
.
Entry
<
Integer
,
GardenerSkillDto
>
entry
:
skills
.
entrySet
())
{
GardenerSkillDto
skill
=
entry
.
getValue
();
//初级驯养
if
(
skill
.
getId
().
equals
(
Constants
.
PRIMARY_TRAIN
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//中级驯养
if
(
skill
.
getId
().
equals
(
Constants
.
INTER_TRAIN
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//战斗训练
if
(
skill
.
getId
().
equals
(
Constants
.
FIGHT_TRAIN
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//高级驯养
if
(
skill
.
getId
().
equals
(
Constants
.
HIGH_TRAIN
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//宠物之心
if
(
skill
.
getId
().
equals
(
Constants
.
PET_HEART
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
}
return
addPro
;
}
/**
* 获取玩家累计的宠物攻击力加成值
* @param uid
* @return BigDecimal
*/
public
static
BigDecimal
getAddPetFC
(
String
uid
)
{
BigDecimal
addPro
=
new
BigDecimal
(
0
);
//玩家各等级对应的技能
Map
<
Integer
,
GardenerSkillDto
>
skills
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
if
(
StringUtils
.
isEmpty
(
skills
))
{
return
addPro
;
}
if
(
skills
.
size
()
==
0
)
{
return
addPro
;
}
for
(
Map
.
Entry
<
Integer
,
GardenerSkillDto
>
entry
:
skills
.
entrySet
())
{
GardenerSkillDto
skill
=
entry
.
getValue
();
//战斗训练
if
(
skill
.
getId
().
equals
(
Constants
.
FIGHT_TRAIN
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeB
());
}
//勇气训练
if
(
skill
.
getId
().
equals
(
Constants
.
BRAVE_TRAIN
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//高效克制
if
(
skill
.
getId
().
equals
(
Constants
.
HIGH_EFF_RESTRAIN
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//宠物之心
if
(
skill
.
getId
().
equals
(
Constants
.
PET_HEART
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeB
());
}
}
return
addPro
;
}
/**
* 获取玩家累计的宠物防御力加成值
* @param uid
* @return BigDecimal
*/
public
static
BigDecimal
getAddPetDEF
(
String
uid
)
{
BigDecimal
addPro
=
new
BigDecimal
(
0
);
//玩家各等级对应的技能
Map
<
Integer
,
GardenerSkillDto
>
skills
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
if
(
StringUtils
.
isEmpty
(
skills
))
{
return
addPro
;
}
if
(
skills
.
size
()
==
0
)
{
return
addPro
;
}
for
(
Map
.
Entry
<
Integer
,
GardenerSkillDto
>
entry
:
skills
.
entrySet
())
{
GardenerSkillDto
skill
=
entry
.
getValue
();
//护栏加固
if
(
skill
.
getId
().
equals
(
Constants
.
GARDEN_DEFEND
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
//高效防护
if
(
skill
.
getId
().
equals
(
Constants
.
HIGH_EFF_DEFEND
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeA
());
}
}
return
addPro
;
}
/**
* 获取玩家累计的宠物回血加成值
* @param uid
* @return BigDecimal
*/
public
static
BigDecimal
getAddPetLife
(
String
uid
)
{
BigDecimal
addPro
=
new
BigDecimal
(
0
);
//玩家各等级对应的技能
Map
<
Integer
,
GardenerSkillDto
>
skills
=
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
if
(
StringUtils
.
isEmpty
(
skills
))
{
return
addPro
;
}
if
(
skills
.
size
()
==
0
)
{
return
addPro
;
}
for
(
Map
.
Entry
<
Integer
,
GardenerSkillDto
>
entry
:
skills
.
entrySet
())
{
GardenerSkillDto
skill
=
entry
.
getValue
();
//宠物之心
if
(
skill
.
getId
().
equals
(
Constants
.
PET_HEART
))
{
addPro
=
addPro
.
add
(
gardenerSkillMap
.
get
(
skill
.
getId
()).
getTypeC
());
}
}
return
addPro
;
}
}
}
src/main/java/com/qiwuai/garden/common/schedule/ScheduleTask.java
View file @
290107a1
...
@@ -109,7 +109,7 @@ public class ScheduleTask {
...
@@ -109,7 +109,7 @@ public class ScheduleTask {
if
(
StringUtils
.
isEmpty
(
pet
.
getFeedCost
()))
{
if
(
StringUtils
.
isEmpty
(
pet
.
getFeedCost
()))
{
return
;
return
;
}
}
if
(
Constants
.
NON
.
equals
(
Integer
.
valueOf
(
pet
.
getFeedCost
()
)))
{
if
(
Constants
.
NON
_STR
.
equals
(
pet
.
getFeedCost
(
)))
{
return
;
return
;
}
}
//宠物投喂消耗物品和数量
//宠物投喂消耗物品和数量
...
...
src/main/java/com/qiwuai/garden/common/utils/HttpUtil.java
View file @
290107a1
...
@@ -27,12 +27,12 @@ public class HttpUtil {
...
@@ -27,12 +27,12 @@ public class HttpUtil {
String
authorization
=
DigestUtils
.
md5Hex
(
appSecret
+
":"
+
timestamp
);
String
authorization
=
DigestUtils
.
md5Hex
(
appSecret
+
":"
+
timestamp
);
//设置请求体
//设置请求体
PhraseRequest
phraseRequest
=
new
PhraseRequest
();
PhraseRequest
phraseRequest
=
new
PhraseRequest
();
phraseRequest
.
setWorkName
(
"
秘密
花园"
);
phraseRequest
.
setWorkName
(
"
追梦
花园"
);
phraseRequest
.
setPhraseName
(
phraseName
);
phraseRequest
.
setPhraseName
(
phraseName
);
phraseRequest
.
setPhraseContent
(
phraseContent
);
phraseRequest
.
setPhraseContent
(
phraseContent
);
JSONObject
object
=
new
JSONObject
();
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"workName"
,
"
秘密
花园"
);
object
.
put
(
"workName"
,
"
追梦
花园"
);
object
.
put
(
"phraseName"
,
phraseName
);
object
.
put
(
"phraseName"
,
phraseName
);
object
.
put
(
"phraseContent"
,
phraseContent
);
object
.
put
(
"phraseContent"
,
phraseContent
);
//设置请求头
//设置请求头
...
...
src/main/java/com/qiwuai/garden/common/utils/RandomDropUtil.java
View file @
290107a1
...
@@ -2,10 +2,7 @@ package com.qiwuai.garden.common.utils;
...
@@ -2,10 +2,7 @@ package com.qiwuai.garden.common.utils;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.dto.DropItemNumDto
;
import
com.qiwuai.garden.dto.*
;
import
com.qiwuai.garden.dto.GardenerDto
;
import
com.qiwuai.garden.dto.ItemDto
;
import
com.qiwuai.garden.dto.NurseryInfoDto
;
import
com.qiwuai.garden.pojo.*
;
import
com.qiwuai.garden.pojo.*
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -155,7 +152,7 @@ public class RandomDropUtil {
...
@@ -155,7 +152,7 @@ public class RandomDropUtil {
return
harvestItems
;
return
harvestItems
;
}
}
//掉落物品id集合
//掉落物品id集合
if
(
pet
.
getDropItems
().
equals
(
String
.
valueOf
(
Constants
.
NON
)))
{
if
(
Constants
.
NON_STR
.
equals
(
pet
.
getDropItems
(
)))
{
return
harvestItems
;
return
harvestItems
;
}
}
String
[]
dropItemList
=
pet
.
getDropItems
().
split
(
"\\|"
);
String
[]
dropItemList
=
pet
.
getDropItems
().
split
(
"\\|"
);
...
@@ -193,7 +190,7 @@ public class RandomDropUtil {
...
@@ -193,7 +190,7 @@ public class RandomDropUtil {
return
harvestItems
;
return
harvestItems
;
}
}
//掉落物品id集合
//掉落物品id集合
if
(
pet
.
getDropItems
().
equals
(
String
.
valueOf
(
Constants
.
NON
)))
{
if
(
Constants
.
NON_STR
.
equals
(
pet
.
getDropItems
(
)))
{
return
harvestItems
;
return
harvestItems
;
}
}
String
[]
dropItemList
=
pet
.
getDropItems
().
split
(
"\\|"
);
String
[]
dropItemList
=
pet
.
getDropItems
().
split
(
"\\|"
);
...
@@ -229,18 +226,26 @@ public class RandomDropUtil {
...
@@ -229,18 +226,26 @@ public class RandomDropUtil {
NurseryPojo
nurseryConfig
=
TimingAcquisition
.
nurseryConfigMap
.
get
(
nurseryInfo
.
getId
());
NurseryPojo
nurseryConfig
=
TimingAcquisition
.
nurseryConfigMap
.
get
(
nurseryInfo
.
getId
());
//所有掉落汇总
//所有掉落汇总
List
<
ItemDto
>
dropItemsTotal
=
new
ArrayList
<>();
List
<
ItemDto
>
dropItemsTotal
=
new
ArrayList
<>();
//玩家所有技能
Map
<
Integer
,
GardenerSkillDto
>
skills
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
//产生的果实数量,不同等级的花圃能提供不同的收获加成,并一定几率掉落物品
//产生的果实数量,不同等级的花圃能提供不同的收获加成,并一定几率掉落物品
//花圃中植物能产生的果实数量
//花圃中
一棵
植物能产生的果实数量
int
fruitNum
=
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
()).
getFruitNum
();
int
fruitNum
=
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
()).
getFruitNum
();
fruit
.
setItemId
(
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
()).
getFruitId
());
fruit
.
setItemId
(
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
()).
getFruitId
());
fruit
.
setItemNum
(
0
);
//累计收获加成比例
BigDecimal
totalPro
=
BigDecimal
.
valueOf
(
0
);
PlantPojo
plant
=
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
());
PlantPojo
plant
=
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
());
//花圃中已种植的植物个数
int
plantCount
=
nurseryInfo
.
getNumber
();
//----------------花圃收获加成-------------------
totalPro
=
totalPro
.
add
(
nurseryConfig
.
getAddHarvest
());
//----------------------技能的收获加成---------------------
totalPro
=
totalPro
.
add
(
TimingAcquisition
.
getAddProduction
(
uid
));
Integer
totalNum
=
totalPro
.
add
(
new
BigDecimal
(
1
)).
multiply
(
new
BigDecimal
(
fruitNum
*
plantCount
)).
intValue
();
//果实数量累加
fruit
.
setItemNum
(
totalNum
);
//遍历当前花圃中的所有植物
//遍历当前花圃中的所有植物
for
(
int
i
=
0
;
i
<
nurseryInfo
.
getNumber
();
i
++)
{
for
(
int
i
=
0
;
i
<
plantCount
;
i
++)
{
//花圃收获加成
Integer
totalNum
=
nurseryConfig
.
getAddHarvest
().
add
(
new
BigDecimal
(
1
)).
multiply
(
new
BigDecimal
(
fruitNum
)).
intValue
();
//果实数量累加
fruit
.
setItemNum
(
fruit
.
getItemNum
()
+
totalNum
);
List
<
ItemDto
>
plantDropItems
=
plantDropItem
(
plant
);
List
<
ItemDto
>
plantDropItems
=
plantDropItem
(
plant
);
//将植物掉落的果实合并到fruit中
//将植物掉落的果实合并到fruit中
for
(
int
j
=
0
;
j
<
plantDropItems
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
plantDropItems
.
size
();
j
++)
{
...
@@ -288,7 +293,7 @@ public class RandomDropUtil {
...
@@ -288,7 +293,7 @@ public class RandomDropUtil {
PetPojo
petPojo
=
entry
.
getValue
();
PetPojo
petPojo
=
entry
.
getValue
();
//宠物喜欢的植物
//宠物喜欢的植物
if
(!
StringUtils
.
isEmpty
(
petPojo
.
getFavoritePlantId
()))
{
if
(!
StringUtils
.
isEmpty
(
petPojo
.
getFavoritePlantId
()))
{
if
(
Constants
.
NON
.
toString
()
.
equals
(
petPojo
.
getFavoritePlantId
()))
{
if
(
Constants
.
NON
_STR
.
equals
(
petPojo
.
getFavoritePlantId
()))
{
List
<
String
>
favorPlantIdList
=
Arrays
.
asList
(
petPojo
.
getFavoritePlantId
().
split
(
"\\|"
));
List
<
String
>
favorPlantIdList
=
Arrays
.
asList
(
petPojo
.
getFavoritePlantId
().
split
(
"\\|"
));
if
(
favorPlantIdList
.
contains
(
nurseryInfo
.
getPlantId
().
toString
()))
{
if
(
favorPlantIdList
.
contains
(
nurseryInfo
.
getPlantId
().
toString
()))
{
//统计有概率出现的宠物
//统计有概率出现的宠物
...
...
src/main/java/com/qiwuai/garden/common/utils/RequestConversionUtil.java
View file @
290107a1
...
@@ -6,6 +6,7 @@ import com.qiwuai.garden.dto.GardenerDto;
...
@@ -6,6 +6,7 @@ import com.qiwuai.garden.dto.GardenerDto;
import
com.qiwuai.garden.dto.base.CommonRequest
;
import
com.qiwuai.garden.dto.base.CommonRequest
;
import
com.qiwuai.garden.dto.request.CallRequest
;
import
com.qiwuai.garden.dto.request.CallRequest
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.pojo.AttributePojo
;
import
com.qiwuai.garden.pojo.ItemPojo
;
import
com.qiwuai.garden.pojo.ItemPojo
;
import
com.qiwuai.garden.pojo.PlantPojo
;
import
com.qiwuai.garden.pojo.PlantPojo
;
import
com.qiwuai.garden.service.gardenerService.GardenerService
;
import
com.qiwuai.garden.service.gardenerService.GardenerService
;
...
@@ -16,6 +17,7 @@ import org.springframework.util.StringUtils;
...
@@ -16,6 +17,7 @@ import org.springframework.util.StringUtils;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
public
class
RequestConversionUtil
{
public
class
RequestConversionUtil
{
Logger
log
=
LoggerFactory
.
getLogger
(
RequestConversionUtil
.
class
);
Logger
log
=
LoggerFactory
.
getLogger
(
RequestConversionUtil
.
class
);
...
@@ -238,6 +240,15 @@ public class RequestConversionUtil {
...
@@ -238,6 +240,15 @@ public class RequestConversionUtil {
//-----------------存在物品属性------------------
//-----------------存在物品属性------------------
String
itemAttribute
=
callRequest
.
get
物品属性
();
String
itemAttribute
=
callRequest
.
get
物品属性
();
if
(!
StringUtils
.
isEmpty
(
itemAttribute
))
{
if
(!
StringUtils
.
isEmpty
(
itemAttribute
))
{
char
[]
attribute
=
itemAttribute
.
toCharArray
();
//所有属性
List
<
String
>
attributeNameList
=
TimingAcquisition
.
attributeMap
.
values
().
stream
().
map
(
AttributePojo:
:
getAttribute
).
collect
(
Collectors
.
toList
());
for
(
char
a
:
attribute
)
{
if
(
attributeNameList
.
contains
(
String
.
valueOf
(
a
)))
{
itemAttribute
=
String
.
valueOf
(
a
);
break
;
}
}
Integer
itemAttributeId
=
TimingAcquisition
.
getItemAttributeIdByName
(
itemAttribute
);
Integer
itemAttributeId
=
TimingAcquisition
.
getItemAttributeIdByName
(
itemAttribute
);
if
(!
StringUtils
.
isEmpty
(
itemAttributeId
))
{
if
(!
StringUtils
.
isEmpty
(
itemAttributeId
))
{
operationRequest
.
setItemAttributeId
(
itemAttributeId
);
operationRequest
.
setItemAttributeId
(
itemAttributeId
);
...
@@ -406,6 +417,17 @@ public class RequestConversionUtil {
...
@@ -406,6 +417,17 @@ public class RequestConversionUtil {
}
}
operationRequest
.
setOfflineDays
(
number
);
operationRequest
.
setOfflineDays
(
number
);
}
}
//-----------存在消息序号--------------
String
noticeNum
=
callRequest
.
get
消息序号
();
if
(!
StringUtils
.
isEmpty
(
noticeNum
))
{
//找到中文数字对应的阿拉伯数字
Integer
number
=
TypeConvertUtil
.
change2Integer
(
noticeNum
);
//中文中不包含中文数字时,提取阿拉伯数字
if
(
number
==
0
)
{
number
=
TypeConvertUtil
.
extractNum
(
noticeNum
);
}
operationRequest
.
setNoticeNum
(
number
);
}
//---------存在任务类型:1-养成任务,2-日常任务----------
//---------存在任务类型:1-养成任务,2-日常任务----------
String
taskType
=
callRequest
.
get
任务类型
();
String
taskType
=
callRequest
.
get
任务类型
();
if
(!
StringUtils
.
isEmpty
(
taskType
))
{
if
(!
StringUtils
.
isEmpty
(
taskType
))
{
...
...
src/main/java/com/qiwuai/garden/controller/CommonController.java
View file @
290107a1
...
@@ -76,8 +76,21 @@ public class CommonController {
...
@@ -76,8 +76,21 @@ public class CommonController {
@PostMapping
(
value
=
"/call"
,
produces
=
"application/json;charset=UTF-8"
)
@PostMapping
(
value
=
"/call"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
startGame
(
@RequestBody
CommonRequest
commonRequest
)
throws
ParseException
{
public
CommonResponse
startGame
(
@RequestBody
CommonRequest
commonRequest
)
throws
ParseException
{
log
.
info
(
commonRequest
.
getUid
()
+
"当前操作的原始请求参数:"
+
commonRequest
.
getVars
());
log
.
info
(
commonRequest
.
getUid
()
+
"当前操作的原始请求参数:"
+
commonRequest
.
getVars
());
OperationRequest
operationReq
=
RequestConversionUtil
.
request2Operation
(
commonRequest
);
CommonResponse
result
=
new
CommonResponse
();
CommonResponse
result
=
new
CommonResponse
();
//玩家没有提供uid
if
(
StringUtils
.
isEmpty
(
commonRequest
.
getUid
()))
{
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
ResultResponse
resultResponse
=
new
ResultResponse
();
log
.
info
(
"未提供uid,无法创建用户"
);
result
.
setCode
(
1
);
result
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100003
);
resultResponse
.
set
反馈文本
(
"未提供uid,无法创建用户"
);
resultVarsResponse
.
setVars
(
resultResponse
);
result
.
setData
(
resultVarsResponse
);
return
result
;
}
OperationRequest
operationReq
=
RequestConversionUtil
.
request2Operation
(
commonRequest
);
String
operateName
=
commonRequest
.
getVars
().
get
操作名
();
String
operateName
=
commonRequest
.
getVars
().
get
操作名
();
log
.
info
(
operationReq
.
getUid
()
+
"开始执行操作:【"
+
operateName
+
"】, 请求参数:"
+
operationReq
);
log
.
info
(
operationReq
.
getUid
()
+
"开始执行操作:【"
+
operateName
+
"】, 请求参数:"
+
operationReq
);
//操作名为null
//操作名为null
...
@@ -304,6 +317,9 @@ public class CommonController {
...
@@ -304,6 +317,9 @@ public class CommonController {
case
"取消出售指令"
:
case
"取消出售指令"
:
result
=
marketServiceProxy
.
sellCancel
(
operationReq
);
result
=
marketServiceProxy
.
sellCancel
(
operationReq
);
break
;
break
;
case
"出售宠物指令"
:
result
=
marketServiceProxy
.
sellPetCheck
(
operationReq
);
break
;
case
"统一出售指令"
:
case
"统一出售指令"
:
result
=
marketServiceProxy
.
sellAllCheck
(
operationReq
);
result
=
marketServiceProxy
.
sellAllCheck
(
operationReq
);
break
;
break
;
...
@@ -316,9 +332,15 @@ public class CommonController {
...
@@ -316,9 +332,15 @@ public class CommonController {
case
"确认取消指令"
:
case
"确认取消指令"
:
result
=
marketServiceProxy
.
cancel
(
operationReq
);
result
=
marketServiceProxy
.
cancel
(
operationReq
);
break
;
break
;
case
"打开商店指令"
:
result
=
marketServiceProxy
.
openShop
(
operationReq
);
break
;
case
"查询商品指令"
:
case
"查询商品指令"
:
result
=
marketServiceProxy
.
goodsCheck
(
operationReq
);
result
=
marketServiceProxy
.
goodsCheck
(
operationReq
);
break
;
break
;
case
"退出商店指令"
:
result
=
marketServiceProxy
.
quitShop
(
operationReq
);
break
;
case
"拜访陌生人"
:
case
"拜访陌生人"
:
case
"拜访好友"
:
case
"拜访好友"
:
result
=
socialServiceProxy
.
visitStrangerCheck
(
operationReq
);
//拜访好友的方法跟拜访陌生人一样
result
=
socialServiceProxy
.
visitStrangerCheck
(
operationReq
);
//拜访好友的方法跟拜访陌生人一样
...
...
src/main/java/com/qiwuai/garden/dto/base/ResultResponse.java
View file @
290107a1
package
com
.
qiwuai
.
garden
.
dto
.
base
;
package
com
.
qiwuai
.
garden
.
dto
.
base
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
...
@@ -43,11 +44,25 @@ public class ResultResponse {
...
@@ -43,11 +44,25 @@ public class ResultResponse {
/**
/**
* 玩家称呼,bot话题模块需要该变量
* 玩家称呼,bot话题模块需要该变量
*/
*/
private
String
玩家称呼
;
@JsonProperty
(
"GB_玩家称呼"
)
private
String
GB_
玩家称呼
;
/**
/**
* 玩家第二人称称呼,bot话题模块需要该变量
* 玩家第二人称称呼,bot话题模块需要该变量
*/
*/
private
String
玩家第二人称称呼
;
@JsonProperty
(
"GB_玩家第二人称称呼"
)
private
String
GB_
玩家第二人称称呼
;
/**
* 是否有宠物,bot话题模块需要该变量
*/
private
String
是否有宠物
=
"否"
;
/**
* 是否有植物,bot话题模块需要该变量
*/
private
String
是否有植物
=
"否"
;
/**
* 是否开启日常任务,bot话题模块需要该变量
*/
private
String
是否开启日常任务
=
"否"
;
/***************************用于清空bot端保留的变量***********************************/
/***************************用于清空bot端保留的变量***********************************/
/**
/**
...
...
src/main/java/com/qiwuai/garden/dto/request/CallRequest.java
View file @
290107a1
...
@@ -58,6 +58,7 @@ public class CallRequest {
...
@@ -58,6 +58,7 @@ public class CallRequest {
/**
/**
* 玩家称呼
* 玩家称呼
*/
*/
@JsonProperty
(
value
=
"GB_玩家称呼"
)
private
String
玩家称呼
;
private
String
玩家称呼
;
/**
/**
* 所属地区
* 所属地区
...
@@ -140,6 +141,10 @@ public class CallRequest {
...
@@ -140,6 +141,10 @@ public class CallRequest {
*/
*/
private
String
离线时长
;
private
String
离线时长
;
/**
/**
* 消息序号
*/
private
String
消息序号
;
/**
* 任务类型
* 任务类型
*/
*/
private
String
任务类型
;
private
String
任务类型
;
...
...
src/main/java/com/qiwuai/garden/dto/request/OperationRequest.java
View file @
290107a1
...
@@ -159,6 +159,10 @@ public class OperationRequest {
...
@@ -159,6 +159,10 @@ public class OperationRequest {
*/
*/
private
Integer
offlineDays
;
private
Integer
offlineDays
;
/**
/**
* 消息序号
*/
private
Integer
noticeNum
;
/**
* 任务类型
* 任务类型
*/
*/
private
Integer
taskType
;
private
Integer
taskType
;
...
...
src/main/java/com/qiwuai/garden/pojo/ItemPojo.java
View file @
290107a1
...
@@ -13,6 +13,10 @@ public class ItemPojo {
...
@@ -13,6 +13,10 @@ public class ItemPojo {
*/
*/
private
String
name
;
private
String
name
;
/**
/**
* 物品别名
*/
private
String
alias
;
/**
* 物品描述
* 物品描述
*/
*/
private
String
description
;
private
String
description
;
...
...
src/main/java/com/qiwuai/garden/pojo/PetPojo.java
View file @
290107a1
...
@@ -15,6 +15,10 @@ public class PetPojo {
...
@@ -15,6 +15,10 @@ public class PetPojo {
*/
*/
private
String
name
;
private
String
name
;
/**
/**
* 宠物别名
*/
private
String
alias
;
/**
* 种类id:1-虫,2-灵兽,3-飞禽,4-精灵等
* 种类id:1-虫,2-灵兽,3-飞禽,4-精灵等
*/
*/
private
Integer
typeId
;
private
Integer
typeId
;
...
...
src/main/java/com/qiwuai/garden/pojo/PlantPojo.java
View file @
290107a1
...
@@ -15,6 +15,10 @@ public class PlantPojo {
...
@@ -15,6 +15,10 @@ public class PlantPojo {
*/
*/
private
String
name
;
private
String
name
;
/**
/**
* 植物别名
*/
private
String
alias
;
/**
* 植物描述
* 植物描述
*/
*/
private
String
description
;
private
String
description
;
...
...
src/main/java/com/qiwuai/garden/service/backPackService/impl/BackPackServiceImpl.java
View file @
290107a1
package
com
.
qiwuai
.
garden
.
service
.
backPackService
.
impl
;
package
com
.
qiwuai
.
garden
.
service
.
backPackService
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.utils.PersistenceUtil
;
import
com.qiwuai.garden.common.utils.SpeechUtil
;
import
com.qiwuai.garden.common.utils.SpeechUtil
;
import
com.qiwuai.garden.dto.GardenerDto
;
import
com.qiwuai.garden.dto.ItemBagDto
;
import
com.qiwuai.garden.dto.ItemBagDto
;
import
com.qiwuai.garden.dto.ItemDto
;
import
com.qiwuai.garden.dto.ItemDto
;
import
com.qiwuai.garden.dto.base.CommonResponse
;
import
com.qiwuai.garden.dto.base.CommonResponse
;
import
com.qiwuai.garden.dto.base.ResultResponse
;
import
com.qiwuai.garden.dto.base.ResultResponse
;
import
com.qiwuai.garden.dto.base.ResultVarsResponse
;
import
com.qiwuai.garden.dto.base.ResultVarsResponse
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.pojo.ItemPojo
;
import
com.qiwuai.garden.pojo.*
;
import
com.qiwuai.garden.pojo.ItemTypePojo
;
import
com.qiwuai.garden.pojo.PlantPojo
;
import
com.qiwuai.garden.pojo.QuantityRangePojo
;
import
com.qiwuai.garden.service.backPackService.BackPackService
;
import
com.qiwuai.garden.service.backPackService.BackPackService
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -92,6 +92,8 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -92,6 +92,8 @@ public class BackPackServiceImpl implements BackPackService {
log
.
info
(
uid
+
"开始根据物品种类查看背包详情"
);
log
.
info
(
uid
+
"开始根据物品种类查看背包详情"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//物品种类
//物品种类
List
<
String
>
itemTypeList
=
TimingAcquisition
.
itemTypeMap
.
values
().
stream
().
map
(
ItemTypePojo:
:
getDescription
).
collect
(
Collectors
.
toList
());
List
<
String
>
itemTypeList
=
TimingAcquisition
.
itemTypeMap
.
values
().
stream
().
map
(
ItemTypePojo:
:
getDescription
).
collect
(
Collectors
.
toList
());
String
itemTypes
=
String
.
join
(
"、"
,
itemTypeList
);
String
itemTypes
=
String
.
join
(
"、"
,
itemTypeList
);
...
@@ -101,6 +103,7 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -101,6 +103,7 @@ public class BackPackServiceImpl implements BackPackService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"view_back_pack_item_fail_no_type"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"view_back_pack_item_fail_no_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemTypes
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemTypes
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"view_back_pack_item_fail_no_type"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"view_back_pack_item_fail_no_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200403
);
resultResponse
.
set
反馈
ID
(
200403
);
...
@@ -118,6 +121,7 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -118,6 +121,7 @@ public class BackPackServiceImpl implements BackPackService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"view_back_pack_item_fail_not_exist"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"view_back_pack_item_fail_not_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemTypes
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemTypes
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"view_back_pack_item_fail_not_exist"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"view_back_pack_item_fail_not_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200404
);
resultResponse
.
set
反馈
ID
(
200404
);
...
@@ -194,6 +198,7 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -194,6 +198,7 @@ public class BackPackServiceImpl implements BackPackService {
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"view_back_pack_item_few"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"view_back_pack_item_few"
);
resultResponse
.
set
后台附加返回
(
"查看背包回复2"
);
resultResponse
.
set
后台附加返回
(
"查看背包回复2"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
log
.
info
(
"物品详情查询结果:"
+
feedText
.
toString
());
log
.
info
(
"物品详情查询结果:"
+
feedText
.
toString
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -222,6 +227,8 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -222,6 +227,8 @@ public class BackPackServiceImpl implements BackPackService {
ItemDto
money
=
itemBags
.
get
(
Constants
.
ITEM_TYPE_MONEY
).
getItems
(
moneyId
);
ItemDto
money
=
itemBags
.
get
(
Constants
.
ITEM_TYPE_MONEY
).
getItems
(
moneyId
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//数量范围配置信息
//数量范围配置信息
Map
<
Integer
,
QuantityRangePojo
>
quantityRangeMap
=
TimingAcquisition
.
quantityRangeMap
;
Map
<
Integer
,
QuantityRangePojo
>
quantityRangeMap
=
TimingAcquisition
.
quantityRangeMap
;
//保存货币数量范围
//保存货币数量范围
...
@@ -249,7 +256,7 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -249,7 +256,7 @@ public class BackPackServiceImpl implements BackPackService {
}
else
{
//背包货币数量少的情况,园丁的回答
}
else
{
//背包货币数量少的情况,园丁的回答
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"view_money_few"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"view_money_few"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
log
.
info
(
"货币查询结果:"
+
money
.
getItemNum
());
log
.
info
(
"货币查询结果:"
+
money
.
getItemNum
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -272,11 +279,14 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -272,11 +279,14 @@ public class BackPackServiceImpl implements BackPackService {
log
.
info
(
uid
+
"开始检索物品信息"
);
log
.
info
(
uid
+
"开始检索物品信息"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家没提供物品名称
//玩家没提供物品名称
if
(
StringUtils
.
isEmpty
(
itemId
))
{
if
(
StringUtils
.
isEmpty
(
itemId
))
{
log
.
info
(
uid
+
"玩家没提供查看的物品名称"
);
log
.
info
(
uid
+
"玩家没提供查看的物品名称"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"search_item_info_no_item"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"search_item_info_no_item"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200603
);
resultResponse
.
set
反馈
ID
(
200603
);
...
@@ -292,6 +302,7 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -292,6 +302,7 @@ public class BackPackServiceImpl implements BackPackService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_item_info_no_exist"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_item_info_no_exist"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"search_item_info_no_exist"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"search_item_info_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200604
);
resultResponse
.
set
反馈
ID
(
200604
);
...
@@ -323,6 +334,7 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -323,6 +334,7 @@ public class BackPackServiceImpl implements BackPackService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfig
.
getName
(),
itemConfig
.
getDescription
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfig
.
getName
(),
itemConfig
.
getDescription
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"search_item_info_item_none"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"search_item_info_item_none"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
log
.
info
(
uid
+
"没有检索到物品信息:"
+
itemConfig
.
getName
());
log
.
info
(
uid
+
"没有检索到物品信息:"
+
itemConfig
.
getName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -373,6 +385,12 @@ public class BackPackServiceImpl implements BackPackService {
...
@@ -373,6 +385,12 @@ public class BackPackServiceImpl implements BackPackService {
//给玩家扣除物品
//给玩家扣除物品
TimingAcquisition
.
addAwardItem
(
uid
,
awardItemList
);
TimingAcquisition
.
addAwardItem
(
uid
,
awardItemList
);
}
}
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200901
);
resultResponse
.
set
反馈
ID
(
200901
);
...
...
src/main/java/com/qiwuai/garden/service/gardenerService/impl/GardenerServiceImpl.java
View file @
290107a1
...
@@ -380,7 +380,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -380,7 +380,7 @@ public class GardenerServiceImpl implements GardenerService {
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100002
);
resultResponse
.
set
反馈
ID
(
100002
);
resultResponse
.
set
反馈文本
(
"园丁性别已改为"
+
((
gender
==
2
)
?
"男生"
:
"女生"
));
resultResponse
.
set
反馈文本
(
"园丁性别已改为"
+
((
gender
==
1
)
?
"男生"
:
"女生"
));
resultVarsResponse
.
setVars
(
resultResponse
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
...
@@ -399,15 +399,21 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -399,15 +399,21 @@ public class GardenerServiceImpl implements GardenerService {
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
log
.
info
(
uid
+
"开始更改玩家称呼"
+
gardenerInfo
.
getCallNameId
()
+
"为"
+
callNameId
);
log
.
info
(
uid
+
"开始更改玩家称呼"
+
gardenerInfo
.
getCallNameId
()
+
"为"
+
callNameId
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//该玩家可选择的称呼
String
callNameText
=
TimingAcquisition
.
getCallNameByGender
(
uid
);
//玩家未提供称呼
//玩家未提供称呼
if
(
StringUtils
.
isEmpty
(
callNameId
))
{
if
(
StringUtils
.
isEmpty
(
callNameId
))
{
log
.
info
(
uid
+
"未提供玩家称呼,无法更改称呼"
);
log
.
info
(
uid
+
"未提供玩家称呼,无法更改称呼"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_call_name_change_fail_null"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_call_name_change_fail_null"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
gardenerInfo
.
getName
(),
callNameText
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
1000104
);
resultResponse
.
set
反馈
ID
(
200901
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"更改称呼回复1"
);
resultVarsResponse
.
setVars
(
resultResponse
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
...
@@ -417,9 +423,10 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -417,9 +423,10 @@ public class GardenerServiceImpl implements GardenerService {
log
.
info
(
uid
+
"提供的玩家称呼不存在"
);
log
.
info
(
uid
+
"提供的玩家称呼不存在"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_call_name_change_fail_not_exist"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_call_name_change_fail_not_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callNameText
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
1000105
);
resultResponse
.
set
反馈
ID
(
200902
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
resultVarsResponse
.
setVars
(
resultResponse
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
...
@@ -428,15 +435,15 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -428,15 +435,15 @@ public class GardenerServiceImpl implements GardenerService {
CallNamePojo
callNamePojo
=
TimingAcquisition
.
callNameMap
.
get
(
callNameId
);
CallNamePojo
callNamePojo
=
TimingAcquisition
.
callNameMap
.
get
(
callNameId
);
assert
callNamePojo
!=
null
;
assert
callNamePojo
!=
null
;
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_call_name_change_success"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_call_name_change_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callNamePojo
.
getName
(),
callName
Pojo
.
getSubName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callNamePojo
.
getName
(),
callName
.
getSubName
());
gardenerInfo
.
setCallNameId
(
callNameId
);
gardenerInfo
.
setCallNameId
(
callNameId
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
10001
03
);
resultResponse
.
set
反馈
ID
(
2009
03
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
玩家称呼
(
callNamePojo
.
getName
());
resultResponse
.
set
GB_
玩家称呼
(
callNamePojo
.
getName
());
resultResponse
.
set
玩家第二人称称呼
(
callNamePojo
.
getSubName
());
resultResponse
.
set
GB_
玩家第二人称称呼
(
callNamePojo
.
getSubName
());
resultVarsResponse
.
setVars
(
resultResponse
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
...
@@ -478,12 +485,15 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -478,12 +485,15 @@ public class GardenerServiceImpl implements GardenerService {
GardenerInfoDto
gardenerInfo
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
();
GardenerInfoDto
gardenerInfo
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
();
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//园丁等级上限
//园丁等级上限
int
GardenerLVMax
=
Integer
.
parseInt
(
TimingAcquisition
.
systemConfigMap
.
get
(
"gardener_level_max"
).
getValue
());
int
GardenerLVMax
=
Integer
.
parseInt
(
TimingAcquisition
.
systemConfigMap
.
get
(
"gardener_level_max"
).
getValue
());
if
((
gardenerInfo
.
getLevel
()
+
1
)
>
GardenerLVMax
)
{
//已经达到最大等级
if
((
gardenerInfo
.
getLevel
()
+
1
)
>
GardenerLVMax
)
{
//已经达到最大等级
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail_had"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail_had"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200108
);
resultResponse
.
set
反馈
ID
(
200108
);
...
@@ -539,6 +549,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -539,6 +549,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_check"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerInfo
.
getLevel
().
toString
(),
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerInfo
.
getLevel
().
toString
(),
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_check"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200101
);
resultResponse
.
set
反馈
ID
(
200101
);
...
@@ -560,6 +571,8 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -560,6 +571,8 @@ public class GardenerServiceImpl implements GardenerService {
log
.
info
(
uid
+
"开始升级园丁等级"
);
log
.
info
(
uid
+
"开始升级园丁等级"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//园丁等级上限
//园丁等级上限
int
GardenerLVMax
=
Integer
.
parseInt
(
TimingAcquisition
.
systemConfigMap
.
get
(
"gardener_level_max"
).
getValue
());
int
GardenerLVMax
=
Integer
.
parseInt
(
TimingAcquisition
.
systemConfigMap
.
get
(
"gardener_level_max"
).
getValue
());
//园丁基本信息
//园丁基本信息
...
@@ -568,6 +581,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -568,6 +581,7 @@ public class GardenerServiceImpl implements GardenerService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail_had"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail_had"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200109
);
resultResponse
.
set
反馈
ID
(
200109
);
...
@@ -613,6 +627,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -613,6 +627,7 @@ public class GardenerServiceImpl implements GardenerService {
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail_task"
);
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail_task"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail_task"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail_task"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
number
=
200102
;
number
=
200102
;
resultResponse
.
set
后台附加返回
(
"升级园丁回复5"
);
resultResponse
.
set
后台附加返回
(
"升级园丁回复5"
);
}
else
{
//满足升级条件
}
else
{
//满足升级条件
...
@@ -632,6 +647,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -632,6 +647,7 @@ public class GardenerServiceImpl implements GardenerService {
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail"
);
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
后台附加返回
(
"升级园丁回复2"
);
resultResponse
.
set
后台附加返回
(
"升级园丁回复2"
);
break
;
break
;
}
}
...
@@ -642,6 +658,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -642,6 +658,7 @@ public class GardenerServiceImpl implements GardenerService {
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail"
);
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
后台附加返回
(
"升级园丁回复2"
);
resultResponse
.
set
后台附加返回
(
"升级园丁回复2"
);
break
;
break
;
}
}
...
@@ -700,18 +717,24 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -700,18 +717,24 @@ public class GardenerServiceImpl implements GardenerService {
//将玩家当前可学习的技能保存到缓存的list中
//将玩家当前可学习的技能保存到缓存的list中
List
<
Integer
>
skillIds
=
Stream
.
of
(
skillIdList
).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
skillIds
=
Stream
.
of
(
skillIdList
).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
operationReq
.
setList
(
skillIds
);
operationReq
.
setList
(
skillIds
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_success"
);
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_success"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
后台附加返回
(
"升级园丁回复3"
);
resultResponse
.
set
后台附加返回
(
"升级园丁回复3"
);
//---------------------新手引导的园丁升级至2任务完成------------------------
//---------------------新手引导的园丁升级至2任务完成------------------------
if
(
"完成10010"
.
equals
(
noviceGuide
)
&&
gardenerInfo
.
getLevel
()
==
2
)
{
//
if ("完成10010".equals(noviceGuide) && gardenerInfo.getLevel() == 2) {
resultResponse
.
set
任务完成
(
"10011"
);
//
resultResponse.set任务完成("10011");
log
.
info
(
uid
+
"新手引导的园丁升级任务10011已完成"
);
//
log.info(uid + "新手引导的园丁升级任务10011已完成");
}
//
}
//---------------------新手引导的园丁升级至3任务完成------------------------
//---------------------新手引导的园丁升级至3任务完成------------------------
if
(
"完成10018"
.
equals
(
noviceGuide
)
&&
gardenerInfo
.
getLevel
()
=
=
3
)
{
if
(
"完成10018"
.
equals
(
noviceGuide
)
&&
gardenerInfo
.
getLevel
()
>
=
3
)
{
resultResponse
.
set
任务完成
(
"10019"
);
resultResponse
.
set
任务完成
(
"10019"
);
log
.
info
(
uid
+
"新手引导的园丁升级任务10019已完成"
);
log
.
info
(
uid
+
"新手引导的园丁升级任务10019已完成"
);
}
}
...
@@ -746,9 +769,12 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -746,9 +769,12 @@ public class GardenerServiceImpl implements GardenerService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_cancel"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"gardener_upgrade_cancel"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_cancel"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"gardener_upgrade_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200110
);
resultResponse
.
set
反馈
ID
(
200110
);
...
@@ -804,6 +830,8 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -804,6 +830,8 @@ public class GardenerServiceImpl implements GardenerService {
Integer
skillId
=
operationReq
.
getSkillId
();
Integer
skillId
=
operationReq
.
getSkillId
();
Integer
rank
=
operationReq
.
getRank
();
//玩家说的序号
Integer
rank
=
operationReq
.
getRank
();
//玩家说的序号
log
.
info
(
uid
+
"开始查看技能信息,技能id:"
+
skillId
+
",或者序号:"
+
rank
);
log
.
info
(
uid
+
"开始查看技能信息,技能id:"
+
skillId
+
",或者序号:"
+
rank
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
//园丁已学习了技能的当前最大等级
//园丁已学习了技能的当前最大等级
...
@@ -871,6 +899,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -871,6 +899,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_fail_no_skill"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_fail_no_skill"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_fail_no_skill"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_fail_no_skill"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200111
);
resultResponse
.
set
反馈
ID
(
200111
);
...
@@ -887,6 +916,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -887,6 +916,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_fail_no_exist"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_fail_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_fail_no_exist"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_fail_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200112
);
resultResponse
.
set
反馈
ID
(
200112
);
...
@@ -965,6 +995,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -965,6 +995,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_check"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerSkill
.
getName
(),
description
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerSkill
.
getName
(),
description
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_check"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200105
);
resultResponse
.
set
反馈
ID
(
200105
);
...
@@ -983,6 +1014,8 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -983,6 +1014,8 @@ public class GardenerServiceImpl implements GardenerService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
log
.
info
(
uid
+
"园丁开始学习新技能"
);
log
.
info
(
uid
+
"园丁开始学习新技能"
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -1036,6 +1069,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1036,6 +1069,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_fail_not_allow"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_fail_not_allow"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_fail_not_allow"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_fail_not_allow"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200114
);
resultResponse
.
set
反馈
ID
(
200114
);
...
@@ -1056,10 +1090,16 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1056,10 +1090,16 @@ public class GardenerServiceImpl implements GardenerService {
gardenerSkills
.
put
(
level
,
newSkill
);
gardenerSkills
.
put
(
level
,
newSkill
);
gardenerInfo
.
setSkills
(
gardenerSkills
);
gardenerInfo
.
setSkills
(
gardenerSkills
);
log
.
info
(
"园丁学习到的技能id:"
+
skillId
);
log
.
info
(
"园丁学习到的技能id:"
+
skillId
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_success"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerSkillMap
.
get
(
skillId
).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerSkillMap
.
get
(
skillId
).
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_success"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//针对已经重置技能的情况,玩家还有等级没有学习技能则接着学习
//针对已经重置技能的情况,玩家还有等级没有学习技能则接着学习
int
[]
maxLevel
=
{
0
};
//需要形参影响实参
int
[]
maxLevel
=
{
0
};
//需要形参影响实参
ResultResponse
result
=
searchSkillBeforeLearn
(
uid
,
maxLevel
);
ResultResponse
result
=
searchSkillBeforeLearn
(
uid
,
maxLevel
);
...
@@ -1089,10 +1129,16 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1089,10 +1129,16 @@ public class GardenerServiceImpl implements GardenerService {
gardenerSkills
.
put
(
level
,
newSkill
);
gardenerSkills
.
put
(
level
,
newSkill
);
gardenerInfo
.
setSkills
(
gardenerSkills
);
gardenerInfo
.
setSkills
(
gardenerSkills
);
log
.
info
(
"园丁学习到的技能id:"
+
skillId
);
log
.
info
(
"园丁学习到的技能id:"
+
skillId
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_success"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerSkillMap
.
get
(
skillId
).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerSkillMap
.
get
(
skillId
).
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_success"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//针对已经重置技能的情况,玩家还有等级没有学习技能则接着学习
//针对已经重置技能的情况,玩家还有等级没有学习技能则接着学习
int
[]
maxLevel
=
{
0
};
//需要形参影响实参
int
[]
maxLevel
=
{
0
};
//需要形参影响实参
ResultResponse
result
=
searchSkillBeforeLearn
(
uid
,
maxLevel
);
ResultResponse
result
=
searchSkillBeforeLearn
(
uid
,
maxLevel
);
...
@@ -1122,6 +1168,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1122,6 +1168,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_fail_had"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_fail_had"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_fail_had"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
// CacheGlobal.concurrentMap.remove(uid);
// CacheGlobal.concurrentMap.remove(uid);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
...
@@ -1139,9 +1186,15 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1139,9 +1186,15 @@ public class GardenerServiceImpl implements GardenerService {
newSkill
.
setName
(
gardenerSkillMap
.
get
(
skillId
).
getName
());
newSkill
.
setName
(
gardenerSkillMap
.
get
(
skillId
).
getName
());
gardenerSkills
.
put
(
level
,
newSkill
);
gardenerSkills
.
put
(
level
,
newSkill
);
//获取对应话术
//获取对应话术
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_success"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerSkillMap
.
get
(
skillId
).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerSkillMap
.
get
(
skillId
).
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_success"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//针对已经重置技能的情况,玩家还有等级没有学习技能则接着学习
//针对已经重置技能的情况,玩家还有等级没有学习技能则接着学习
int
[]
maxLevel
=
{
0
};
//需要形参影响实参
int
[]
maxLevel
=
{
0
};
//需要形参影响实参
ResultResponse
result
=
searchSkillBeforeLearn
(
uid
,
maxLevel
);
ResultResponse
result
=
searchSkillBeforeLearn
(
uid
,
maxLevel
);
...
@@ -1173,6 +1226,8 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1173,6 +1226,8 @@ public class GardenerServiceImpl implements GardenerService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
log
.
info
(
uid
+
"开始查看当前等级的所有技能信息"
);
log
.
info
(
uid
+
"开始查看当前等级的所有技能信息"
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -1200,6 +1255,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1200,6 +1255,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_cancel"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"learn_skill_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_cancel"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"learn_skill_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//保存玩家这轮的请求信息,用于下一步的操作
//保存玩家这轮的请求信息,用于下一步的操作
operationReq
.
setLevel
(
level
);
operationReq
.
setLevel
(
level
);
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
...
@@ -1232,6 +1288,8 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1232,6 +1288,8 @@ public class GardenerServiceImpl implements GardenerService {
int
resetMax
=
Integer
.
parseInt
(
skillResetMax
.
getValue
());
int
resetMax
=
Integer
.
parseInt
(
skillResetMax
.
getValue
());
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//超过重置次数上限,统一按上限次数的费用计算
//超过重置次数上限,统一按上限次数的费用计算
if
((
skillResetTimes
+
1
)
>
resetMax
)
{
if
((
skillResetTimes
+
1
)
>
resetMax
)
{
skillResetTimes
=
resetMax
-
1
;
skillResetTimes
=
resetMax
-
1
;
...
@@ -1245,8 +1303,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1245,8 +1303,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_check"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
skillResetCost
),
moneyConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
skillResetCost
),
moneyConfig
.
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_check"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_check"
);
log
.
info
(
text
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200201
);
resultResponse
.
set
反馈
ID
(
200201
);
...
@@ -1267,6 +1324,8 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1267,6 +1324,8 @@ public class GardenerServiceImpl implements GardenerService {
log
.
info
(
uid
+
"开始重置园丁技能"
);
log
.
info
(
uid
+
"开始重置园丁技能"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//园丁基本信息
//园丁基本信息
GardenerInfoDto
gardenerInfo
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
();
GardenerInfoDto
gardenerInfo
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
();
//园丁等级
//园丁等级
...
@@ -1276,6 +1335,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1276,6 +1335,7 @@ public class GardenerServiceImpl implements GardenerService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_fail_level"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_fail_level"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_fail_level"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_fail_level"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200205
);
resultResponse
.
set
反馈
ID
(
200205
);
...
@@ -1284,11 +1344,24 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1284,11 +1344,24 @@ public class GardenerServiceImpl implements GardenerService {
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
}
}
//玩家没有技能
if
(
StringUtils
.
isEmpty
(
gardenerInfo
.
getSkills
()))
{
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_fail_null"
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200206
);
resultResponse
.
set
反馈文本
(
text
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
//已重置过技能
//已重置过技能
if
(
gardenerInfo
.
getSkills
().
size
()
==
0
)
{
if
(
gardenerInfo
.
getSkills
().
size
()
==
0
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_fail_had"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_fail_had"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200202
);
resultResponse
.
set
反馈
ID
(
200202
);
...
@@ -1323,7 +1396,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1323,7 +1396,7 @@ public class GardenerServiceImpl implements GardenerService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_fail_money"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_fail_money"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_fail_money"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_fail_money"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
moneyConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
moneyConfig
.
getName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200203
);
resultResponse
.
set
反馈
ID
(
200203
);
...
@@ -1355,10 +1428,16 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1355,10 +1428,16 @@ public class GardenerServiceImpl implements GardenerService {
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
//技能重置花费信息
//技能重置花费信息
ItemPojo
moneyConfig
=
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
);
ItemPojo
moneyConfig
=
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_success"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
skillResetCost
),
moneyConfig
.
getName
(),
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
skillResetCost
),
moneyConfig
.
getName
(),
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_success"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//保存玩家这轮的请求信息,用于下一步的操作
//保存玩家这轮的请求信息,用于下一步的操作
log
.
info
(
uid
+
"重置技能后的下一等级为"
+
level
);
log
.
info
(
uid
+
"重置技能后的下一等级为"
+
level
);
//将玩家当前可学习的技能保存到缓存的list中
//将玩家当前可学习的技能保存到缓存的list中
...
@@ -1387,9 +1466,12 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1387,9 +1466,12 @@ public class GardenerServiceImpl implements GardenerService {
log
.
info
(
uid
+
"开始依次查询哪些等级还未学习技能"
);
log
.
info
(
uid
+
"开始依次查询哪些等级还未学习技能"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_cancel"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"reset_skill_cancel"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_cancel"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"reset_skill_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//清除本轮对话缓存数据
//清除本轮对话缓存数据
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
...
@@ -1418,18 +1500,17 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1418,18 +1500,17 @@ public class GardenerServiceImpl implements GardenerService {
Map
<
Integer
,
GardenerSkillPojo
>
gardenerSkillMap
=
TimingAcquisition
.
gardenerSkillMap
;
Map
<
Integer
,
GardenerSkillPojo
>
gardenerSkillMap
=
TimingAcquisition
.
gardenerSkillMap
;
//园丁现有技能
//园丁现有技能
Map
<
Integer
,
GardenerSkillDto
>
gardenerSkills
=
gardenerInfo
.
getSkills
();
Map
<
Integer
,
GardenerSkillDto
>
gardenerSkills
=
gardenerInfo
.
getSkills
();
//找出现有技能中对应的最大等级
//找出现有技能中对应的最大等级
int
maxLevel
;
int
maxLevel
=
1
;
if
(
gardenerSkills
.
size
()
==
0
)
{
//没有技能,则从1开始
//玩家还没有技能
maxLevel
=
1
;
if
(!
StringUtils
.
isEmpty
(
gardenerSkills
))
{
}
else
{
//有技能则从等级最大值开始(最小为2)
if
(
gardenerSkills
.
size
()
!=
0
)
{
//有技能则从等级最大值开始(最小为2)
Set
<
Integer
>
keySet
=
gardenerSkills
.
keySet
();
Set
<
Integer
>
keySet
=
gardenerSkills
.
keySet
();
Object
[]
obj
=
keySet
.
toArray
();
Object
[]
obj
=
keySet
.
toArray
();
Arrays
.
sort
(
obj
);
Arrays
.
sort
(
obj
);
maxLevel
=
Integer
.
parseInt
(
obj
[
obj
.
length
-
1
].
toString
());
maxLevel
=
Integer
.
parseInt
(
obj
[
obj
.
length
-
1
].
toString
());
}
}
}
//技能的等级要小于等于园丁的等级,大于则已学习完毕
//技能的等级要小于等于园丁的等级,大于则已学习完毕
if
((
maxLevel
+
1
)
>
gardenerInfo
.
getLevel
())
{
if
((
maxLevel
+
1
)
>
gardenerInfo
.
getLevel
())
{
log
.
info
(
"所有技能已学习完毕"
);
log
.
info
(
"所有技能已学习完毕"
);
...
@@ -1469,10 +1550,19 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1469,10 +1550,19 @@ public class GardenerServiceImpl implements GardenerService {
log
.
info
(
uid
+
"开始查询园丁更名所需条件"
);
log
.
info
(
uid
+
"开始查询园丁更名所需条件"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
String
renameMin
=
TimingAcquisition
.
systemConfigMap
.
get
(
"rename_min"
).
getValue
();
String
renameMax
=
TimingAcquisition
.
systemConfigMap
.
get
(
"rename_max"
).
getValue
();
if
(
StringUtils
.
isEmpty
(
rename
))
{
if
(
StringUtils
.
isEmpty
(
rename
))
{
log
.
info
(
"没有名称,修改不了"
);
log
.
info
(
uid
+
"没有提供名称,修改不了"
);
//园丁名称
String
gardenerName
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getName
();
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail_no_name"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail_no_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerName
,
renameMin
,
renameMax
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail_no_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200301
);
resultResponse
.
set
反馈
ID
(
200301
);
...
@@ -1482,6 +1572,21 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1482,6 +1572,21 @@ public class GardenerServiceImpl implements GardenerService {
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
}
}
//园丁名称字数不在限制范围内
if
(
rename
.
length
()
<
Integer
.
parseInt
(
renameMin
)
||
rename
.
length
()
>
Integer
.
parseInt
(
renameMax
))
{
log
.
info
(
uid
+
"提供的园丁名称:"
+
rename
+
"不在限制长度"
+
renameMin
+
"到"
+
renameMax
+
"内"
);
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
renameMin
,
renameMax
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200307
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"更改园丁姓名回复1"
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
//更名所需费用
//更名所需费用
String
renameCost
=
TimingAcquisition
.
systemConfigMap
.
get
(
"rename_cost"
).
getValue
();
String
renameCost
=
TimingAcquisition
.
systemConfigMap
.
get
(
"rename_cost"
).
getValue
();
List
<
ItemDto
>
renameCostItem
=
TypeConvertUtil
.
itemString2List
(
renameCost
);
List
<
ItemDto
>
renameCostItem
=
TypeConvertUtil
.
itemString2List
(
renameCost
);
...
@@ -1511,13 +1616,15 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1511,13 +1616,15 @@ public class GardenerServiceImpl implements GardenerService {
if
(
renameFreeTimes
>
0
)
{
if
(
renameFreeTimes
>
0
)
{
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_check_first_free"
);
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_check_first_free"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
rename
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_check_first_free"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_check_first_free"
);
}
else
{
}
else
{
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_check"
);
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
rename
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_check"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_check"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
log
.
info
(
uid
+
"更名需要花费"
+
feedText
.
toString
());
log
.
info
(
uid
+
"更名需要花费"
+
feedText
.
toString
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
...
@@ -1549,6 +1656,8 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1549,6 +1656,8 @@ public class GardenerServiceImpl implements GardenerService {
String
rename
=
lastReq
.
getName
();
String
rename
=
lastReq
.
getName
();
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//园丁基本信息
//园丁基本信息
GardenerInfoDto
gardenerInfo
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
();
GardenerInfoDto
gardenerInfo
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
();
log
.
info
(
"园丁当前名称:"
+
gardenerInfo
.
getName
()
+
",更名为:"
+
rename
);
log
.
info
(
"园丁当前名称:"
+
gardenerInfo
.
getName
()
+
",更名为:"
+
rename
);
...
@@ -1558,6 +1667,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1558,6 +1667,7 @@ public class GardenerServiceImpl implements GardenerService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail_had"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail_had"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail_had"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200305
);
resultResponse
.
set
反馈
ID
(
200305
);
...
@@ -1598,6 +1708,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1598,6 +1708,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfig
.
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200304
);
resultResponse
.
set
反馈
ID
(
200304
);
...
@@ -1619,6 +1730,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1619,6 +1730,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfig
.
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200304
);
resultResponse
.
set
反馈
ID
(
200304
);
...
@@ -1634,6 +1746,7 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1634,6 +1746,7 @@ public class GardenerServiceImpl implements GardenerService {
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfig
.
getName
());
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200304
);
resultResponse
.
set
反馈
ID
(
200304
);
...
@@ -1649,10 +1762,15 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1649,10 +1762,15 @@ public class GardenerServiceImpl implements GardenerService {
}
}
//玩家的园丁名称修改
//玩家的园丁名称修改
gardenerInfo
.
setName
(
rename
);
gardenerInfo
.
setName
(
rename
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_success"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_success"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_success"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
gardenerInfo
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
gardenerInfo
.
getName
());
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
...
@@ -1682,9 +1800,12 @@ public class GardenerServiceImpl implements GardenerService {
...
@@ -1682,9 +1800,12 @@ public class GardenerServiceImpl implements GardenerService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_cancel"
);
String
text
=
SpeechUtil
.
getGardenerSpeech
(
Constants
.
SPEECH_ASIDE
,
"rename_cancel"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_cancel"
);
text
+=
SpeechUtil
.
getGardenerSpeech
(
gender
,
"rename_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
200306
);
resultResponse
.
set
反馈
ID
(
200306
);
...
...
src/main/java/com/qiwuai/garden/service/helpService/impl/HelpServiceImpl.java
View file @
290107a1
...
@@ -461,8 +461,13 @@ public class HelpServiceImpl implements HelpService {
...
@@ -461,8 +461,13 @@ public class HelpServiceImpl implements HelpService {
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
ResultResponse
resultResponse
=
new
ResultResponse
();
ResultResponse
resultResponse
=
new
ResultResponse
();
String
uid
=
operationReq
.
getUid
();
Integer
level
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
();
//玩家当前等级的花圃数量上限
Integer
nurseryNumMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
level
).
getNurseryNumMax
();
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getHelpSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_num_check"
);
String
text
=
SpeechUtil
.
getHelpSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_num_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumMax
.
toString
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
800301
);
resultResponse
.
set
反馈
ID
(
800301
);
...
@@ -1393,13 +1398,12 @@ public class HelpServiceImpl implements HelpService {
...
@@ -1393,13 +1398,12 @@ public class HelpServiceImpl implements HelpService {
String
favoritePlantIds
=
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getFavoritePlantId
();
String
favoritePlantIds
=
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getFavoritePlantId
();
String
[]
favoritePlantIdList
=
favoritePlantIds
.
split
(
"\\|"
);
String
[]
favoritePlantIdList
=
favoritePlantIds
.
split
(
"\\|"
);
for
(
String
plantId
:
favoritePlantIdList
)
{
for
(
String
plantId
:
favoritePlantIdList
)
{
PlantPojo
plant
=
TimingAcquisition
.
plantMap
.
get
(
Integer
.
valueOf
(
plantId
));
plantText
.
append
(
TimingAcquisition
.
plantMap
.
get
(
Integer
.
valueOf
(
plantId
)).
getName
()).
append
(
"、"
);
plantText
.
append
(
TimingAcquisition
.
plantMap
.
get
(
Integer
.
valueOf
(
plantId
)).
getName
()).
append
(
"、"
);
}
}
plantText
.
append
(
plantText
.
length
()
-
1
);
plantText
.
deleteCharAt
(
plantText
.
length
()
-
1
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getHelpSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_get_by_name_check"
);
String
text
=
SpeechUtil
.
getHelpSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_get_by_name_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getName
(),
plantText
.
toString
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
801302
);
resultResponse
.
set
反馈
ID
(
801302
);
...
...
src/main/java/com/qiwuai/garden/service/marketService/MarketService.java
View file @
290107a1
...
@@ -41,6 +41,12 @@ public interface MarketService {
...
@@ -41,6 +41,12 @@ public interface MarketService {
*/
*/
CommonResponse
sellCancel
(
OperationRequest
operationReq
);
CommonResponse
sellCancel
(
OperationRequest
operationReq
);
/**
/**
* 出售宠物指令
* @param operationReq
* @return CommonResponse
*/
CommonResponse
sellPetCheck
(
OperationRequest
operationReq
);
/**
* 统一出售指令
* 统一出售指令
* @param operationReq
* @param operationReq
* @return CommonResponse
* @return CommonResponse
...
@@ -65,9 +71,21 @@ public interface MarketService {
...
@@ -65,9 +71,21 @@ public interface MarketService {
*/
*/
CommonResponse
cancel
(
OperationRequest
operationReq
);
CommonResponse
cancel
(
OperationRequest
operationReq
);
/**
/**
* 打开商店指令
* @param operationReq
* @return CommonResponse
*/
CommonResponse
openShop
(
OperationRequest
operationReq
);
/**
* 查询商品指令
* 查询商品指令
* @param operationReq
* @param operationReq
* @return CommonResponse
* @return CommonResponse
*/
*/
CommonResponse
goodsCheck
(
OperationRequest
operationReq
);
CommonResponse
goodsCheck
(
OperationRequest
operationReq
);
/**
* 退出商店指令
* @param operationReq
* @return CommonResponse
*/
CommonResponse
quitShop
(
OperationRequest
operationReq
);
}
}
src/main/java/com/qiwuai/garden/service/marketService/impl/MarketServiceImpl.java
View file @
290107a1
package
com
.
qiwuai
.
garden
.
service
.
marketService
.
impl
;
package
com
.
qiwuai
.
garden
.
service
.
marketService
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.cache.CacheGlobal
;
import
com.qiwuai.garden.common.cache.CacheGlobal
;
import
com.qiwuai.garden.common.cache.CacheUtil
;
import
com.qiwuai.garden.common.cache.CacheUtil
;
import
com.qiwuai.garden.common.utils.*
;
import
com.qiwuai.garden.common.utils.*
;
import
com.qiwuai.garden.dto.GardenerInfoDto
;
import
com.qiwuai.garden.dto.*
;
import
com.qiwuai.garden.dto.ItemBagDto
;
import
com.qiwuai.garden.dto.ItemDto
;
import
com.qiwuai.garden.dto.base.CommonResponse
;
import
com.qiwuai.garden.dto.base.CommonResponse
;
import
com.qiwuai.garden.dto.base.ResultResponse
;
import
com.qiwuai.garden.dto.base.ResultResponse
;
import
com.qiwuai.garden.dto.base.ResultVarsResponse
;
import
com.qiwuai.garden.dto.base.ResultVarsResponse
;
...
@@ -283,6 +282,7 @@ public class MarketServiceImpl implements MarketService {
...
@@ -283,6 +282,7 @@ public class MarketServiceImpl implements MarketService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"buy_check_fail_no_num"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"buy_check_fail_no_num"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"buy_check_fail_no_num"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"buy_check_fail_no_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400106
);
resultResponse
.
set
反馈
ID
(
400106
);
...
@@ -299,20 +299,20 @@ public class MarketServiceImpl implements MarketService {
...
@@ -299,20 +299,20 @@ public class MarketServiceImpl implements MarketService {
ItemPojo
moneyConfig
=
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
);
ItemPojo
moneyConfig
=
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
);
//获取背包中的所有袋子
//获取背包中的所有袋子
Map
<
Integer
,
ItemBagDto
>
itemBags
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
();
Map
<
Integer
,
ItemBagDto
>
itemBags
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
();
ItemBagDto
itemBag
=
new
ItemBagDto
();
//定义背包里的袋子
List
<
Integer
>
packPackItemIds
=
new
ArrayList
<>();
List
<
Integer
>
packPackItemIds
=
new
ArrayList
<>();
//根据种类id取出背包里的钱
//根据种类id取出背包里的钱
ItemDto
moneyBag
=
itemBags
.
get
(
moneyConfig
.
getItemTypeId
()).
getItems
(
moneyId
);
ItemDto
moneyBag
=
itemBags
.
get
(
moneyConfig
.
getItemTypeId
()).
getItems
(
moneyId
);
Integer
money
=
moneyBag
.
getItemNum
();
Integer
money
=
moneyBag
.
getItemNum
();
//根据用户购买物品类型id找到类型袋中所有物品
//获取玩家的背包
itemBag
=
itemBags
.
get
(
itemTypeId
);
BackPackDto
backPack
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
();
if
(!
itemBag
.
getItemBag
().
isEmpty
())
{
//背包中对应种类的袋子
Map
<
Integer
,
ItemDto
>
items
=
itemBag
.
getItemBag
();
ItemBagDto
itemBag
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
itemTypeId
);
packPackItemIds
=
new
ArrayList
<>(
items
.
keySet
());
//背包中没有该种类,则新增袋子
log
.
info
(
"背包现有的物品id:"
+
packPackItemIds
);
if
(
StringUtils
.
isEmpty
(
itemBag
))
{
itemBag
=
new
ItemBagDto
();
//定义背包里新的袋子
backPack
.
add
(
itemTypeId
,
itemBag
);
itemBag
=
backPack
.
getItemBags
().
get
(
itemTypeId
);
}
}
//根据用户购买物品类型id找到类型袋中所有物品
itemBag
=
itemBags
.
get
(
itemTypeId
);
int
price
=
0
;
int
price
=
0
;
//获取商品配置信息
//获取商品配置信息
Map
<
Integer
,
GoodsPojo
>
goodsConfigMap
=
TimingAcquisition
.
goodsConfigMap
;
Map
<
Integer
,
GoodsPojo
>
goodsConfigMap
=
TimingAcquisition
.
goodsConfigMap
;
...
@@ -327,28 +327,17 @@ public class MarketServiceImpl implements MarketService {
...
@@ -327,28 +327,17 @@ public class MarketServiceImpl implements MarketService {
//玩家货币数量充足
//玩家货币数量充足
if
(
money
>=
price
)
{
if
(
money
>=
price
)
{
ItemDto
item
=
new
ItemDto
();
ItemDto
item
=
new
ItemDto
();
//背包对应物品袋子中是否为空
//获取袋里的该物品
if
(!
itemBags
.
isEmpty
())
{
ItemDto
itemPacket
=
itemBag
.
getItems
(
itemId
);
//背包袋子中是否已有该物品,有则增加该物品数量
//没有该物品,则新增
if
(
packPackItemIds
.
contains
(
itemId
))
{
if
(
StringUtils
.
isEmpty
(
itemPacket
))
{
log
.
info
(
"增加背包中"
+
itemId
+
"的数量"
);
item
=
itemBag
.
getItemBag
().
get
(
itemId
);
item
.
setItemNum
(
item
.
getItemNum
()
+
number
);
log
.
info
(
"数量增加完成"
);
}
else
{
//没有则新增物品
log
.
info
(
"背包中新增物品:"
+
itemId
);
item
.
setItemId
(
itemId
);
item
.
setItemNum
(
number
);
itemBag
.
add
(
itemId
,
item
);
log
.
info
(
"背包新增物品完成"
);
}
}
else
{
//背包袋子为空时新增该物品
log
.
info
(
"背包中新增物品:"
+
itemId
);
item
.
setItemId
(
itemId
);
item
.
setItemId
(
itemId
);
item
.
setItemNum
(
number
);
item
.
setItemNum
(
number
);
itemBag
.
add
(
itemId
,
item
);
itemBag
.
add
(
itemId
,
item
);
log
.
info
(
"背包新增物品完成"
);
}
else
{
//有则新增数量
itemPacket
.
setItemNum
(
itemPacket
.
getItemNum
()
+
number
);
}
}
log
.
info
(
"背包中新增物品:"
+
itemPacket
);
//钱袋扣除货币数量
//钱袋扣除货币数量
moneyBag
.
setItemNum
(
money
-
price
);
moneyBag
.
setItemNum
(
money
-
price
);
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
setUpdateTime
(
DateUtil
.
getCurrentTime
());
//背包信息改变,记录更新时间
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
setUpdateTime
(
DateUtil
.
getCurrentTime
());
//背包信息改变,记录更新时间
...
@@ -387,6 +376,11 @@ public class MarketServiceImpl implements MarketService {
...
@@ -387,6 +376,11 @@ public class MarketServiceImpl implements MarketService {
//物品配置信息
//物品配置信息
ItemPojo
itemConfig
=
TimingAcquisition
.
itemConfigMap
.
get
(
itemId
);
ItemPojo
itemConfig
=
TimingAcquisition
.
itemConfigMap
.
get
(
itemId
);
log
.
info
(
uid
+
"购买商品完成"
);
log
.
info
(
uid
+
"购买商品完成"
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"buy_success"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"buy_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
number
.
toString
(),
itemConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
number
.
toString
(),
itemConfig
.
getName
());
...
@@ -460,11 +454,14 @@ public class MarketServiceImpl implements MarketService {
...
@@ -460,11 +454,14 @@ public class MarketServiceImpl implements MarketService {
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家没有提供物品名称
//玩家没有提供物品名称
if
(
StringUtils
.
isEmpty
(
itemId
))
{
if
(
StringUtils
.
isEmpty
(
itemId
))
{
log
.
info
(
uid
+
"玩家没提供出售的物品名称"
);
log
.
info
(
uid
+
"玩家没提供出售的物品名称"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_check_item_no_name"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_check_item_no_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400205
);
resultResponse
.
set
反馈
ID
(
400205
);
...
@@ -480,6 +477,7 @@ public class MarketServiceImpl implements MarketService {
...
@@ -480,6 +477,7 @@ public class MarketServiceImpl implements MarketService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_check_fail_no_exist"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_check_fail_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_check_fail_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_check_fail_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400210
);
resultResponse
.
set
反馈
ID
(
400210
);
...
@@ -608,6 +606,8 @@ public class MarketServiceImpl implements MarketService {
...
@@ -608,6 +606,8 @@ public class MarketServiceImpl implements MarketService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
log
.
info
(
uid
+
"开始出售物品"
);
log
.
info
(
uid
+
"开始出售物品"
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -653,10 +653,16 @@ public class MarketServiceImpl implements MarketService {
...
@@ -653,10 +653,16 @@ public class MarketServiceImpl implements MarketService {
}
}
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_success"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
number
.
toString
(),
itemConfig
.
getName
(),
String
.
valueOf
(
price
),
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
number
.
toString
(),
itemConfig
.
getName
(),
String
.
valueOf
(
price
),
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
).
getName
());
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_success"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400203
);
resultResponse
.
set
反馈
ID
(
400203
);
...
@@ -682,9 +688,12 @@ public class MarketServiceImpl implements MarketService {
...
@@ -682,9 +688,12 @@ public class MarketServiceImpl implements MarketService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_cancel"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_cancel"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_cancel"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400204
);
resultResponse
.
set
反馈
ID
(
400204
);
...
@@ -696,6 +705,30 @@ public class MarketServiceImpl implements MarketService {
...
@@ -696,6 +705,30 @@ public class MarketServiceImpl implements MarketService {
}
}
@Override
@Override
public
CommonResponse
sellPetCheck
(
OperationRequest
operationReq
)
{
CommonResponse
commonResponse
=
new
CommonResponse
();
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
ResultResponse
resultResponse
=
new
ResultResponse
();
String
uid
=
operationReq
.
getUid
();
log
.
info
(
uid
+
"开始查询出售宠物操作"
);
//园丁性别
// String gender = TimingAcquisition.getGardenerGender(uid);
//玩家称呼
// CallNamePojo callName = TimingAcquisition.getCallNameByUid(uid);
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_pet_check"
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400207
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"出售物品回复3"
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
@Override
public
CommonResponse
sellAllCheck
(
OperationRequest
operationReq
)
{
public
CommonResponse
sellAllCheck
(
OperationRequest
operationReq
)
{
CommonResponse
commonResponse
=
new
CommonResponse
();
CommonResponse
commonResponse
=
new
CommonResponse
();
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
...
@@ -776,6 +809,8 @@ public class MarketServiceImpl implements MarketService {
...
@@ -776,6 +809,8 @@ public class MarketServiceImpl implements MarketService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -830,10 +865,16 @@ public class MarketServiceImpl implements MarketService {
...
@@ -830,10 +865,16 @@ public class MarketServiceImpl implements MarketService {
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_all_success"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"sell_all_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
price
),
moneyConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
price
),
moneyConfig
.
getName
());
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_all_success"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"sell_all_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400209
);
resultResponse
.
set
反馈
ID
(
400209
);
...
@@ -893,6 +934,26 @@ public class MarketServiceImpl implements MarketService {
...
@@ -893,6 +934,26 @@ public class MarketServiceImpl implements MarketService {
}
}
@Override
@Override
public
CommonResponse
openShop
(
OperationRequest
operationReq
)
{
CommonResponse
commonResponse
=
new
CommonResponse
();
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
ResultResponse
resultResponse
=
new
ResultResponse
();
String
uid
=
operationReq
.
getUid
();
log
.
info
(
uid
+
"打开商店"
);
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_no_name"
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400307
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"查看商品回复1"
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
@Override
public
CommonResponse
goodsCheck
(
OperationRequest
operationReq
)
{
public
CommonResponse
goodsCheck
(
OperationRequest
operationReq
)
{
CommonResponse
commonResponse
=
new
CommonResponse
();
CommonResponse
commonResponse
=
new
CommonResponse
();
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
...
@@ -907,6 +968,8 @@ public class MarketServiceImpl implements MarketService {
...
@@ -907,6 +968,8 @@ public class MarketServiceImpl implements MarketService {
log
.
info
(
uid
+
"开始查看商品,物品等级:"
+
itemLevel
+
", 物品属性id:"
+
itemAttributeId
+
",物品类型id:"
+
itemTypeId
+
",物品id:"
+
itemId
+
",植物id:"
+
plantId
);
log
.
info
(
uid
+
"开始查看商品,物品等级:"
+
itemLevel
+
", 物品属性id:"
+
itemAttributeId
+
",物品类型id:"
+
itemTypeId
+
",物品id:"
+
itemId
+
",植物id:"
+
plantId
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//货币配置信息
//货币配置信息
Integer
moneyId
=
Integer
.
parseInt
(
TimingAcquisition
.
systemConfigMap
.
get
(
"money"
).
getValue
());
Integer
moneyId
=
Integer
.
parseInt
(
TimingAcquisition
.
systemConfigMap
.
get
(
"money"
).
getValue
());
ItemPojo
moneyConfig
=
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
);
ItemPojo
moneyConfig
=
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
);
...
@@ -937,6 +1000,7 @@ public class MarketServiceImpl implements MarketService {
...
@@ -937,6 +1000,7 @@ public class MarketServiceImpl implements MarketService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_item_no_exist"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_item_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_item_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_item_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400306
);
resultResponse
.
set
反馈
ID
(
400306
);
...
@@ -992,6 +1056,7 @@ public class MarketServiceImpl implements MarketService {
...
@@ -992,6 +1056,7 @@ public class MarketServiceImpl implements MarketService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_item_no_exist"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_item_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_item_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_item_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400306
);
resultResponse
.
set
反馈
ID
(
400306
);
...
@@ -1023,6 +1088,7 @@ public class MarketServiceImpl implements MarketService {
...
@@ -1023,6 +1088,7 @@ public class MarketServiceImpl implements MarketService {
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
goodsName
,
goodsDescription
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
goodsName
,
goodsDescription
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_item_success"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_item_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//保存玩家这轮的请求信息,用于下一步的操作
//保存玩家这轮的请求信息,用于下一步的操作
operationReq
.
setItemId
(
itemId
);
operationReq
.
setItemId
(
itemId
);
operationReq
.
setOperationLabel
(
Constants
.
CHECK_GOODS
);
operationReq
.
setOperationLabel
(
Constants
.
CHECK_GOODS
);
...
@@ -1043,6 +1109,7 @@ public class MarketServiceImpl implements MarketService {
...
@@ -1043,6 +1109,7 @@ public class MarketServiceImpl implements MarketService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_item_no_exist"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_item_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_item_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_item_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400306
);
resultResponse
.
set
反馈
ID
(
400306
);
...
@@ -1072,6 +1139,7 @@ public class MarketServiceImpl implements MarketService {
...
@@ -1072,6 +1139,7 @@ public class MarketServiceImpl implements MarketService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_item_no_exist"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_fail_item_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_item_no_exist"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_fail_item_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400306
);
resultResponse
.
set
反馈
ID
(
400306
);
...
@@ -1103,6 +1171,7 @@ public class MarketServiceImpl implements MarketService {
...
@@ -1103,6 +1171,7 @@ public class MarketServiceImpl implements MarketService {
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
goodsName
,
goodsDescription
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
goodsName
,
goodsDescription
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_item_success"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_item_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//保存玩家这轮的请求信息,用于下一步的操作
//保存玩家这轮的请求信息,用于下一步的操作
operationReq
.
setItemId
(
itemId
);
operationReq
.
setItemId
(
itemId
);
operationReq
.
setOperationLabel
(
Constants
.
CHECK_GOODS
);
operationReq
.
setOperationLabel
(
Constants
.
CHECK_GOODS
);
...
@@ -1176,8 +1245,9 @@ public class MarketServiceImpl implements MarketService {
...
@@ -1176,8 +1245,9 @@ public class MarketServiceImpl implements MarketService {
}
}
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_type_success"
);
String
text
=
SpeechUtil
.
getMarketSpeech
(
Constants
.
SPEECH_ASIDE
,
"goods_check_type_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemLevelName
,
itemAttribute
,
itemType
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemLevelName
,
itemAttribute
,
itemType
,
String
.
valueOf
(
size
),
feedText
.
toString
());
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_type_success"
);
text
+=
SpeechUtil
.
getMarketSpeech
(
gender
,
"goods_check_type_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400302
);
resultResponse
.
set
反馈
ID
(
400302
);
...
@@ -1205,4 +1275,23 @@ public class MarketServiceImpl implements MarketService {
...
@@ -1205,4 +1275,23 @@ public class MarketServiceImpl implements MarketService {
//3.玩家指定了物品种类、物品属性、物品等级中的一个及以上
//3.玩家指定了物品种类、物品属性、物品等级中的一个及以上
return
TimingAcquisition
.
getItemInfoByCondition
(
uid
,
goodsLevelMap
,
itemTypeId
,
itemAttributeId
,
itemLevel
,
expireTime
);
return
TimingAcquisition
.
getItemInfoByCondition
(
uid
,
goodsLevelMap
,
itemTypeId
,
itemAttributeId
,
itemLevel
,
expireTime
);
}
}
@Override
public
CommonResponse
quitShop
(
OperationRequest
operationReq
)
{
CommonResponse
commonResponse
=
new
CommonResponse
();
ResultVarsResponse
resultVarsResponse
=
new
ResultVarsResponse
();
ResultResponse
resultResponse
=
new
ResultResponse
();
String
uid
=
operationReq
.
getUid
();
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
400308
);
resultResponse
.
set
反馈文本
(
"好的,欢迎下次光临!"
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
}
}
src/main/java/com/qiwuai/garden/service/nurseryService/impl/NurseryServiceImpl.java
View file @
290107a1
package
com
.
qiwuai
.
garden
.
service
.
nurseryService
.
impl
;
package
com
.
qiwuai
.
garden
.
service
.
nurseryService
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.cache.CacheGlobal
;
import
com.qiwuai.garden.common.cache.CacheGlobal
;
...
@@ -52,11 +53,14 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -52,11 +53,14 @@ public class NurseryServiceImpl implements NurseryService {
int
level
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
();
int
level
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
();
Integer
nurseryMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
level
).
getNurseryNumMax
();
Integer
nurseryMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
level
).
getNurseryNumMax
();
//园丁性别
//园丁性别
// String gender = TimingAcquisition.getGardenerGender(uid);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_amount_check"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_amount_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
,
String
.
valueOf
(
nurseryAmount
),
String
.
valueOf
(
level
),
nurseryMax
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
,
String
.
valueOf
(
nurseryAmount
),
String
.
valueOf
(
level
),
nurseryMax
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
"nursery_amount_check"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_amount_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100901
);
resultResponse
.
set
反馈
ID
(
100901
);
...
@@ -75,10 +79,14 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -75,10 +79,14 @@ public class NurseryServiceImpl implements NurseryService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
log
.
info
(
uid
+
"查看指定花圃的总览信息,花圃编号:"
+
nurseryNum
);
log
.
info
(
uid
+
"查看指定花圃的总览信息,花圃编号:"
+
nurseryNum
);
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家的所有花圃
//玩家的所有花圃
String
nurseryNumText
=
TimingAcquisition
.
getAllNurseryNum
(
uid
);
String
nurseryNumText
=
TimingAcquisition
.
getAllNurseryNum
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家没提供花圃编号
//玩家没提供花圃编号
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
log
.
info
(
uid
+
"玩家没提供花圃编号"
);
log
.
info
(
uid
+
"玩家没提供花圃编号"
);
...
@@ -86,6 +94,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -86,6 +94,7 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_fail_no_num"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_fail_no_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_nursery_fail_no_num"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_nursery_fail_no_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
101007
);
resultResponse
.
set
反馈
ID
(
101007
);
...
@@ -150,29 +159,25 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -150,29 +159,25 @@ public class NurseryServiceImpl implements NurseryService {
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getBloomingTime
())
>
0
)
{
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getBloomingTime
())
>
0
)
{
//获取对应话术
//获取对应话术
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_mature"
);
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_mature"
);
plantStatusText
=
SpeechUtil
.
speechReplaceNum
(
plantStatusText
,
nurseryNum
.
toString
());
nurseryInfo
.
setStatus
(
Constants
.
PLANT_MATURE
);
//花圃中植物状态改为成熟期
nurseryInfo
.
setStatus
(
Constants
.
PLANT_MATURE
);
//花圃中植物状态改为成熟期
}
else
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getGrowingTime
())
>
0
)
{
}
else
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getGrowingTime
())
>
0
)
{
//获取对应话术
//获取对应话术
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_blooming"
);
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_blooming"
);
plantStatusText
=
SpeechUtil
.
speechReplaceNum
(
plantStatusText
,
nurseryNum
.
toString
(),
plant
.
getName
());
nurseryInfo
.
setStatus
(
Constants
.
PLANT_BLOOMING
);
//花圃中植物状态改为开花期
nurseryInfo
.
setStatus
(
Constants
.
PLANT_BLOOMING
);
//花圃中植物状态改为开花期
}
else
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getSowingTime
())
>
0
)
{
}
else
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getSowingTime
())
>
0
)
{
//获取对应话术
//获取对应话术
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_growing"
);
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_growing"
);
plantStatusText
=
SpeechUtil
.
speechReplaceNum
(
plantStatusText
,
nurseryNum
.
toString
());
nurseryInfo
.
setStatus
(
Constants
.
PLANT_GROWING
);
//花圃中植物状态改为成长期
nurseryInfo
.
setStatus
(
Constants
.
PLANT_GROWING
);
//花圃中植物状态改为成长期
}
else
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getSeedingTime
())
>
0
)
{
}
else
if
(
DateUtil
.
getCurrentTime
().
compareTo
(
nurseryInfo
.
getPlantTime
().
getSeedingTime
())
>
0
)
{
//获取对应话术
//获取对应话术
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_sowing"
);
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_sowing"
);
plantStatusText
=
SpeechUtil
.
speechReplaceNum
(
plantStatusText
,
nurseryNum
.
toString
());
nurseryInfo
.
setStatus
(
Constants
.
PLANT_SOWING
);
//花圃中植物状态改为幼苗期
nurseryInfo
.
setStatus
(
Constants
.
PLANT_SOWING
);
//花圃中植物状态改为幼苗期
}
else
{
}
else
{
//获取对应话术
//获取对应话术
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_seeding"
);
plantStatusText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_seeding"
);
plantStatusText
=
SpeechUtil
.
speechReplaceNum
(
plantStatusText
,
nurseryNum
.
toString
());
}
}
plantStatusText
=
"花圃"
+
plantStatusText
;
plantStatusText
=
SpeechUtil
.
speechReplaceNum
(
plantStatusText
,
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
()).
getName
());
plantStatusText
=
"花圃"
+
nurseryNum
+
plantStatusText
;
}
}
PetPojo
pet
=
null
;
PetPojo
pet
=
null
;
if
(!
StringUtils
.
isEmpty
(
nurseryInfo
.
getPetField
()))
{
if
(!
StringUtils
.
isEmpty
(
nurseryInfo
.
getPetField
()))
{
...
@@ -188,27 +193,32 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -188,27 +193,32 @@ public class NurseryServiceImpl implements NurseryService {
addText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_info_have_plant_pet"
);
addText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_info_have_plant_pet"
);
addText
=
SpeechUtil
.
speechReplaceNum
(
addText
,
plant
.
getName
(),
plantStatusText
,
pet
.
getName
());
addText
=
SpeechUtil
.
speechReplaceNum
(
addText
,
plant
.
getName
(),
plantStatusText
,
pet
.
getName
());
text
+=
addText
;
text
+=
addText
;
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_nursery_info_have_plant_pet"
);
resultResponse
.
set
反馈
ID
(
101001
);
resultResponse
.
set
反馈
ID
(
101001
);
}
}
//2.有植物没宠物
//2.有植物没宠物
if
(!
StringUtils
.
isEmpty
(
plant
)
&&
StringUtils
.
isEmpty
(
pet
))
{
if
(!
StringUtils
.
isEmpty
(
plant
)
&&
StringUtils
.
isEmpty
(
pet
))
{
addText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_info_have_plant_no_pet"
);
addText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_info_have_plant_no_pet"
);
addText
=
SpeechUtil
.
speechReplaceNum
(
addText
,
plant
.
getName
(),
plantStatusText
);
addText
=
SpeechUtil
.
speechReplaceNum
(
addText
,
plant
.
getName
(),
plantStatusText
);
text
+=
addText
;
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_nursery_info_have_plant_no_pet"
);
resultResponse
.
set
反馈
ID
(
101002
);
resultResponse
.
set
反馈
ID
(
101002
);
}
}
//3.没有植物有宠物
//3.没有植物有宠物
if
(
StringUtils
.
isEmpty
(
plant
)
&&
!
StringUtils
.
isEmpty
(
pet
))
{
if
(
StringUtils
.
isEmpty
(
plant
)
&&
!
StringUtils
.
isEmpty
(
pet
))
{
addText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_info_no_plant_have_pet"
);
addText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_info_no_plant_have_pet"
);
addText
=
SpeechUtil
.
speechReplaceNum
(
addText
,
pet
.
getName
());
addText
=
SpeechUtil
.
speechReplaceNum
(
addText
,
pet
.
getName
());
text
+=
addText
;
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_nursery_info_no_plant_have_pet"
);
resultResponse
.
set
反馈
ID
(
101003
);
resultResponse
.
set
反馈
ID
(
101003
);
}
}
//4.没有植物也没有宠物
//4.没有植物也没有宠物
if
(
StringUtils
.
isEmpty
(
plant
)
&&
StringUtils
.
isEmpty
(
pet
))
{
if
(
StringUtils
.
isEmpty
(
plant
)
&&
StringUtils
.
isEmpty
(
pet
))
{
addText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_info_no_plant_no_pet"
);
addText
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_nursery_info_no_plant_no_pet"
);
text
+=
addText
;
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_nursery_info_no_plant_no_pet"
);
resultResponse
.
set
反馈
ID
(
101004
);
resultResponse
.
set
反馈
ID
(
101004
);
}
}
//
//有新来的宠物
//有新来的宠物
if
(
nurseryInfo
.
getPetCheck
()
==
Constants
.
PET_UNCHECK
&&
!
StringUtils
.
isEmpty
(
nurseryInfo
.
getPetField
()))
{
if
(
nurseryInfo
.
getPetCheck
()
==
Constants
.
PET_UNCHECK
&&
!
StringUtils
.
isEmpty
(
nurseryInfo
.
getPetField
()))
{
nurseryInfo
.
setPetCheck
(
Constants
.
PET_CHECK
);
nurseryInfo
.
setPetCheck
(
Constants
.
PET_CHECK
);
}
}
...
@@ -291,6 +301,8 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -291,6 +301,8 @@ public class NurseryServiceImpl implements NurseryService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
StringBuilder
feedText
=
new
StringBuilder
();
StringBuilder
feedText
=
new
StringBuilder
();
if
(
seedingNumList
.
size
()
!=
0
)
{
if
(
seedingNumList
.
size
()
!=
0
)
{
StringBuilder
nurseryNumText
=
new
StringBuilder
();
StringBuilder
nurseryNumText
=
new
StringBuilder
();
...
@@ -352,10 +364,13 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -352,10 +364,13 @@ public class NurseryServiceImpl implements NurseryService {
}
else
{
//花圃中有植物时
}
else
{
//花圃中有植物时
//花圃中有植物时,旁白的回复
//花圃中有植物时,旁白的回复
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
text
=
feedText
.
toString
();
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_all_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
"植物"
);
//花圃中有植物时,园丁的回复
//花圃中有植物时,园丁的回复
gardenerText
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_status"
);
gardenerText
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_status"
);
}
}
gardenerText
=
SpeechUtil
.
speechReplaceNum
(
gardenerText
,
callName
.
getName
(),
callName
.
getSubName
());
//有新宠物到来时
//有新宠物到来时
if
(
nurseryNumList
.
size
()
>
0
)
{
if
(
nurseryNumList
.
size
()
>
0
)
{
StringBuilder
addText
=
new
StringBuilder
();
StringBuilder
addText
=
new
StringBuilder
();
...
@@ -370,6 +385,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -370,6 +385,7 @@ public class NurseryServiceImpl implements NurseryService {
petText
=
SpeechUtil
.
speechReplaceNum
(
petText
,
addText
.
toString
(),
String
.
valueOf
(
nurseryNumList
.
size
()));
petText
=
SpeechUtil
.
speechReplaceNum
(
petText
,
addText
.
toString
(),
String
.
valueOf
(
nurseryNumList
.
size
()));
//有宠物时,园丁的回复
//有宠物时,园丁的回复
nurseryPetText
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_pet"
);
nurseryPetText
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_pet"
);
nurseryPetText
=
SpeechUtil
.
speechReplaceNum
(
nurseryPetText
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
后台附加返回
(
"查看花圃状态回复1"
);
resultResponse
.
set
后台附加返回
(
"查看花圃状态回复1"
);
}
}
//分别整合园丁和旁白的回复
//分别整合园丁和旁白的回复
...
@@ -409,13 +425,18 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -409,13 +425,18 @@ public class NurseryServiceImpl implements NurseryService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
log
.
info
(
uid
+
"开始查询当前花圃等级,花圃编号:"
+
nurseryNum
);
log
.
info
(
uid
+
"开始查询当前花圃等级,花圃编号:"
+
nurseryNum
);
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//花圃编号为空
//花圃编号为空
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
log
.
info
(
uid
+
"玩家没有提供花圃编号"
+
nurseryNum
);
log
.
info
(
uid
+
"玩家没有提供花圃编号"
+
nurseryNum
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_fail_no_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_fail_no_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100402
);
resultResponse
.
set
反馈
ID
(
100402
);
...
@@ -432,6 +453,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -432,6 +453,7 @@ public class NurseryServiceImpl implements NurseryService {
log
.
info
(
uid
+
"不存在花圃编号"
+
nurseryNum
);
log
.
info
(
uid
+
"不存在花圃编号"
+
nurseryNum
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_fail_no_exist"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_fail_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100403
);
resultResponse
.
set
反馈
ID
(
100403
);
...
@@ -446,6 +468,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -446,6 +468,7 @@ public class NurseryServiceImpl implements NurseryService {
if
(
nurseryInfo
.
getUsable
()
!=
Constants
.
NURSERY_USABLE
)
{
if
(
nurseryInfo
.
getUsable
()
!=
Constants
.
NURSERY_USABLE
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_level_fail_usable"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_level_fail_usable"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100404
);
resultResponse
.
set
反馈
ID
(
100404
);
...
@@ -458,6 +481,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -458,6 +481,7 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_level"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_level"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
nursery
.
getLevel
().
toString
(),
nursery
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
nursery
.
getLevel
().
toString
(),
nursery
.
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_level"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_level"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100401
);
resultResponse
.
set
反馈
ID
(
100401
);
...
@@ -476,15 +500,20 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -476,15 +500,20 @@ public class NurseryServiceImpl implements NurseryService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
log
.
info
(
uid
+
"开始查询当前花圃升级可选择的花圃类型,花圃编号:"
+
nurseryNum
);
log
.
info
(
uid
+
"开始查询当前花圃升级可选择的花圃类型,花圃编号:"
+
nurseryNum
);
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//保存当前操作标识
//保存当前操作标识
operationReq
.
setOperationLabel
(
Constants
.
NURSERY_UPGRADE
);
operationReq
.
setOperationLabel
(
Constants
.
NURSERY_UPGRADE
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家未提供花圃
//玩家未提供花圃
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
log
.
info
(
uid
+
"未提供花圃编号"
);
log
.
info
(
uid
+
"未提供花圃编号"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_no_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_no_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100603
);
resultResponse
.
set
反馈
ID
(
100603
);
...
@@ -535,6 +564,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -535,6 +564,7 @@ public class NurseryServiceImpl implements NurseryService {
if
(
nurseryInfo
.
getUsable
()
!=
Constants
.
NURSERY_USABLE
)
{
if
(
nurseryInfo
.
getUsable
()
!=
Constants
.
NURSERY_USABLE
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100602
);
resultResponse
.
set
反馈
ID
(
100602
);
...
@@ -581,10 +611,12 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -581,10 +611,12 @@ public class NurseryServiceImpl implements NurseryService {
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_nursery_to_type"
);
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_nursery_to_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_nursery_to_type"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_nursery_to_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
}
else
{
}
else
{
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_upgrade_fail_no_type"
);
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_upgrade_fail_no_type"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_no_type"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_no_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
}
}
//玩家可选择的花圃类型只有一个,则直接到第二步
//玩家可选择的花圃类型只有一个,则直接到第二步
if
(
nurseryIdList
.
size
()
==
1
)
{
if
(
nurseryIdList
.
size
()
==
1
)
{
...
@@ -617,7 +649,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -617,7 +649,7 @@ public class NurseryServiceImpl implements NurseryService {
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_upgrade_condition"
);
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_upgrade_condition"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nursery
.
getName
(),
addext
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nursery
.
getName
(),
addext
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100601
);
resultResponse
.
set
反馈
ID
(
100601
);
...
@@ -650,6 +682,8 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -650,6 +682,8 @@ public class NurseryServiceImpl implements NurseryService {
Integer
rank
=
operationReq
.
getRank
();
//玩家说的序号
Integer
rank
=
operationReq
.
getRank
();
//玩家说的序号
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
log
.
info
(
uid
+
"开始查询选择的花圃类型升级需要满足的条件,花圃类型id:"
+
nurseryId
+
",或者序号:"
+
rank
);
log
.
info
(
uid
+
"开始查询选择的花圃类型升级需要满足的条件,花圃类型id:"
+
nurseryId
+
",或者序号:"
+
rank
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -664,6 +698,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -664,6 +698,7 @@ public class NurseryServiceImpl implements NurseryService {
log
.
info
(
uid
+
"玩家没提供花圃类型"
);
log
.
info
(
uid
+
"玩家没提供花圃类型"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition_fail_no_type"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition_fail_no_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100610
);
resultResponse
.
set
反馈
ID
(
100610
);
...
@@ -676,8 +711,9 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -676,8 +711,9 @@ public class NurseryServiceImpl implements NurseryService {
if
(
nurseryId
==
Constants
.
REQ_NON
)
{
if
(
nurseryId
==
Constants
.
REQ_NON
)
{
log
.
info
(
uid
+
"玩家提供的花圃类型不存在 "
);
log
.
info
(
uid
+
"玩家提供的花圃类型不存在 "
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition_fail_not_exist"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_upgrade_condition_fail_not_exist"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition_fail_not_exist"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition_fail_not_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100610
);
resultResponse
.
set
反馈
ID
(
100610
);
...
@@ -759,6 +795,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -759,6 +795,7 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_upgrade_fail_type"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_upgrade_fail_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
addText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
addText
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_type"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100607
);
resultResponse
.
set
反馈
ID
(
100607
);
...
@@ -798,6 +835,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -798,6 +835,7 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_upgrade_condition"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"search_upgrade_condition"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nursery
.
getName
(),
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nursery
.
getName
(),
feedText
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"search_upgrade_condition"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -818,6 +856,8 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -818,6 +856,8 @@ public class NurseryServiceImpl implements NurseryService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
log
.
info
(
uid
+
"开始升级花圃"
);
log
.
info
(
uid
+
"开始升级花圃"
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -861,6 +901,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -861,6 +901,7 @@ public class NurseryServiceImpl implements NurseryService {
if
(
nurseryInfo
.
getUsable
()
!=
Constants
.
NURSERY_USABLE
)
{
if
(
nurseryInfo
.
getUsable
()
!=
Constants
.
NURSERY_USABLE
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100602
);
resultResponse
.
set
反馈
ID
(
100602
);
...
@@ -875,6 +916,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -875,6 +916,7 @@ public class NurseryServiceImpl implements NurseryService {
log
.
info
(
"已经升级过了哦"
);
log
.
info
(
"已经升级过了哦"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_succeed"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_succeed"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100603
);
resultResponse
.
set
反馈
ID
(
100603
);
...
@@ -889,6 +931,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -889,6 +931,7 @@ public class NurseryServiceImpl implements NurseryService {
if
(
StringUtils
.
isEmpty
(
plantMap
))
{
if
(
StringUtils
.
isEmpty
(
plantMap
))
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_planted"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_planted"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100605
);
resultResponse
.
set
反馈
ID
(
100605
);
...
@@ -911,6 +954,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -911,6 +954,7 @@ public class NurseryServiceImpl implements NurseryService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantPojoMap
.
get
(
plant
.
getPlantId
()).
getName
(),
plant
.
getNumber
().
toString
(),
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantPojoMap
.
get
(
plant
.
getPlantId
()).
getName
(),
plant
.
getNumber
().
toString
(),
"0"
,
plant
.
getNumber
().
toString
());
"0"
,
plant
.
getNumber
().
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_planted"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_planted"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100605
);
resultResponse
.
set
反馈
ID
(
100605
);
...
@@ -928,6 +972,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -928,6 +972,7 @@ public class NurseryServiceImpl implements NurseryService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantPojoMap
.
get
(
plant
.
getPlantId
()).
getName
(),
plant
.
getNumber
().
toString
(),
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantPojoMap
.
get
(
plant
.
getPlantId
()).
getName
(),
plant
.
getNumber
().
toString
(),
planted
.
getNumber
().
toString
(),
Integer
.
toString
(
sub
));
planted
.
getNumber
().
toString
(),
Integer
.
toString
(
sub
));
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_planted"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_planted"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100605
);
resultResponse
.
set
反馈
ID
(
100605
);
...
@@ -977,7 +1022,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -977,7 +1022,7 @@ public class NurseryServiceImpl implements NurseryService {
item
.
getItemNum
().
toString
());
item
.
getItemNum
().
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_material"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_material"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100606
);
resultResponse
.
set
反馈
ID
(
100606
);
...
@@ -1003,7 +1048,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1003,7 +1048,7 @@ public class NurseryServiceImpl implements NurseryService {
item
.
getItemNum
().
toString
()
,
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
item
.
getItemNum
().
toString
()
,
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_material"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_fail_material"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100606
);
resultResponse
.
set
反馈
ID
(
100606
);
...
@@ -1030,17 +1075,23 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1030,17 +1075,23 @@ public class NurseryServiceImpl implements NurseryService {
}
}
log
.
info
(
uid
+
"的花圃已升级至目标花圃类型:"
+
targetNurseryId
);
log
.
info
(
uid
+
"的花圃已升级至目标花圃类型:"
+
targetNurseryId
);
//---------------------新手引导的升级花圃至等级2任务完成------------------------
//---------------------新手引导的升级花圃至等级2任务完成------------------------
if
(
"完成10011"
.
equals
(
noviceGuide
)
&&
targetNursery
.
getLevel
()
=
=
2
)
{
if
(
"完成10011"
.
equals
(
noviceGuide
)
&&
targetNursery
.
getLevel
()
>
=
2
)
{
resultResponse
.
set
任务完成
(
"10012"
);
resultResponse
.
set
任务完成
(
"10012"
);
log
.
info
(
uid
+
"新手引导的升级花圃任务10012已完成"
);
log
.
info
(
uid
+
"新手引导的升级花圃任务10012已完成"
);
}
}
//---------------------新手引导的升级花圃至等级3任务完成------------------------
//---------------------新手引导的升级花圃至等级3任务完成------------------------
if
(
"完成10019"
.
equals
(
noviceGuide
)
&&
targetNursery
.
getLevel
()
=
=
3
)
{
if
(
"完成10019"
.
equals
(
noviceGuide
)
&&
targetNursery
.
getLevel
()
>
=
3
)
{
resultResponse
.
set
任务完成
(
"10020"
);
resultResponse
.
set
任务完成
(
"10020"
);
log
.
info
(
uid
+
"新手引导的升级花圃任务10020已完成"
);
log
.
info
(
uid
+
"新手引导的升级花圃任务10020已完成"
);
}
}
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_success"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_upgrade_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
...
@@ -1099,11 +1150,14 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1099,11 +1150,14 @@ public class NurseryServiceImpl implements NurseryService {
int
nurseryMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
()).
getNurseryNumMax
();
int
nurseryMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
()).
getNurseryNumMax
();
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//开启花圃数量已达到上限
//开启花圃数量已达到上限
if
(
nurseryCount
>=
nurseryMax
)
{
if
(
nurseryCount
>=
nurseryMax
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_fail_num"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_fail_num"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_fail_num"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_fail_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100802
);
resultResponse
.
set
反馈
ID
(
100802
);
...
@@ -1127,7 +1181,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1127,7 +1181,7 @@ public class NurseryServiceImpl implements NurseryService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_fail_money"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_fail_money"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_fail_money"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_fail_money"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
moneyName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
moneyName
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100803
);
resultResponse
.
set
反馈
ID
(
100803
);
...
@@ -1140,7 +1194,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1140,7 +1194,7 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_check"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
nurseryCount
+
1
),
nurseryReclaimMap
.
get
(
nurseryCount
-
1
).
getCost
().
toString
(),
moneyName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
nurseryCount
+
1
),
nurseryReclaimMap
.
get
(
nurseryCount
-
1
).
getCost
().
toString
(),
moneyName
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_check"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
moneyName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
moneyName
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100801
);
resultResponse
.
set
反馈
ID
(
100801
);
...
@@ -1168,11 +1222,14 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1168,11 +1222,14 @@ public class NurseryServiceImpl implements NurseryService {
int
nurseryMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
()).
getNurseryNumMax
();
int
nurseryMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
()).
getNurseryNumMax
();
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//开启花圃数量已达到上限
//开启花圃数量已达到上限
if
(
nurseryCount
>=
nurseryMax
)
{
if
(
nurseryCount
>=
nurseryMax
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_fail_num"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_fail_num"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_fail_num"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_fail_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100802
);
resultResponse
.
set
反馈
ID
(
100802
);
...
@@ -1196,7 +1253,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1196,7 +1253,7 @@ public class NurseryServiceImpl implements NurseryService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_fail_money"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_fail_money"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_fail_money"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_fail_money"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
moneyName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
moneyName
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100803
);
resultResponse
.
set
反馈
ID
(
100803
);
...
@@ -1224,10 +1281,16 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1224,10 +1281,16 @@ public class NurseryServiceImpl implements NurseryService {
taskCountMap
.
put
(
Constants
.
RECLAIM_NURSERY_EVENT
,
taskCountMap
.
get
(
Constants
.
RECLAIM_NURSERY_EVENT
)
+
1
);
taskCountMap
.
put
(
Constants
.
RECLAIM_NURSERY_EVENT
,
taskCountMap
.
get
(
Constants
.
RECLAIM_NURSERY_EVENT
)
+
1
);
//------------------------园丁升级任务事件[开启花圃]是否完成------------------------
//------------------------园丁升级任务事件[开启花圃]是否完成------------------------
TaskResultDto
updateTaskResult
=
TimingAcquisition
.
checkUpdateTask
(
uid
,
Constants
.
RECLAIM_NURSERY_EVENT
);
TaskResultDto
updateTaskResult
=
TimingAcquisition
.
checkUpdateTask
(
uid
,
Constants
.
RECLAIM_NURSERY_EVENT
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_success"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reclaim_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
nurseryCount
+
1
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
nurseryCount
+
1
));
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_success"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reclaim_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
text
+=
updateTaskResult
.
getResultText
();
//养成任务事件[开启花圃]完成提醒
text
+=
updateTaskResult
.
getResultText
();
//养成任务事件[开启花圃]完成提醒
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -1238,7 +1301,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1238,7 +1301,7 @@ public class NurseryServiceImpl implements NurseryService {
resultResponse
.
set
后台附加返回
2
(
"查看任务1"
);
resultResponse
.
set
后台附加返回
2
(
"查看任务1"
);
}
}
//-----------------------新手引导开启第4个花圃任务完成。默认两个已开启-------------------------
//-----------------------新手引导开启第4个花圃任务完成。默认两个已开启-------------------------
if
((
nurseryCount
+
1
)
=
=
4
&&
"完成10020"
.
equals
(
noviceGuide
))
{
if
((
nurseryCount
+
1
)
>
=
4
&&
"完成10020"
.
equals
(
noviceGuide
))
{
resultResponse
.
set
任务完成
(
"10021"
);
resultResponse
.
set
任务完成
(
"10021"
);
}
}
resultVarsResponse
.
setVars
(
resultResponse
);
resultVarsResponse
.
setVars
(
resultResponse
);
...
@@ -1324,13 +1387,15 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1324,13 +1387,15 @@ public class NurseryServiceImpl implements NurseryService {
log
.
info
(
uid
+
"查询重置花圃"
+
nurseryNum
+
"所需条件"
);
log
.
info
(
uid
+
"查询重置花圃"
+
nurseryNum
+
"所需条件"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
int
num
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
().
size
();
//没有提供花圃编号
//没有提供花圃编号
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
log
.
info
(
uid
+
"玩家没提供花圃编号"
);
log
.
info
(
uid
+
"玩家没提供花圃编号"
);
int
num
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
().
size
();
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_fail_no_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_fail_no_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
num
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
String
.
valueOf
(
num
));
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100704
);
resultResponse
.
set
反馈
ID
(
100704
);
...
@@ -1345,6 +1410,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1345,6 +1410,7 @@ public class NurseryServiceImpl implements NurseryService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_fail_no_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_fail_no_nursery"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_fail_no_nursery"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_fail_no_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
String
.
valueOf
(
num
));
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100705
);
resultResponse
.
set
反馈
ID
(
100705
);
...
@@ -1357,6 +1423,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1357,6 +1423,7 @@ public class NurseryServiceImpl implements NurseryService {
if
(
nurseryNum
>
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
().
size
())
{
if
(
nurseryNum
>
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
().
size
())
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_fail_nursery_no_exist"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_fail_nursery_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100707
);
resultResponse
.
set
反馈
ID
(
100707
);
...
@@ -1383,6 +1450,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1383,6 +1450,7 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_check"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
resetCost
),
moneyConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
resetCost
),
moneyConfig
.
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_check"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100701
);
resultResponse
.
set
反馈
ID
(
100701
);
...
@@ -1400,6 +1468,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1400,6 +1468,7 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_check_mature"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_check_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plant
.
getName
(),
String
.
valueOf
(
resetCost
),
moneyConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plant
.
getName
(),
String
.
valueOf
(
resetCost
),
moneyConfig
.
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_check_mature"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_check_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100702
);
resultResponse
.
set
反馈
ID
(
100702
);
...
@@ -1432,12 +1501,15 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1432,12 +1501,15 @@ public class NurseryServiceImpl implements NurseryService {
log
.
info
(
uid
+
"玩家重置的花圃编号:"
+
nurseryNum
);
log
.
info
(
uid
+
"玩家重置的花圃编号:"
+
nurseryNum
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家花圃信息
//玩家花圃信息
NurseryInfoDto
nurseryInfo
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
().
get
(
nurseryNum
);
NurseryInfoDto
nurseryInfo
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
().
get
(
nurseryNum
);
//花圃已经是初始类型
//花圃已经是初始类型
if
(
nurseryInfo
.
getId
()
==
Constants
.
NURSERY_INIT_ID
)
{
if
(
nurseryInfo
.
getId
()
==
Constants
.
NURSERY_INIT_ID
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_succeed"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_succeed"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100706
);
resultResponse
.
set
反馈
ID
(
100706
);
...
@@ -1470,6 +1542,7 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1470,6 +1542,7 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_fail_money"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_fail_money"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
moneyConfig
.
getName
(),
money
.
getItemNum
().
toString
(),
String
.
valueOf
(
resetCost
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
moneyConfig
.
getName
(),
money
.
getItemNum
().
toString
(),
String
.
valueOf
(
resetCost
));
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_fail_money"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_fail_money"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
moneyConfig
.
getName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100703
);
resultResponse
.
set
反馈
ID
(
100703
);
...
@@ -1497,15 +1570,22 @@ public class NurseryServiceImpl implements NurseryService {
...
@@ -1497,15 +1570,22 @@ public class NurseryServiceImpl implements NurseryService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_success_have_plant"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_success_have_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
resetCost
),
moneyConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
resetCost
),
moneyConfig
.
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_success_have_plant"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_success_have_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//花圃中没有种植植物
//花圃中没有种植植物
if
(
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
||
StringUtils
.
isEmpty
(
nurseryInfo
.
getPlantId
()))
{
if
(
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
||
StringUtils
.
isEmpty
(
nurseryInfo
.
getPlantId
()))
{
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_success_no_plant"
);
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_reset_success_no_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_success_no_plant"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"nursery_reset_success_no_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
}
}
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
...
src/main/java/com/qiwuai/garden/service/petService/impl/PetServiceImpl.java
View file @
290107a1
package
com
.
qiwuai
.
garden
.
service
.
petService
.
impl
;
package
com
.
qiwuai
.
garden
.
service
.
petService
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.Constants
;
import
com.qiwuai.garden.common.FeedbackID
;
import
com.qiwuai.garden.common.FeedbackID
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.TimingAcquisition
;
import
com.qiwuai.garden.common.cache.CacheGlobal
;
import
com.qiwuai.garden.common.cache.CacheGlobal
;
import
com.qiwuai.garden.common.cache.CacheUtil
;
import
com.qiwuai.garden.common.cache.CacheUtil
;
import
com.qiwuai.garden.common.utils.RandomDropUtil
;
import
com.qiwuai.garden.common.utils.*
;
import
com.qiwuai.garden.common.utils.SpeechUtil
;
import
com.qiwuai.garden.dto.GardenerDto
;
import
com.qiwuai.garden.common.utils.TypeConvertUtil
;
import
com.qiwuai.garden.common.utils.YamlUtil
;
import
com.qiwuai.garden.dto.NurseryInfoDto
;
import
com.qiwuai.garden.dto.NurseryInfoDto
;
import
com.qiwuai.garden.dto.base.CommonResponse
;
import
com.qiwuai.garden.dto.base.CommonResponse
;
import
com.qiwuai.garden.dto.base.ResultResponse
;
import
com.qiwuai.garden.dto.base.ResultResponse
;
import
com.qiwuai.garden.dto.base.ResultVarsResponse
;
import
com.qiwuai.garden.dto.base.ResultVarsResponse
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.pojo.CallNamePojo
;
import
com.qiwuai.garden.pojo.PetPojo
;
import
com.qiwuai.garden.pojo.PetPojo
;
import
com.qiwuai.garden.pojo.PlantPojo
;
import
com.qiwuai.garden.pojo.PlantPojo
;
import
com.qiwuai.garden.pojo.QuantityRangePojo
;
import
com.qiwuai.garden.pojo.QuantityRangePojo
;
...
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
...
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
@Service
...
@@ -44,12 +45,15 @@ public class PetServiceImpl implements PetService {
...
@@ -44,12 +45,15 @@ public class PetServiceImpl implements PetService {
log
.
info
(
uid
+
"开始查询宠物信息"
);
log
.
info
(
uid
+
"开始查询宠物信息"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
Integer
petId
=
operationReq
.
getPetId
();
Integer
petId
=
operationReq
.
getPetId
();
//未提供宠物名称
//未提供宠物名称
if
(
StringUtils
.
isEmpty
(
petId
))
{
if
(
StringUtils
.
isEmpty
(
petId
))
{
log
.
info
(
uid
+
"未提供宠物名称"
);
log
.
info
(
uid
+
"未提供宠物名称"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_no_name"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_no_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -65,6 +69,7 @@ public class PetServiceImpl implements PetService {
...
@@ -65,6 +69,7 @@ public class PetServiceImpl implements PetService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_view_no_exist"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_view_no_exist"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_no_exist"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -115,6 +120,7 @@ public class PetServiceImpl implements PetService {
...
@@ -115,6 +120,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_view_field_one"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_view_field_one"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
petConfig
.
getDescription
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
petConfig
.
getDescription
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_field"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_field"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300102
);
resultResponse
.
set
反馈
ID
(
300102
);
}
}
//3.花圃和宠物栏中均没有该宠物
//3.花圃和宠物栏中均没有该宠物
...
@@ -130,6 +136,7 @@ public class PetServiceImpl implements PetService {
...
@@ -130,6 +136,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_view_no_pet"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_view_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantNames
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantNames
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300103
);
resultResponse
.
set
反馈
ID
(
300103
);
}
}
//4.仅宠物栏有多只该宠物
//4.仅宠物栏有多只该宠物
...
@@ -137,6 +144,7 @@ public class PetServiceImpl implements PetService {
...
@@ -137,6 +144,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_view_field_more"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_view_field_more"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
petConfig
.
getDescription
(),
String
.
valueOf
(
petCount
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
petConfig
.
getDescription
(),
String
.
valueOf
(
petCount
));
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_field"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_field"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300104
);
resultResponse
.
set
反馈
ID
(
300104
);
}
}
//5.花圃和宠物栏均有该宠物
//5.花圃和宠物栏均有该宠物
...
@@ -149,6 +157,7 @@ public class PetServiceImpl implements PetService {
...
@@ -149,6 +157,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
petConfig
.
getDescription
(),
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
petConfig
.
getDescription
(),
String
.
valueOf
(
petCount
),
String
.
valueOf
(
nurseryPetCount
),
nurseryNumText
.
toString
());
String
.
valueOf
(
petCount
),
String
.
valueOf
(
nurseryPetCount
),
nurseryNumText
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_field"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_view_field"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300105
);
resultResponse
.
set
反馈
ID
(
300105
);
}
}
//6.仅花圃有多只该宠物
//6.仅花圃有多只该宠物
...
@@ -199,10 +208,13 @@ public class PetServiceImpl implements PetService {
...
@@ -199,10 +208,13 @@ public class PetServiceImpl implements PetService {
log
.
info
(
uid
+
"开始移动宠物id"
+
petId
+
"至花圃"
+
nurseryNum
);
log
.
info
(
uid
+
"开始移动宠物id"
+
petId
+
"至花圃"
+
nurseryNum
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
if
(
StringUtils
.
isEmpty
(
petId
))
{
if
(
StringUtils
.
isEmpty
(
petId
))
{
log
.
info
(
uid
+
"的花圃没有提供宠物名称"
);
log
.
info
(
uid
+
"的花圃没有提供宠物名称"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_fail_no_pet_name"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_fail_no_pet_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300313
);
resultResponse
.
set
反馈
ID
(
300313
);
...
@@ -231,6 +243,7 @@ public class PetServiceImpl implements PetService {
...
@@ -231,6 +243,7 @@ public class PetServiceImpl implements PetService {
log
.
info
(
uid
+
"未提供花圃编号"
);
log
.
info
(
uid
+
"未提供花圃编号"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_no_nursery"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_no_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300314
);
resultResponse
.
set
反馈
ID
(
300314
);
...
@@ -246,6 +259,7 @@ public class PetServiceImpl implements PetService {
...
@@ -246,6 +259,7 @@ public class PetServiceImpl implements PetService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_wrong_num"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_wrong_num"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_wrong_num"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_wrong_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300307
);
resultResponse
.
set
反馈
ID
(
300307
);
...
@@ -266,6 +280,7 @@ public class PetServiceImpl implements PetService {
...
@@ -266,6 +280,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pos_over"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pos_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
allNurseryText
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
allNurseryText
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pos_over"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pos_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300316
);
resultResponse
.
set
反馈
ID
(
300316
);
...
@@ -283,6 +298,7 @@ public class PetServiceImpl implements PetService {
...
@@ -283,6 +298,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_have_this_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_have_this_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_have_this_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_have_this_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300309
);
resultResponse
.
set
反馈
ID
(
300309
);
...
@@ -295,6 +311,7 @@ public class PetServiceImpl implements PetService {
...
@@ -295,6 +311,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300302
);
resultResponse
.
set
反馈
ID
(
300302
);
...
@@ -338,6 +355,7 @@ public class PetServiceImpl implements PetService {
...
@@ -338,6 +355,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_no_pet"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300310
);
resultResponse
.
set
反馈
ID
(
300310
);
...
@@ -365,10 +383,16 @@ public class PetServiceImpl implements PetService {
...
@@ -365,10 +383,16 @@ public class PetServiceImpl implements PetService {
}
}
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_success"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
nurseryNum
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
nurseryNum
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300301
);
resultResponse
.
set
反馈
ID
(
300301
);
...
@@ -390,6 +414,8 @@ public class PetServiceImpl implements PetService {
...
@@ -390,6 +414,8 @@ public class PetServiceImpl implements PetService {
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取玩家的宠物栏位
//获取玩家的宠物栏位
List
<
Integer
>
petList
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getPetFields
();
List
<
Integer
>
petList
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getPetFields
();
//园丁宠物栏存放上限
//园丁宠物栏存放上限
...
@@ -399,7 +425,9 @@ public class PetServiceImpl implements PetService {
...
@@ -399,7 +425,9 @@ public class PetServiceImpl implements PetService {
log
.
info
(
uid
+
"的宠物栏已满"
);
log
.
info
(
uid
+
"的宠物栏已满"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_fail_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_fail_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
petNumMax
));
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_fail_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_fail_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300304
);
resultResponse
.
set
反馈
ID
(
300304
);
...
@@ -464,6 +492,7 @@ public class PetServiceImpl implements PetService {
...
@@ -464,6 +492,7 @@ public class PetServiceImpl implements PetService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_fail_no_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_fail_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_fail_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300320
);
resultResponse
.
set
反馈
ID
(
300320
);
...
@@ -506,6 +535,7 @@ public class PetServiceImpl implements PetService {
...
@@ -506,6 +535,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_fail_no_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_fail_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300311
);
resultResponse
.
set
反馈
ID
(
300311
);
...
@@ -521,6 +551,7 @@ public class PetServiceImpl implements PetService {
...
@@ -521,6 +551,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_fail_no_exist"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_fail_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_fail_no_exist"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_fail_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300312
);
resultResponse
.
set
反馈
ID
(
300312
);
...
@@ -554,6 +585,11 @@ public class PetServiceImpl implements PetService {
...
@@ -554,6 +585,11 @@ public class PetServiceImpl implements PetService {
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
log
.
info
(
uid
+
"花圃中的宠物移动宠物栏结束"
);
log
.
info
(
uid
+
"花圃中的宠物移动宠物栏结束"
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_success"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_field_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
petConfig
.
getName
());
...
@@ -562,6 +598,7 @@ public class PetServiceImpl implements PetService {
...
@@ -562,6 +598,7 @@ public class PetServiceImpl implements PetService {
sb
.
append
(
text
).
insert
(
strPos
+
1
,
addText
);
sb
.
append
(
text
).
insert
(
strPos
+
1
,
addText
);
text
=
sb
.
toString
();
text
=
sb
.
toString
();
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_field_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300303
);
resultResponse
.
set
反馈
ID
(
300303
);
...
@@ -585,12 +622,15 @@ public class PetServiceImpl implements PetService {
...
@@ -585,12 +622,15 @@ public class PetServiceImpl implements PetService {
Integer
nurseryNumPos
=
operationReq
.
getNurseryNumPos
();
Integer
nurseryNumPos
=
operationReq
.
getNurseryNumPos
();
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//有花圃位置,但格式不符合规范
//有花圃位置,但格式不符合规范
if
(!
StringUtils
.
isEmpty
(
nurseryPos
))
{
if
(!
StringUtils
.
isEmpty
(
nurseryPos
))
{
if
(
nurseryPos
.
equals
(
Constants
.
REQ_NON
))
{
if
(
nurseryPos
.
equals
(
Constants
.
REQ_NON
))
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_wrong_pos"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_wrong_pos"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_wrong_pos"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_wrong_pos"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300308
);
resultResponse
.
set
反馈
ID
(
300308
);
...
@@ -629,6 +669,7 @@ public class PetServiceImpl implements PetService {
...
@@ -629,6 +669,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pos_over"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pos_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
allNurseryText
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
allNurseryText
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pos_over"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pos_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300316
);
resultResponse
.
set
反馈
ID
(
300316
);
...
@@ -645,6 +686,7 @@ public class PetServiceImpl implements PetService {
...
@@ -645,6 +686,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumPos
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumPos
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300306
);
resultResponse
.
set
反馈
ID
(
300306
);
...
@@ -660,6 +702,7 @@ public class PetServiceImpl implements PetService {
...
@@ -660,6 +702,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_none"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_none"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryPos
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryPos
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_none"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_none"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300317
);
resultResponse
.
set
反馈
ID
(
300317
);
...
@@ -676,6 +719,7 @@ public class PetServiceImpl implements PetService {
...
@@ -676,6 +719,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_no_exist"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryPos
.
toString
(),
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryPos
.
toString
(),
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_no_exist"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_no_exist"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300318
);
resultResponse
.
set
反馈
ID
(
300318
);
...
@@ -698,10 +742,16 @@ public class PetServiceImpl implements PetService {
...
@@ -698,10 +742,16 @@ public class PetServiceImpl implements PetService {
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
log
.
info
(
uid
+
"在花圃间移动宠物的操作结束"
);
log
.
info
(
uid
+
"在花圃间移动宠物的操作结束"
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_success"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
id
).
getName
(),
nurseryNumPos
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
id
).
getName
(),
nurseryNumPos
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300305
);
resultResponse
.
set
反馈
ID
(
300305
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -734,11 +784,14 @@ public class PetServiceImpl implements PetService {
...
@@ -734,11 +784,14 @@ public class PetServiceImpl implements PetService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//宠物和花圃均没有指明
//宠物和花圃均没有指明
if
(
StringUtils
.
isEmpty
(
petId
)
&&
StringUtils
.
isEmpty
(
nurseryNum
))
{
if
(
StringUtils
.
isEmpty
(
petId
)
&&
StringUtils
.
isEmpty
(
nurseryNum
))
{
log
.
info
(
uid
+
"未提供花圃编号和宠物名称"
);
log
.
info
(
uid
+
"未提供花圃编号和宠物名称"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_fail_no_pet_nursery"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_fail_no_pet_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300409
);
resultResponse
.
set
反馈
ID
(
300409
);
...
@@ -785,6 +838,7 @@ public class PetServiceImpl implements PetService {
...
@@ -785,6 +838,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_check_nursery"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_check_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
entry
.
getKey
().
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
(),
entry
.
getKey
().
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_check"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300401
);
resultResponse
.
set
反馈
ID
(
300401
);
...
@@ -802,6 +856,7 @@ public class PetServiceImpl implements PetService {
...
@@ -802,6 +856,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_check_field"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_check_field"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_check"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -832,6 +887,7 @@ public class PetServiceImpl implements PetService {
...
@@ -832,6 +887,7 @@ public class PetServiceImpl implements PetService {
if
(
nurseryNum
.
equals
(
Constants
.
REQ_NON
))
{
if
(
nurseryNum
.
equals
(
Constants
.
REQ_NON
))
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_fail_nursery"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_fail_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300410
);
resultResponse
.
set
反馈
ID
(
300410
);
...
@@ -845,6 +901,7 @@ public class PetServiceImpl implements PetService {
...
@@ -845,6 +901,7 @@ public class PetServiceImpl implements PetService {
if
(
StringUtils
.
isEmpty
(
nurseryInfo
))
{
if
(
StringUtils
.
isEmpty
(
nurseryInfo
))
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_fail_no_nursery"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_fail_no_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300411
);
resultResponse
.
set
反馈
ID
(
300411
);
...
@@ -893,6 +950,7 @@ public class PetServiceImpl implements PetService {
...
@@ -893,6 +950,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_check_nursery"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_check_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
id
).
getName
(),
nurseryNum
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
id
).
getName
(),
nurseryNum
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_check"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300405
);
resultResponse
.
set
反馈
ID
(
300405
);
...
@@ -911,7 +969,8 @@ public class PetServiceImpl implements PetService {
...
@@ -911,7 +969,8 @@ public class PetServiceImpl implements PetService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
log
.
info
(
uid
+
"开始删除宠物"
);
log
.
info
(
uid
+
"开始删除宠物"
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -921,7 +980,7 @@ public class PetServiceImpl implements PetService {
...
@@ -921,7 +980,7 @@ public class PetServiceImpl implements PetService {
}
}
//判断当前操作为上一轮的下一步
//判断当前操作为上一轮的下一步
if
(
lastReq
.
getOperationLabel
()
!=
Constants
.
PET_DELETE
)
{
if
(
lastReq
.
getOperationLabel
()
!=
Constants
.
PET_DELETE
)
{
commonResponse
.
setCode
(
0
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"失败,本次操作不是这轮对话的"
);
commonResponse
.
setMsg
(
"失败,本次操作不是这轮对话的"
);
return
commonResponse
;
return
commonResponse
;
}
}
...
@@ -960,6 +1019,7 @@ public class PetServiceImpl implements PetService {
...
@@ -960,6 +1019,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_success"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300403
);
resultResponse
.
set
反馈
ID
(
300403
);
}
}
//指明花圃编号时,删除花圃中的宠物
//指明花圃编号时,删除花圃中的宠物
...
@@ -976,11 +1036,17 @@ public class PetServiceImpl implements PetService {
...
@@ -976,11 +1036,17 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_success"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petName
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300407
);
resultResponse
.
set
反馈
ID
(
300407
);
}
}
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
log
.
info
(
uid
+
"删除宠物完成"
);
log
.
info
(
uid
+
"删除宠物完成"
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -998,6 +1064,8 @@ public class PetServiceImpl implements PetService {
...
@@ -998,6 +1064,8 @@ public class PetServiceImpl implements PetService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
log
.
info
(
uid
+
"开始取消删除宠物"
);
log
.
info
(
uid
+
"开始取消删除宠物"
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -1023,6 +1091,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1023,6 +1091,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_cancel"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_cancel"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300404
);
resultResponse
.
set
反馈
ID
(
300404
);
}
}
//指明了花圃编号
//指明了花圃编号
...
@@ -1034,6 +1103,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1034,6 +1103,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_cancel"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_delete_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petName
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_cancel"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_delete_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300408
);
resultResponse
.
set
反馈
ID
(
300408
);
}
}
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
...
@@ -1068,12 +1138,15 @@ public class PetServiceImpl implements PetService {
...
@@ -1068,12 +1138,15 @@ public class PetServiceImpl implements PetService {
Integer
petId
=
operationReq
.
getPetId
();
Integer
petId
=
operationReq
.
getPetId
();
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
String
text
=
""
;
String
text
=
""
;
//玩家未提供操作信息
//玩家未提供操作信息
if
(
StringUtils
.
isEmpty
(
petId
)
&&
StringUtils
.
isEmpty
(
petPos
)
&&
StringUtils
.
isEmpty
(
petPos1
)
&&
StringUtils
.
isEmpty
(
petPos2
))
{
if
(
StringUtils
.
isEmpty
(
petId
)
&&
StringUtils
.
isEmpty
(
petPos
)
&&
StringUtils
.
isEmpty
(
petPos1
)
&&
StringUtils
.
isEmpty
(
petPos2
))
{
log
.
info
(
uid
+
"玩家未提供操作信息"
);
log
.
info
(
uid
+
"玩家未提供操作信息"
);
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_no_data"
);
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_no_data"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -1116,6 +1189,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1116,6 +1189,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_set_position_fail_no_pos"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_set_position_fail_no_pos"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
petList
.
size
()),
String
.
valueOf
(
petNumMax
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
petList
.
size
()),
String
.
valueOf
(
petNumMax
));
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_no_pos"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_no_pos"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -1134,6 +1208,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1134,6 +1208,7 @@ public class PetServiceImpl implements PetService {
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_wrong_pos"
);
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_wrong_pos"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -1164,6 +1239,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1164,6 +1239,7 @@ public class PetServiceImpl implements PetService {
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_no_name"
);
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_no_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -1182,6 +1258,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1182,6 +1258,7 @@ public class PetServiceImpl implements PetService {
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_wrong_name"
);
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_wrong_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -1222,6 +1299,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1222,6 +1299,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
pos
+
1
),
petConfig
.
getName
(),
petPos
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
pos
+
1
),
petConfig
.
getName
(),
petPos
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_success"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
}
else
{
}
else
{
//宠物已在宠物栏指定位置,无需移动
//宠物已在宠物栏指定位置,无需移动
if
(
pos
==
petPos
-
1
)
{
if
(
pos
==
petPos
-
1
)
{
...
@@ -1238,6 +1316,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1238,6 +1316,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
pos
+
1
),
petConfig
.
getName
(),
petPos
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
pos
+
1
),
petConfig
.
getName
(),
petPos
.
toString
());
}
}
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
}
}
}
}
resultResponse
.
set
反馈
ID
(
300501
);
resultResponse
.
set
反馈
ID
(
300501
);
...
@@ -1250,6 +1329,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1250,6 +1329,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_set_position_pet_fail_full"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_set_position_pet_fail_full"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_fail_full"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_fail_full"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300503
);
resultResponse
.
set
反馈
ID
(
300503
);
...
@@ -1296,6 +1376,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1296,6 +1376,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
petList
.
size
()),
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
petList
.
size
()),
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_success"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300501
);
resultResponse
.
set
反馈
ID
(
300501
);
}
}
}
}
...
@@ -1305,6 +1386,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1305,6 +1386,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_set_position_pet_fail_no_pet"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_set_position_pet_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petConfig
.
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_fail_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_pet_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300502
);
resultResponse
.
set
反馈
ID
(
300502
);
...
@@ -1322,6 +1404,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1322,6 +1404,7 @@ public class PetServiceImpl implements PetService {
log
.
info
(
uid
+
"提供的位置信息不存在"
);
log
.
info
(
uid
+
"提供的位置信息不存在"
);
//获取对应话术
//获取对应话术
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_wrong_pos"
);
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_fail_wrong_pos"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -1361,6 +1444,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1361,6 +1444,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_set_position_field_fail"
);
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_set_position_field_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
Integer
.
toString
(
petPos1
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
Integer
.
toString
(
petPos1
));
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_field_fail"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_field_fail"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300505
);
resultResponse
.
set
反馈
ID
(
300505
);
...
@@ -1390,10 +1474,17 @@ public class PetServiceImpl implements PetService {
...
@@ -1390,10 +1474,17 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
Integer
.
toString
(
petPos1
),
petConfig
.
getName
(),
Integer
.
toString
(
petPos2
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
Integer
.
toString
(
petPos1
),
petConfig
.
getName
(),
Integer
.
toString
(
petPos2
));
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_field_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_set_position_field_success"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
300504
);
resultResponse
.
set
反馈
ID
(
300504
);
}
}
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
log
.
info
(
uid
+
"宠物换位完成"
);
log
.
info
(
uid
+
"宠物换位完成"
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -1415,11 +1506,13 @@ public class PetServiceImpl implements PetService {
...
@@ -1415,11 +1506,13 @@ public class PetServiceImpl implements PetService {
String
petPos2Req
=
operationReq
.
getPetPos2
();
String
petPos2Req
=
operationReq
.
getPetPos2
();
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家未提供操作信息
//玩家未提供操作信息
if
(
StringUtils
.
isEmpty
(
petPos1Req
)
||
StringUtils
.
isEmpty
(
petPos2Req
))
{
if
(
StringUtils
.
isEmpty
(
petPos1Req
)
||
StringUtils
.
isEmpty
(
petPos2Req
))
{
log
.
info
(
uid
+
"玩家提供的位置不全"
);
log
.
info
(
uid
+
"玩家提供的位置不全"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_no_pos"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_no_pos"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
...
@@ -1443,6 +1536,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1443,6 +1536,7 @@ public class PetServiceImpl implements PetService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_same_set_only_one"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_same_set_only_one"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_same_set_only_one"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_same_set_only_one"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300516
);
resultResponse
.
set
反馈
ID
(
300516
);
...
@@ -1503,9 +1597,10 @@ public class PetServiceImpl implements PetService {
...
@@ -1503,9 +1597,10 @@ public class PetServiceImpl implements PetService {
petPos2
=
RandomDropUtil
.
getRandomNum
(
0
,
petList
.
size
());
petPos2
=
RandomDropUtil
.
getRandomNum
(
0
,
petList
.
size
());
//随机到的花圃编号跟petPos1一样,调整
//随机到的花圃编号跟petPos1一样,调整
if
(
petPos1
==
petPos2
)
{
if
(
petPos1
==
petPos2
)
{
petPos2
=
petPos1
+
1
;
if
(
petPos1
==
petList
.
size
())
{
if
(
petPos1
==
petList
.
size
())
{
petPos2
=
RandomDropUtil
.
getRandomNum
(
1
,
petList
.
size
()
-
1
);
petPos2
=
petPos1
-
1
;
}
else
{
petPos2
=
petPos1
+
1
;
}
}
}
}
}
}
...
@@ -1517,6 +1612,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1517,6 +1612,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_over"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
petNumMax
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
petNumMax
));
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_over"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300513
);
resultResponse
.
set
反馈
ID
(
300513
);
...
@@ -1532,6 +1628,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1532,6 +1628,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_no_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
Integer
.
toString
(
petPos1
));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
Integer
.
toString
(
petPos1
));
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300507
);
resultResponse
.
set
反馈
ID
(
300507
);
...
@@ -1547,6 +1644,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1547,6 +1644,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_set_error"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_set_error"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petPos1Req
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petPos1Req
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_set_error"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_set_error"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300514
);
resultResponse
.
set
反馈
ID
(
300514
);
...
@@ -1562,6 +1660,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1562,6 +1660,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_set_error"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_set_error"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petPos2Req
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
petPos2Req
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_set_error"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_set_error"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300514
);
resultResponse
.
set
反馈
ID
(
300514
);
...
@@ -1576,6 +1675,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1576,6 +1675,7 @@ public class PetServiceImpl implements PetService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_same_set"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_fail_same_set"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_same_set"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_fail_same_set"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300515
);
resultResponse
.
set
反馈
ID
(
300515
);
...
@@ -1592,11 +1692,17 @@ public class PetServiceImpl implements PetService {
...
@@ -1592,11 +1692,17 @@ public class PetServiceImpl implements PetService {
//两位置上的宠物互换位置
//两位置上的宠物互换位置
Collections
.
swap
(
petList
,
petPos1
-
1
,
petPos2
-
1
);
Collections
.
swap
(
petList
,
petPos1
-
1
,
petPos2
-
1
);
log
.
info
(
uid
+
"宠物互换位置完成"
);
log
.
info
(
uid
+
"宠物栏的宠物互换位置完成"
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_success"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_switch_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
Integer
.
toString
(
petPos1
),
petPos1Name
,
Integer
.
toString
(
petPos2
),
petPos2Name
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
Integer
.
toString
(
petPos1
),
petPos1Name
,
Integer
.
toString
(
petPos2
),
petPos2Name
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_switch_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300506
);
resultResponse
.
set
反馈
ID
(
300506
);
...
@@ -1624,12 +1730,18 @@ public class PetServiceImpl implements PetService {
...
@@ -1624,12 +1730,18 @@ public class PetServiceImpl implements PetService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//园丁宠物栏存放上限
int
petNumMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
()).
getPetNumMax
();
//宠物栏中还没有宠物
//宠物栏中还没有宠物
if
(
petList
.
size
()
==
0
)
{
if
(
petList
.
size
()
==
0
)
{
log
.
info
(
uid
+
"的宠物栏没有宠物"
);
log
.
info
(
uid
+
"的宠物栏没有宠物"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_fail_no_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
petNumMax
));
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_fail_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300602
);
resultResponse
.
set
反馈
ID
(
300602
);
...
@@ -1639,8 +1751,6 @@ public class PetServiceImpl implements PetService {
...
@@ -1639,8 +1751,6 @@ public class PetServiceImpl implements PetService {
return
commonResponse
;
return
commonResponse
;
}
}
StringBuilder
feedText
=
new
StringBuilder
();
StringBuilder
feedText
=
new
StringBuilder
();
//园丁宠物栏存放上限
int
petNumMax
=
TimingAcquisition
.
gardenerLevelMap
.
get
(
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
()).
getPetNumMax
();
//宠物配置信息
//宠物配置信息
Map
<
Integer
,
PetPojo
>
petConfigMap
=
TimingAcquisition
.
petConfigMap
;
Map
<
Integer
,
PetPojo
>
petConfigMap
=
TimingAcquisition
.
petConfigMap
;
//遍历宠物栏
//遍历宠物栏
...
@@ -1675,6 +1785,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1675,6 +1785,7 @@ public class PetServiceImpl implements PetService {
}
else
{
//宠物栏宠物数量少的情况,园丁的回答
}
else
{
//宠物栏宠物数量少的情况,园丁的回答
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_few"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_few"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
log
.
info
(
uid
+
"查看的宠物栏情况:"
+
feedText
.
toString
());
log
.
info
(
uid
+
"查看的宠物栏情况:"
+
feedText
.
toString
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -1704,6 +1815,8 @@ public class PetServiceImpl implements PetService {
...
@@ -1704,6 +1815,8 @@ public class PetServiceImpl implements PetService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_pet_check"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"nursery_pet_check"
);
//花圃均有宠物
//花圃均有宠物
...
@@ -1717,6 +1830,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1717,6 +1830,7 @@ public class PetServiceImpl implements PetService {
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"nursery_pet_check_free"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"nursery_pet_check_free"
);
resultResponse
.
set
后台附加返回
(
"查看花圃宠物状况回复1"
);
resultResponse
.
set
后台附加返回
(
"查看花圃宠物状况回复1"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
log
.
info
(
uid
+
"查看花圃宠物数量详情完成"
);
log
.
info
(
uid
+
"查看花圃宠物数量详情完成"
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -1766,6 +1880,8 @@ public class PetServiceImpl implements PetService {
...
@@ -1766,6 +1880,8 @@ public class PetServiceImpl implements PetService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
String
text
=
""
;
String
text
=
""
;
//1.宠物栏和花圃都有宠物
//1.宠物栏和花圃都有宠物
if
(
fieldPetCount
>
0
&&
nurseryPetCount
>
0
)
{
if
(
fieldPetCount
>
0
&&
nurseryPetCount
>
0
)
{
...
@@ -1790,6 +1906,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1790,6 +1906,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
total
),
String
.
valueOf
(
nurseryPetCount
),
nurseryPetText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
total
),
String
.
valueOf
(
nurseryPetCount
),
nurseryPetText
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_overview_only_nursery"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_overview_only_nursery"
);
}
}
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300801
);
resultResponse
.
set
反馈
ID
(
300801
);
...
@@ -1810,6 +1927,8 @@ public class PetServiceImpl implements PetService {
...
@@ -1810,6 +1927,8 @@ public class PetServiceImpl implements PetService {
log
.
info
(
uid
+
"查看花圃"
+
nurseryNum
+
"的宠物"
);
log
.
info
(
uid
+
"查看花圃"
+
nurseryNum
+
"的宠物"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家目前有的花圃编号
//玩家目前有的花圃编号
String
nurseryNumText
=
TimingAcquisition
.
getAllNurseryNum
(
uid
);
String
nurseryNumText
=
TimingAcquisition
.
getAllNurseryNum
(
uid
);
//没有提供花圃编号
//没有提供花圃编号
...
@@ -1818,6 +1937,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1818,6 +1937,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_fail_no_num"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_fail_no_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num_fail_no_num"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num_fail_no_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300901
);
resultResponse
.
set
反馈
ID
(
300901
);
...
@@ -1833,6 +1953,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1833,6 +1953,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_fail_wrong_num"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_fail_wrong_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num_fail_wrong_num"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num_fail_wrong_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300902
);
resultResponse
.
set
反馈
ID
(
300902
);
...
@@ -1849,6 +1970,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1849,6 +1970,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getSocialSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_fail_wrong_num"
);
String
text
=
SpeechUtil
.
getSocialSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_fail_wrong_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
);
text
+=
SpeechUtil
.
getSocialSpeech
(
gender
,
"pet_check_by_num_fail_wrong_num"
);
text
+=
SpeechUtil
.
getSocialSpeech
(
gender
,
"pet_check_by_num_fail_wrong_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300902
);
resultResponse
.
set
反馈
ID
(
300902
);
...
@@ -1867,6 +1989,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1867,6 +1989,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_fail_no_pet"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num_fail_no_pet"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num_fail_no_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300903
);
resultResponse
.
set
反馈
ID
(
300903
);
...
@@ -1885,6 +2008,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1885,6 +2008,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getName
(),
nurseryNum
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
petConfigMap
.
get
(
petId
).
getName
(),
nurseryNum
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300904
);
resultResponse
.
set
反馈
ID
(
300904
);
...
@@ -1902,6 +2026,8 @@ public class PetServiceImpl implements PetService {
...
@@ -1902,6 +2026,8 @@ public class PetServiceImpl implements PetService {
ResultResponse
resultResponse
=
new
ResultResponse
();
ResultResponse
resultResponse
=
new
ResultResponse
();
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -1926,6 +2052,7 @@ public class PetServiceImpl implements PetService {
...
@@ -1926,6 +2052,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_sure"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_check_by_num_sure"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
pet
.
getName
(),
pet
.
getDescription
(),
attributeText
.
toString
(),
pet
.
getHp
().
toString
(),
pet
.
getFc
().
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
pet
.
getName
(),
pet
.
getDescription
(),
attributeText
.
toString
(),
pet
.
getHp
().
toString
(),
pet
.
getFc
().
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num_sure"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_check_by_num_sure"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
300905
);
resultResponse
.
set
反馈
ID
(
300905
);
...
@@ -1978,12 +2105,15 @@ public class PetServiceImpl implements PetService {
...
@@ -1978,12 +2105,15 @@ public class PetServiceImpl implements PetService {
log
.
info
(
uid
+
"开始交换花圃"
+
nurseryPos
+
"中的宠物和花圃"
+
nurseryNumPos
+
"的宠物"
);
log
.
info
(
uid
+
"开始交换花圃"
+
nurseryPos
+
"中的宠物和花圃"
+
nurseryNumPos
+
"的宠物"
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//有花圃位置,但格式不符合规范
//有花圃位置,但格式不符合规范
if
(!
StringUtils
.
isEmpty
(
nurseryPos
))
{
if
(!
StringUtils
.
isEmpty
(
nurseryPos
))
{
if
(
nurseryPos
.
equals
(
Constants
.
REQ_NON
))
{
if
(
nurseryPos
.
equals
(
Constants
.
REQ_NON
))
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_wrong_pos"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_wrong_pos"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_wrong_pos"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_wrong_pos"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
301003
);
resultResponse
.
set
反馈
ID
(
301003
);
...
@@ -2004,6 +2134,7 @@ public class PetServiceImpl implements PetService {
...
@@ -2004,6 +2134,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pos_over"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_fail_pos_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
allNurseryText
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
allNurseryText
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pos_over"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_pos_over"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
301004
);
resultResponse
.
set
反馈
ID
(
301004
);
...
@@ -2020,6 +2151,7 @@ public class PetServiceImpl implements PetService {
...
@@ -2020,6 +2151,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_switch_fail_none"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_switch_fail_none"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryPos
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryPos
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_none"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_none"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
301002
);
resultResponse
.
set
反馈
ID
(
301002
);
...
@@ -2035,6 +2167,7 @@ public class PetServiceImpl implements PetService {
...
@@ -2035,6 +2167,7 @@ public class PetServiceImpl implements PetService {
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_switch_fail_none"
);
String
text
=
SpeechUtil
.
getPetSpeech
(
Constants
.
SPEECH_ASIDE
,
"pet_move_nursery_switch_fail_none"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumPos
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumPos
.
toString
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_none"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_fail_none"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
301002
);
resultResponse
.
set
反馈
ID
(
301002
);
...
@@ -2066,6 +2199,7 @@ public class PetServiceImpl implements PetService {
...
@@ -2066,6 +2199,7 @@ public class PetServiceImpl implements PetService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryPos
.
toString
(),
TimingAcquisition
.
petConfigMap
.
get
(
id
).
getName
(),
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryPos
.
toString
(),
TimingAcquisition
.
petConfigMap
.
get
(
id
).
getName
(),
nurseryNumPos
.
toString
(),
TimingAcquisition
.
petConfigMap
.
get
(
numId
).
getName
());
nurseryNumPos
.
toString
(),
TimingAcquisition
.
petConfigMap
.
get
(
numId
).
getName
());
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_success"
);
text
+=
SpeechUtil
.
getPetSpeech
(
gender
,
"pet_move_nursery_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
resultResponse
.
set
反馈
ID
(
301001
);
resultResponse
.
set
反馈
ID
(
301001
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
...
src/main/java/com/qiwuai/garden/service/plantService/impl/PlantServiceImpl.java
View file @
290107a1
...
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
...
@@ -90,6 +91,8 @@ public class PlantServiceImpl implements PlantService {
...
@@ -90,6 +91,8 @@ public class PlantServiceImpl implements PlantService {
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
//花圃编号
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
//花圃编号
log
.
info
(
uid
+
"开始检查播种条件"
);
log
.
info
(
uid
+
"开始检查播种条件"
);
log
.
info
(
uid
+
"玩家的请求信息,植物id:"
+
plantId
+
",花圃编号:"
+
nurseryNum
);
log
.
info
(
uid
+
"玩家的请求信息,植物id:"
+
plantId
+
",花圃编号:"
+
nurseryNum
);
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//保存本轮操作的标识
//保存本轮操作的标识
operationReq
.
setOperationLabel
(
Constants
.
PLANT_SEED
);
operationReq
.
setOperationLabel
(
Constants
.
PLANT_SEED
);
//园丁性别
//园丁性别
...
@@ -227,10 +230,27 @@ public class PlantServiceImpl implements PlantService {
...
@@ -227,10 +230,27 @@ public class PlantServiceImpl implements PlantService {
operationReq
.
setNurseryNum
(
null
);
operationReq
.
setNurseryNum
(
null
);
operationReq
.
setPlantId
(
plantId
);
operationReq
.
setPlantId
(
plantId
);
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
//获取对应话术
//空闲的花圃
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_planted"
);
List
<
String
>
nurseryList
=
new
ArrayList
<>();
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
()).
getName
());
for
(
Map
.
Entry
<
Integer
,
NurseryInfoDto
>
entry
:
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
().
entrySet
())
{
NurseryInfoDto
nurseryInfoDto
=
entry
.
getValue
();
if
(
nurseryInfoDto
.
getStatus
()
==
0
)
{
nurseryList
.
add
(
String
.
valueOf
(
entry
.
getKey
()));
}
}
String
text
=
""
;
if
(
nurseryList
.
size
()
>
0
)
{
String
nurseryText
=
String
.
join
(
"、"
,
nurseryList
);
//获取对应话术
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_planted_hava_free"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
()).
getName
(),
nurseryText
);
}
else
{
//获取对应话术
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_planted_no_free"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
plantMap
.
get
(
nurseryInfo
.
getPlantId
()).
getName
());
}
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_planted"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_planted"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100104
);
resultResponse
.
set
反馈
ID
(
100104
);
...
@@ -327,6 +347,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -327,6 +347,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_seed"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_seed"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
itemConfigMap
.
get
(
plant
.
getFruitId
()).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
itemConfigMap
.
get
(
plant
.
getFruitId
()).
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_seed"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_seed"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100118
);
resultResponse
.
set
反馈
ID
(
100118
);
...
@@ -367,7 +388,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -367,7 +388,7 @@ public class PlantServiceImpl implements PlantService {
//从背包中取出对应果实id
//从背包中取出对应果实id
ItemDto
fruitItem
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
fruitType
).
getItems
(
plant
.
getFruitId
());
ItemDto
fruitItem
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
fruitType
).
getItems
(
plant
.
getFruitId
());
Integer
level
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
();
Integer
level
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getLevel
();
//园丁等级不足以种植该植物
//
1.
园丁等级不足以种植该植物
if
(
plant
.
getGardenerLevel
()
>
level
)
{
if
(
plant
.
getGardenerLevel
()
>
level
)
{
log
.
info
(
uid
+
"种植失败,园丁等级"
+
level
+
"还足以种植:"
+
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getName
()
+
",需要等级:"
+
plant
.
getGardenerLevel
());
log
.
info
(
uid
+
"种植失败,园丁等级"
+
level
+
"还足以种植:"
+
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getName
()
+
",需要等级:"
+
plant
.
getGardenerLevel
());
//保存玩家这轮的请求信息
//保存玩家这轮的请求信息
...
@@ -388,7 +409,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -388,7 +409,7 @@ public class PlantServiceImpl implements PlantService {
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
}
}
//背包中没植物对应的果实
//
2.
背包中没植物对应的果实
if
(
StringUtils
.
isEmpty
(
fruitItem
))
{
if
(
StringUtils
.
isEmpty
(
fruitItem
))
{
log
.
info
(
uid
+
"背包中没有"
+
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getName
()
+
"对应的果实:"
+
TimingAcquisition
.
itemConfigMap
.
get
(
plant
.
getFruitId
()).
getName
());
log
.
info
(
uid
+
"背包中没有"
+
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getName
()
+
"对应的果实:"
+
TimingAcquisition
.
itemConfigMap
.
get
(
plant
.
getFruitId
()).
getName
());
//保存玩家这轮的请求信息
//保存玩家这轮的请求信息
...
@@ -409,30 +430,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -409,30 +430,7 @@ public class PlantServiceImpl implements PlantService {
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
}
}
//背包中种子数量是否满足种满整个花圃
//3.花圃等级是否满足果实种植条件,果实对应植物的所需花圃等级要小于等于种植花圃的等级
//需要的果实数量
int
fruitNum
=
(
int
)
(((
double
)
nurseryConfig
.
getCapacity
()
/
plant
.
getOccupyArea
())
*
plant
.
getFruitSeedNum
());
if
(
fruitItem
.
getItemNum
()
<
fruitNum
)
{
//保存玩家这轮的请求信息
operationReq
.
setNurseryNum
(
nurseryNum
);
operationReq
.
setPlantId
(
null
);
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
log
.
info
(
uid
+
"背包中的"
+
TimingAcquisition
.
itemConfigMap
.
get
(
plant
.
getFruitId
()).
getName
()
+
"只有"
+
fruitItem
.
getItemNum
()
+
"个"
+
",需要"
+
fruitNum
+
"个"
);
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_seed"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
itemConfigMap
.
get
(
plant
.
getFruitId
()).
getName
(),
fruitItem
.
getItemNum
().
toString
(),
String
.
valueOf
(
fruitNum
));
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_seed"
);
log
.
info
(
"种植失败,果实数量不够"
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100103
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"种植植物回复3"
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
//花圃等级是否满足种子种植条件,种子对应植物的所需花圃等级要小于等于种植花圃的等级
if
(
plant
.
getNurseryLevel
()
>
nurseryConfig
.
getLevel
())
{
if
(
plant
.
getNurseryLevel
()
>
nurseryConfig
.
getLevel
())
{
log
.
info
(
uid
+
"种植失败,需达到花圃等级"
+
plant
.
getNurseryLevel
()
+
",目前花圃等级"
+
nurseryConfig
.
getLevel
());
log
.
info
(
uid
+
"种植失败,需达到花圃等级"
+
plant
.
getNurseryLevel
()
+
",目前花圃等级"
+
nurseryConfig
.
getLevel
());
//保存玩家这轮的请求信息
//保存玩家这轮的请求信息
...
@@ -453,34 +451,36 @@ public class PlantServiceImpl implements PlantService {
...
@@ -453,34 +451,36 @@ public class PlantServiceImpl implements PlantService {
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
}
}
//花圃类型是否满足种植条件
//4.花圃类型是否满足种植条件
if
(!
StringUtils
.
isEmpty
(
plant
.
getNurseryId
())
&&
!
Constants
.
NON
.
equals
(
Integer
.
parseInt
(
plant
.
getNurseryId
())))
{
//有配置花圃多个花圃类型
if
(!
StringUtils
.
isEmpty
(
plant
.
getNurseryId
()))
{
//有配置花圃多个花圃类型
List
<
String
>
nurseryIdList
=
Arrays
.
asList
(
plant
.
getNurseryId
().
split
(
"\\|"
));
if
(!
Constants
.
NON_STR
.
equals
(
plant
.
getNurseryId
()))
{
if
(!
nurseryIdList
.
contains
(
nurseryInfo
.
getId
().
toString
()))
{
List
<
String
>
nurseryIdList
=
Arrays
.
asList
(
plant
.
getNurseryId
().
split
(
"\\|"
));
//清除缓存,本轮对话结束
if
(!
nurseryIdList
.
contains
(
nurseryInfo
.
getId
().
toString
()))
{
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
//清除缓存,本轮对话结束
StringBuilder
feedText
=
new
StringBuilder
();
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
for
(
String
nurseryId
:
nurseryIdList
)
{
StringBuilder
feedText
=
new
StringBuilder
();
feedText
.
append
(
TimingAcquisition
.
nurseryConfigMap
.
get
(
Integer
.
parseInt
(
nurseryId
)).
getName
()).
append
(
"、"
);
for
(
String
nurseryId
:
nurseryIdList
)
{
feedText
.
append
(
TimingAcquisition
.
nurseryConfigMap
.
get
(
Integer
.
parseInt
(
nurseryId
)).
getName
()).
append
(
"、"
);
}
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
log
.
info
(
uid
+
"提供的"
+
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getName
()
+
"只能种植在"
+
feedText
);
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_nursery_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getName
(),
feedText
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_nursery_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100106
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"种植植物回复6"
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
}
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
log
.
info
(
uid
+
"提供的"
+
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getName
()
+
"只能种植在"
+
feedText
);
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_nursery_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getName
(),
feedText
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_nursery_type"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100106
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"种植植物回复6"
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
}
}
}
//园丁技能是否满足种植条件
//
5.
园丁技能是否满足种植条件
if
(!
StringUtils
.
isEmpty
(
plant
.
getGardenerSkillId
())
&&
!
Constants
.
NON
.
equals
(
plant
.
getGardenerSkillId
()))
{
if
(!
StringUtils
.
isEmpty
(
plant
.
getGardenerSkillId
())
&&
!
Constants
.
NON
.
equals
(
plant
.
getGardenerSkillId
()))
{
Map
<
Integer
,
GardenerSkillDto
>
gardenerSkillMap
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
Map
<
Integer
,
GardenerSkillDto
>
gardenerSkillMap
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGardenerInfo
().
getSkills
();
List
<
Integer
>
skillIdList
=
gardenerSkillMap
.
values
().
stream
().
map
(
GardenerSkillDto:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
skillIdList
=
gardenerSkillMap
.
values
().
stream
().
map
(
GardenerSkillDto:
:
getId
).
collect
(
Collectors
.
toList
());
...
@@ -505,12 +505,38 @@ public class PlantServiceImpl implements PlantService {
...
@@ -505,12 +505,38 @@ public class PlantServiceImpl implements PlantService {
return
commonResponse
;
return
commonResponse
;
}
}
}
}
//6.背包中种子数量是否满足种满整个花圃
//花园中是否有伴生植物即必须植物
//--------------------玩家技能的花圃容量加成-------------
BigDecimal
addCapacityPro
=
TimingAcquisition
.
getAddNurseryCapacity
(
uid
);
double
nurseryCapacity
=
addCapacityPro
.
add
(
new
BigDecimal
(
1
)).
multiply
(
new
BigDecimal
(
nurseryConfig
.
getCapacity
())).
doubleValue
();
//需要的果实数量
int
fruitNum
=
(
int
)
((
nurseryCapacity
/
plant
.
getOccupyArea
())
*
plant
.
getFruitSeedNum
());
if
(
fruitItem
.
getItemNum
()
<
fruitNum
)
{
//保存玩家这轮的请求信息
operationReq
.
setNurseryNum
(
nurseryNum
);
operationReq
.
setPlantId
(
null
);
CacheUtil
.
put
(
uid
,
operationReq
,
Long
.
parseLong
(
expireTime
));
log
.
info
(
uid
+
"背包中的"
+
TimingAcquisition
.
itemConfigMap
.
get
(
plant
.
getFruitId
()).
getName
()
+
"只有"
+
fruitItem
.
getItemNum
()
+
"个"
+
",需要"
+
fruitNum
+
"个"
);
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_seed"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
TimingAcquisition
.
itemConfigMap
.
get
(
plant
.
getFruitId
()).
getName
(),
fruitItem
.
getItemNum
().
toString
(),
String
.
valueOf
(
fruitNum
));
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_seed"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
log
.
info
(
"种植失败,果实数量不够"
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100103
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"种植植物回复3"
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
}
//7.花园中是否有伴生植物即必须植物
//种植所需植物
//种植所需植物
String
nearPlantIds
=
plant
.
getNearPlantIds
();
String
nearPlantIds
=
plant
.
getNearPlantIds
();
if
(!
StringUtils
.
isEmpty
(
nearPlantIds
))
{
if
(!
StringUtils
.
isEmpty
(
nearPlantIds
))
{
if
(!
nearPlantIds
.
equals
(
Constants
.
NON
.
toString
()
))
{
if
(!
Constants
.
NON_STR
.
equals
(
nearPlantIds
))
{
String
[]
nearPlantIdList
=
nearPlantIds
.
split
(
"\\|"
);
String
[]
nearPlantIdList
=
nearPlantIds
.
split
(
"\\|"
);
//花园中已有植物
//花园中已有植物
log
.
info
(
"花园中的现有花圃信息:"
+
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
());
log
.
info
(
"花园中的现有花圃信息:"
+
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getGarden
().
getNurseryInfos
());
...
@@ -540,8 +566,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -540,8 +566,7 @@ public class PlantServiceImpl implements PlantService {
}
}
}
}
}
}
//8.花圃中是否有指定宠物
//花圃中是否有指定宠物
Integer
petId
=
plant
.
getPetId
();
Integer
petId
=
plant
.
getPetId
();
if
(!
StringUtils
.
isEmpty
(
petId
)
&&
!
Constants
.
NON
.
equals
(
petId
))
{
if
(!
StringUtils
.
isEmpty
(
petId
)
&&
!
Constants
.
NON
.
equals
(
petId
))
{
Integer
nurseryPetId
=
nurseryInfo
.
getPetField
();
Integer
nurseryPetId
=
nurseryInfo
.
getPetField
();
...
@@ -554,6 +579,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -554,6 +579,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_pet"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_fail_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plant
.
getName
(),
petName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plant
.
getName
(),
petName
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_pet"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_fail_pet"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100109
);
resultResponse
.
set
反馈
ID
(
100109
);
...
@@ -564,8 +590,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -564,8 +590,7 @@ public class PlantServiceImpl implements PlantService {
return
commonResponse
;
return
commonResponse
;
}
}
}
}
//9.背包是否有果实种植时所需材料数量
//背包是否有果实种植时所需材料数量
//获取植物配置信息中的所需材料
//获取植物配置信息中的所需材料
String
costItemNums
=
plant
.
getCostItemNums
();
String
costItemNums
=
plant
.
getCostItemNums
();
//植物有配置所需消耗材料
//植物有配置所需消耗材料
...
@@ -655,6 +680,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -655,6 +680,7 @@ public class PlantServiceImpl implements PlantService {
ResultResponse
resultResponse
=
new
ResultResponse
();
ResultResponse
resultResponse
=
new
ResultResponse
();
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
log
.
info
(
uid
+
"开始二次确认种植"
);
log
.
info
(
uid
+
"开始二次确认种植"
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
...
@@ -707,25 +733,28 @@ public class PlantServiceImpl implements PlantService {
...
@@ -707,25 +733,28 @@ public class PlantServiceImpl implements PlantService {
//到此说明已满足所有种植条件,可以种植后需消耗物品,将背包中对应物品减少数量
//到此说明已满足所有种植条件,可以种植后需消耗物品,将背包中对应物品减少数量
//获取植物配置信息中消耗的所需物品
//获取植物配置信息中消耗的所需物品
String
costItemNums
=
plant
.
getCostItemNums
();
String
costItemNums
=
plant
.
getCostItemNums
();
if
(!
StringUtils
.
isEmpty
(
costItemNums
)
&&
!
Constants
.
NON
.
equals
(
Integer
.
parseInt
(
costItemNums
)))
{
if
(!
StringUtils
.
isEmpty
(
costItemNums
))
{
log
.
info
(
"消耗物品前背包的所有物品:"
+
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
());
if
(!
Constants
.
NON_STR
.
equals
(
costItemNums
))
{
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
log
.
info
(
"种植需要消耗物品:"
+
costItemNums
);
for
(
ItemDto
item
:
itemDtoList
)
{
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
//物品对应种类
for
(
ItemDto
item
:
itemDtoList
)
{
Integer
itemType
=
TimingAcquisition
.
itemConfigMap
.
get
(
item
.
getItemId
()).
getItemTypeId
();
//物品对应种类
//背包中对应种类的袋子
Integer
itemType
=
TimingAcquisition
.
itemConfigMap
.
get
(
item
.
getItemId
()).
getItemTypeId
();
ItemBagDto
itemBag
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
itemType
);
//背包中对应种类的袋子
//获取袋里的该物品
ItemBagDto
itemBag
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
itemType
);
ItemDto
itemPacket
=
itemBag
.
getItems
(
item
.
getItemId
());
//获取袋里的该物品
itemPacket
.
setItemNum
(
itemPacket
.
getItemNum
()
-
item
.
getItemNum
());
ItemDto
itemPacket
=
itemBag
.
getItems
(
item
.
getItemId
());
}
itemPacket
.
setItemNum
(
itemPacket
.
getItemNum
()
-
item
.
getItemNum
());
log
.
info
(
"消耗物品后背包的所有物品:"
+
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
());
}
}
}
}
//--------------------玩家技能的花圃容量加成-------------
BigDecimal
addCapacityPro
=
TimingAcquisition
.
getAddNurseryCapacity
(
uid
);
double
nurseryCapacity
=
addCapacityPro
.
add
(
new
BigDecimal
(
1
)).
multiply
(
new
BigDecimal
(
nurseryConfig
.
getCapacity
())).
doubleValue
();
//背包减少相应果实数量
//背包减少相应果实数量
//从背包中取出对应果实id
//从背包中取出对应果实id
ItemDto
fruitItem
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
Constants
.
ITEM_TYPE_FRUIT
).
getItems
(
plant
.
getFruitId
());
ItemDto
fruitItem
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
Constants
.
ITEM_TYPE_FRUIT
).
getItems
(
plant
.
getFruitId
());
fruitItem
.
setItemNum
(
fruitItem
.
getItemNum
()
-
(
nurseryConfig
.
getCapacity
()/
plant
.
getOccupyArea
())
*
plant
.
getFruitSeedNum
());
fruitItem
.
setItemNum
((
int
)
(
fruitItem
.
getItemNum
()
-
(
nurseryCapacity
/
plant
.
getOccupyArea
())
*
plant
.
getFruitSeedNum
()));
log
.
info
(
"开始种植:"
+
plant
.
getName
());
log
.
info
(
"开始种植:"
+
plant
.
getName
());
//对应花圃中增加植物
//对应花圃中增加植物
nurseryInfo
.
setPlantId
(
plantId
);
nurseryInfo
.
setPlantId
(
plantId
);
...
@@ -734,16 +763,18 @@ public class PlantServiceImpl implements PlantService {
...
@@ -734,16 +763,18 @@ public class PlantServiceImpl implements PlantService {
nurseryInfo
.
setSeedingTime
(
DateUtil
.
getCurrentTime
());
nurseryInfo
.
setSeedingTime
(
DateUtil
.
getCurrentTime
());
nurseryInfo
.
setStatus
(
Constants
.
PLANT_SEEDING
);
//花圃为播种期
nurseryInfo
.
setStatus
(
Constants
.
PLANT_SEEDING
);
//花圃为播种期
nurseryInfo
.
setFruitTimes
(
plant
.
getFruitTimes
());
//结果次数重置为当前植物的结果次数
nurseryInfo
.
setFruitTimes
(
plant
.
getFruitTimes
());
//结果次数重置为当前植物的结果次数
//--------------------玩家的技能植物成熟时间缩短加成--------------
BigDecimal
speedPlantMaturePro
=
TimingAcquisition
.
getSpeedPlantMature
(
uid
);
double
speedMaturePro
=
new
BigDecimal
(
1
).
subtract
(
speedPlantMaturePro
).
doubleValue
();
//防守方的攻击力减少
//植物生长周期信息
//植物生长周期信息
Map
<
Integer
,
PlantPeriodDto
>
periodTempMap
=
TimingAcquisition
.
periodMap
.
get
(
nurseryInfo
.
getPlantId
());
Map
<
Integer
,
PlantPeriodDto
>
periodTempMap
=
TimingAcquisition
.
periodMap
.
get
(
nurseryInfo
.
getPlantId
());
//记录植物所有生长期的所需时间
//记录植物所有生长期的所需时间
PlantTimeDto
plantTime
=
new
PlantTimeDto
();
PlantTimeDto
plantTime
=
new
PlantTimeDto
();
plantTime
.
setSeedingTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
periodTempMap
.
get
(
Constants
.
PLANT_SEEDING
).
getEndTime
(
)));
plantTime
.
setSeedingTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
(
periodTempMap
.
get
(
Constants
.
PLANT_SEEDING
).
getEndTime
()
*
speedMaturePro
)));
plantTime
.
setSowingTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
periodTempMap
.
get
(
Constants
.
PLANT_SOWING
).
getEndTime
(
)));
plantTime
.
setSowingTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
(
periodTempMap
.
get
(
Constants
.
PLANT_SOWING
).
getEndTime
()
*
speedMaturePro
)));
plantTime
.
setGrowingTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
periodTempMap
.
get
(
Constants
.
PLANT_GROWING
).
getEndTime
(
)));
plantTime
.
setGrowingTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
(
periodTempMap
.
get
(
Constants
.
PLANT_GROWING
).
getEndTime
()
*
speedMaturePro
)));
plantTime
.
setBloomingTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
periodTempMap
.
get
(
Constants
.
PLANT_BLOOMING
).
getEndTime
(
)));
plantTime
.
setBloomingTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
(
periodTempMap
.
get
(
Constants
.
PLANT_BLOOMING
).
getEndTime
()
*
speedMaturePro
)));
plantTime
.
setMatureTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
periodTempMap
.
get
(
Constants
.
PLANT_MATURE
).
getEndTime
(
)));
plantTime
.
setMatureTime
(
DateUtil
.
addTime
(
nurseryInfo
.
getSeedingTime
(),
(
int
)
(
periodTempMap
.
get
(
Constants
.
PLANT_MATURE
).
getEndTime
()
*
speedMaturePro
)));
nurseryInfo
.
setPlantTime
(
plantTime
);
nurseryInfo
.
setPlantTime
(
plantTime
);
...
@@ -769,10 +800,10 @@ public class PlantServiceImpl implements PlantService {
...
@@ -769,10 +800,10 @@ public class PlantServiceImpl implements PlantService {
TaskResultDto
dailyTaskResult
=
TimingAcquisition
.
checkDailyTask
(
uid
,
Constants
.
SEEDING_EVENT
);
TaskResultDto
dailyTaskResult
=
TimingAcquisition
.
checkDailyTask
(
uid
,
Constants
.
SEEDING_EVENT
);
//持久化该园丁信息
//持久化该园丁信息
//
Map<String, GardenerDto> gardenerMap = new ConcurrentHashMap<>();
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
//
gardenerMap.put(uid, TimingAcquisition.gardenerMap.get(uid));
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
//
String gardener = JSON.toJSONString(gardenerMap);
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
//
PersistenceUtil.saveDataToFile(uid, gardener);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
...
@@ -780,6 +811,16 @@ public class PlantServiceImpl implements PlantService {
...
@@ -780,6 +811,16 @@ public class PlantServiceImpl implements PlantService {
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//新手引导的第4次种植果实任务完成
Integer
seedingTimes
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getTaskCountMap
().
get
(
Constants
.
SEEDING_EVENT
);
log
.
info
(
uid
+
"目前的GB_新手引导步骤:"
+
noviceGuide
);
if
(
seedingTimes
>=
4
&&
"完成10013"
.
equals
(
noviceGuide
))
{
String
guideFourthSeedPlan
=
TimingAcquisition
.
systemConfigMap
.
get
(
"guide_fourth_seed_plant"
).
getValue
();
ItemDto
guideFourthSeedPlanNum
=
TypeConvertUtil
.
itemString2List
(
guideFourthSeedPlan
).
get
(
0
);
if
(
plantId
.
equals
(
guideFourthSeedPlanNum
.
getItemId
()))
{
resultResponse
.
set
任务完成
(
"10014"
);
}
}
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_success"
);
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
());
...
@@ -823,10 +864,13 @@ public class PlantServiceImpl implements PlantService {
...
@@ -823,10 +864,13 @@ public class PlantServiceImpl implements PlantService {
PlantPojo
plant
=
TimingAcquisition
.
plantMap
.
get
(
plantId
);
PlantPojo
plant
=
TimingAcquisition
.
plantMap
.
get
(
plantId
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_cancel"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"plant_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
().
equals
(
"0"
)
?
""
:
nurseryNum
.
toString
(),
(
plant
==
null
)
?
""
:
plant
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
().
equals
(
"0"
)
?
""
:
nurseryNum
.
toString
(),
(
plant
==
null
)
?
""
:
plant
.
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_cancel"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"plant_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
...
@@ -846,6 +890,8 @@ public class PlantServiceImpl implements PlantService {
...
@@ -846,6 +890,8 @@ public class PlantServiceImpl implements PlantService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
Integer
plantId
=
operationReq
.
getPlantId
();
Integer
plantId
=
operationReq
.
getPlantId
();
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(!
StringUtils
.
isEmpty
(
lastReq
))
{
if
(!
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -973,7 +1019,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -973,7 +1019,7 @@ public class PlantServiceImpl implements PlantService {
String
costItemNums
=
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getCostItemNums
();
String
costItemNums
=
TimingAcquisition
.
plantMap
.
get
(
plantId
).
getCostItemNums
();
//植物有配置所需消耗材料
//植物有配置所需消耗材料
if
(!
StringUtils
.
isEmpty
(
costItemNums
))
{
if
(!
StringUtils
.
isEmpty
(
costItemNums
))
{
if
(!
Constants
.
NON
.
equals
(
Integer
.
parseInt
(
costItemNums
)
))
{
if
(!
Constants
.
NON
_STR
.
equals
(
costItemNums
))
{
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
//此次批量种植所需要材料能满足种几个花圃
//此次批量种植所需要材料能满足种几个花圃
for
(
ItemDto
item
:
itemDtoList
)
{
for
(
ItemDto
item
:
itemDtoList
)
{
...
@@ -1010,7 +1056,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1010,7 +1056,7 @@ public class PlantServiceImpl implements PlantService {
successNumText
.
deleteCharAt
(
successNumText
.
length
()
-
1
);
successNumText
.
deleteCharAt
(
successNumText
.
length
()
-
1
);
//所需果实和材料
//所需果实和材料
if
(!
StringUtils
.
isEmpty
(
costItemNums
))
{
if
(!
StringUtils
.
isEmpty
(
costItemNums
))
{
if
(!
Constants
.
NON
.
equals
(
Integer
.
parseInt
(
costItemNums
)
))
{
if
(!
Constants
.
NON
_STR
.
equals
(
costItemNums
))
{
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
//此次批量种植所需要材料
//此次批量种植所需要材料
for
(
ItemDto
item
:
itemDtoList
)
{
for
(
ItemDto
item
:
itemDtoList
)
{
...
@@ -1051,7 +1097,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1051,7 +1097,7 @@ public class PlantServiceImpl implements PlantService {
//所需果实和材料
//所需果实和材料
StringBuilder
itemCostText
=
new
StringBuilder
();
//所需材料总数
StringBuilder
itemCostText
=
new
StringBuilder
();
//所需材料总数
if
(!
StringUtils
.
isEmpty
(
costItemNums
))
{
if
(!
StringUtils
.
isEmpty
(
costItemNums
))
{
if
(!
Constants
.
NON
.
equals
(
Integer
.
parseInt
(
costItemNums
)
))
{
if
(!
Constants
.
NON
_STR
.
equals
(
costItemNums
))
{
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
//此次批量种植所需要材料
//此次批量种植所需要材料
for
(
ItemDto
item
:
itemDtoList
)
{
for
(
ItemDto
item
:
itemDtoList
)
{
...
@@ -1137,23 +1183,30 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1137,23 +1183,30 @@ public class PlantServiceImpl implements PlantService {
//---------------------------玩家播种日常任务次数累计一次--------------------------
//---------------------------玩家播种日常任务次数累计一次--------------------------
Map
<
Integer
,
Integer
>
dailyTaskCountMap
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getDailyTaskCountMap
();
Map
<
Integer
,
Integer
>
dailyTaskCountMap
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getDailyTaskCountMap
();
if
(!
StringUtils
.
isEmpty
(
dailyTaskCountMap
))
{
if
(!
StringUtils
.
isEmpty
(
dailyTaskCountMap
))
{
dailyTaskCountMap
.
put
(
Constants
.
SEEDING_EVENT
,
dailyTaskCountMap
.
get
(
Constants
.
SEEDING_EVENT
)
+
1
);
if
(!
StringUtils
.
isEmpty
(
dailyTaskCountMap
.
get
(
Constants
.
SEEDING_EVENT
)))
{
dailyTaskCountMap
.
put
(
Constants
.
SEEDING_EVENT
,
dailyTaskCountMap
.
get
(
Constants
.
SEEDING_EVENT
)
+
1
);
}
if
(!
StringUtils
.
isEmpty
(
dailyTaskCountMap
.
get
(
Constants
.
DAILY_TASK_EVENT
)))
{
dailyTaskCountMap
.
put
(
Constants
.
DAILY_TASK_EVENT
,
dailyTaskCountMap
.
get
(
Constants
.
DAILY_TASK_EVENT
)
+
1
);
}
}
}
}
}
//取出背包中的材料
ItemBagDto
materialBag
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
Constants
.
ITEM_TYPE_MATERIAL
);
Map
<
Integer
,
ItemDto
>
materialMap
=
materialBag
.
getItemBag
();
log
.
info
(
"消耗材料前背包的材料:"
+
materialMap
);
//所有花圃种植完后需消耗材料,将背包中对应材料减少数量
//所有花圃种植完后需消耗材料,将背包中对应材料减少数量
//获取植物配置信息中的所需材料
//获取植物配置信息中的所需材料
String
costItemNums
=
plant
.
getCostItemNums
();
String
costItemNums
=
plant
.
getCostItemNums
();
if
(!
StringUtils
.
isEmpty
(
costItemNums
)
&&
!
Constants
.
NON
.
equals
(
Integer
.
parseInt
(
costItemNums
)))
{
log
.
info
(
"种植需要消耗材料:"
+
costItemNums
);
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
if
(!
StringUtils
.
isEmpty
(
costItemNums
))
{
for
(
ItemDto
item
:
itemDtoList
)
{
if
(!
Constants
.
NON_STR
.
equals
(
costItemNums
))
{
ItemDto
material
=
materialMap
.
get
(
item
.
getItemId
());
List
<
ItemDto
>
itemDtoList
=
TypeConvertUtil
.
itemString2List
(
costItemNums
);
material
.
setItemNum
(
material
.
getItemNum
()
-
item
.
getItemNum
()
*
nurseryNumList
.
size
());
for
(
ItemDto
item
:
itemDtoList
)
{
Integer
itemType
=
TimingAcquisition
.
itemConfigMap
.
get
(
item
.
getItemId
()).
getItemTypeId
();
//背包中对应种类的袋子
ItemBagDto
itemBag
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getBackPack
().
getItemBags
().
get
(
itemType
);
//消耗物品
ItemDto
itemPacket
=
itemBag
.
getItems
(
item
.
getItemId
());
itemPacket
.
setItemNum
(
itemPacket
.
getItemNum
()
-
item
.
getItemNum
()
*
nurseryNumList
.
size
());
}
}
}
log
.
info
(
"消耗材料后背包的材料:"
+
materialMap
);
}
}
//背包减少相应果实数量
//背包减少相应果实数量
//从背包中取出对应果实id
//从背包中取出对应果实id
...
@@ -1229,7 +1282,6 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1229,7 +1282,6 @@ public class PlantServiceImpl implements PlantService {
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"batch_seed_cancel"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"batch_seed_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
.
toString
(),
(
plant
==
null
)
?
""
:
plant
.
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumText
.
toString
(),
(
plant
==
null
)
?
""
:
plant
.
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"batch_seed_cancel"
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
101109
);
resultResponse
.
set
反馈
ID
(
101109
);
...
@@ -1256,6 +1308,8 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1256,6 +1308,8 @@ public class PlantServiceImpl implements PlantService {
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已经进行到的步骤
log
.
info
(
uid
+
"开始收获果实"
);
log
.
info
(
uid
+
"开始收获果实"
);
log
.
info
(
uid
+
"玩家的请求信息,植物id:"
+
plantId
+
",花圃编号:"
+
nurseryNum
);
log
.
info
(
uid
+
"玩家的请求信息,植物id:"
+
plantId
+
",花圃编号:"
+
nurseryNum
);
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//清除上轮对话缓存
//清除上轮对话缓存
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
//获取该玩家的所有花圃
//获取该玩家的所有花圃
...
@@ -1300,6 +1354,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1300,6 +1354,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"harvest_fail_plant"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"harvest_fail_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantConfigMap
.
get
(
plantId
).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantConfigMap
.
get
(
plantId
).
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100203
);
resultResponse
.
set
反馈
ID
(
100203
);
...
@@ -1341,6 +1396,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1341,6 +1396,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"harvest_fail_mature"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"harvest_fail_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantConfigMap
.
get
(
plantId
).
getName
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
plantConfigMap
.
get
(
plantId
).
getName
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100202
);
resultResponse
.
set
反馈
ID
(
100202
);
...
@@ -1412,7 +1468,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1412,7 +1468,7 @@ public class PlantServiceImpl implements PlantService {
}
}
//获取玩家所有花圃编号
//获取玩家所有花圃编号
String
nurseryNumText
=
TimingAcquisition
.
getAllNurseryNum
(
uid
);
String
nurseryNumText
=
TimingAcquisition
.
getAllNurseryNum
(
uid
);
//2.仅指定花圃
id
的情况下-“收取花圃的果子”
//2.仅指定花圃
编号
的情况下-“收取花圃的果子”
if
(
StringUtils
.
isEmpty
(
plantId
)
&&
!
StringUtils
.
isEmpty
(
nurseryNum
))
{
if
(
StringUtils
.
isEmpty
(
plantId
)
&&
!
StringUtils
.
isEmpty
(
nurseryNum
))
{
//花圃编号不存在
//花圃编号不存在
if
(
nurseryNum
==
Constants
.
REQ_NON
)
{
if
(
nurseryNum
==
Constants
.
REQ_NON
)
{
...
@@ -1450,6 +1506,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1450,6 +1506,7 @@ public class PlantServiceImpl implements PlantService {
if
(
nurseryInfo
.
getUsable
()
==
Constants
.
NURSERY_UNUSABLE
)
{
if
(
nurseryInfo
.
getUsable
()
==
Constants
.
NURSERY_UNUSABLE
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_usable"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_usable"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100207
);
resultResponse
.
set
反馈
ID
(
100207
);
...
@@ -1463,6 +1520,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1463,6 +1520,7 @@ public class PlantServiceImpl implements PlantService {
if
(
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
)
{
if
(
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100206
);
resultResponse
.
set
反馈
ID
(
100206
);
...
@@ -1489,6 +1547,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1489,6 +1547,7 @@ public class PlantServiceImpl implements PlantService {
if
(
nurseryInfo
.
getStatus
()
!=
Constants
.
PLANT_MATURE
)
{
if
(
nurseryInfo
.
getStatus
()
!=
Constants
.
PLANT_MATURE
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100205
);
resultResponse
.
set
反馈
ID
(
100205
);
...
@@ -1519,11 +1578,12 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1519,11 +1578,12 @@ public class PlantServiceImpl implements PlantService {
if
(
addText
.
length
()
>
0
)
{
if
(
addText
.
length
()
>
0
)
{
addText
.
deleteCharAt
(
addText
.
length
()
-
1
);
addText
.
deleteCharAt
(
addText
.
length
()
-
1
);
feedText
.
append
(
"额外触发收获了"
).
append
(
addText
);
feedText
.
append
(
"额外触发收获了"
).
append
(
addText
);
}
else
{
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
}
}
}
}
}
}
if
(
feedText
.
length
()
!=
0
)
{
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
}
harvestedNurseryMap
.
put
(
nurseryNum
,
nurseryInfo
);
harvestedNurseryMap
.
put
(
nurseryNum
,
nurseryInfo
);
log
.
info
(
"收获:"
+
feedText
);
log
.
info
(
"收获:"
+
feedText
);
//---------------------------更新玩家数据--------------------------
//---------------------------更新玩家数据--------------------------
...
@@ -1532,6 +1592,11 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1532,6 +1592,11 @@ public class PlantServiceImpl implements PlantService {
TaskResultDto
updateTaskResult
=
TimingAcquisition
.
checkUpdateTask
(
uid
,
Constants
.
HARVEST_EVENT
);
TaskResultDto
updateTaskResult
=
TimingAcquisition
.
checkUpdateTask
(
uid
,
Constants
.
HARVEST_EVENT
);
//------------------------日常任务事件[收获]是否完成------------------------
//------------------------日常任务事件[收获]是否完成------------------------
TaskResultDto
dailyTaskResult
=
TimingAcquisition
.
checkDailyTask
(
uid
,
Constants
.
HARVEST_EVENT
);
TaskResultDto
dailyTaskResult
=
TimingAcquisition
.
checkDailyTask
(
uid
,
Constants
.
HARVEST_EVENT
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"harvest_with_num_success"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"harvest_with_num_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
feedText
.
toString
());
...
@@ -1599,16 +1664,17 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1599,16 +1664,17 @@ public class PlantServiceImpl implements PlantService {
ItemDto
itemDto
=
nurseryInfo
.
getHarvestFruit
();
ItemDto
itemDto
=
nurseryInfo
.
getHarvestFruit
();
feedText
.
append
(
itemDto
.
getItemNum
()).
append
(
"个"
).
append
(
itemConfigMap
.
get
(
itemDto
.
getItemId
()).
getName
());
feedText
.
append
(
itemDto
.
getItemNum
()).
append
(
"个"
).
append
(
itemConfigMap
.
get
(
itemDto
.
getItemId
()).
getName
());
List
<
ItemDto
>
dropItems
=
nurseryInfo
.
getDropItems
();
List
<
ItemDto
>
dropItems
=
nurseryInfo
.
getDropItems
();
if
(!
StringUtils
.
isEmpty
(
dropItems
)
&&
dropItems
.
size
()
!=
0
)
{
if
(!
StringUtils
.
isEmpty
(
dropItems
))
{
feedText
.
append
(
","
).
append
(
"额外收获了"
);
if
(
dropItems
.
size
()
!=
0
){
for
(
ItemDto
item
:
dropItems
)
{
feedText
.
append
(
","
).
append
(
"额外收获了"
);
if
(
item
.
getItemNum
()
!=
0
)
{
for
(
ItemDto
item
:
dropItems
)
{
feedText
.
append
(
item
.
getItemNum
()).
append
(
"个"
).
append
(
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
()).
append
(
"、"
);
if
(
item
.
getItemNum
()
!=
0
)
{
feedText
.
append
(
item
.
getItemNum
()).
append
(
"个"
).
append
(
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
()).
append
(
"、"
);
}
}
}
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
}
}
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
}
}
feedText
.
append
(
"。"
);
//收集所有果实
//收集所有果实
fruitList
.
add
(
nurseryInfo
.
getHarvestFruit
());
fruitList
.
add
(
nurseryInfo
.
getHarvestFruit
());
//收集所有掉落物品
//收集所有掉落物品
...
@@ -1618,13 +1684,11 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1618,13 +1684,11 @@ public class PlantServiceImpl implements PlantService {
harvestedNurseryMap
.
put
(
entry
.
getKey
(),
nurseryInfo
);
harvestedNurseryMap
.
put
(
entry
.
getKey
(),
nurseryInfo
);
}
}
}
}
if
(
feedText
.
length
()
!=
0
)
{
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
}
//所有花圃均未种植
//所有花圃均未种植
if
(
count
==
nurseryInfoMap
.
size
())
{
if
(
count
==
nurseryInfoMap
.
size
())
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant_all"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant_all"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100210
);
resultResponse
.
set
反馈
ID
(
100210
);
...
@@ -1637,6 +1701,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1637,6 +1701,7 @@ public class PlantServiceImpl implements PlantService {
if
(
fruitList
.
size
()
==
0
)
{
if
(
fruitList
.
size
()
==
0
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature_all"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature_all"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100209
);
resultResponse
.
set
反馈
ID
(
100209
);
...
@@ -1677,7 +1742,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1677,7 +1742,7 @@ public class PlantServiceImpl implements PlantService {
}
}
//-------------------新手引导的获得宠物任务完成。累计宠物数量达到6只----------
//-------------------新手引导的获得宠物任务完成。累计宠物数量达到6只----------
int
petNum
=
TimingAcquisition
.
getPetNum
(
uid
);
int
petNum
=
TimingAcquisition
.
getPetNum
(
uid
);
if
(
petNum
=
=
6
&&
"完成10021"
.
equals
(
noviceGuide
))
{
if
(
petNum
>
=
6
&&
"完成10021"
.
equals
(
noviceGuide
))
{
log
.
info
(
uid
+
"完成任务1002"
);
log
.
info
(
uid
+
"完成任务1002"
);
resultResponse
.
set
任务完成
(
"10022"
);
resultResponse
.
set
任务完成
(
"10022"
);
}
}
...
@@ -1698,6 +1763,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1698,6 +1763,7 @@ public class PlantServiceImpl implements PlantService {
if
(
nurseryInfo
.
getUsable
()
==
Constants
.
NURSERY_UNUSABLE
)
{
if
(
nurseryInfo
.
getUsable
()
==
Constants
.
NURSERY_UNUSABLE
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_usable"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_usable"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100207
);
resultResponse
.
set
反馈
ID
(
100207
);
...
@@ -1712,6 +1778,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1712,6 +1778,7 @@ public class PlantServiceImpl implements PlantService {
if
(
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
)
{
if
(
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100206
);
resultResponse
.
set
反馈
ID
(
100206
);
...
@@ -1725,6 +1792,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1725,6 +1792,7 @@ public class PlantServiceImpl implements PlantService {
if
(!
plantId
.
equals
(
nurseryInfo
.
getPlantId
()))
{
if
(!
plantId
.
equals
(
nurseryInfo
.
getPlantId
()))
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100203
);
resultResponse
.
set
反馈
ID
(
100203
);
...
@@ -1750,6 +1818,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1750,6 +1818,7 @@ public class PlantServiceImpl implements PlantService {
if
(
nurseryInfo
.
getStatus
()
!=
Constants
.
PLANT_MATURE
)
{
if
(
nurseryInfo
.
getStatus
()
!=
Constants
.
PLANT_MATURE
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100205
);
resultResponse
.
set
反馈
ID
(
100205
);
...
@@ -1763,16 +1832,18 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1763,16 +1832,18 @@ public class PlantServiceImpl implements PlantService {
fruitList
.
add
(
nurseryInfo
.
getHarvestFruit
());
fruitList
.
add
(
nurseryInfo
.
getHarvestFruit
());
StringBuilder
feedText
=
new
StringBuilder
();
StringBuilder
feedText
=
new
StringBuilder
();
feedText
.
append
(
nurseryInfo
.
getHarvestFruit
().
getItemNum
()).
feedText
.
append
(
nurseryInfo
.
getHarvestFruit
().
getItemNum
()).
append
(
"个"
).
append
(
itemConfigMap
.
get
(
nurseryInfo
.
getHarvestFruit
().
getItemId
()).
getName
())
.
append
(
","
)
;
append
(
"个"
).
append
(
itemConfigMap
.
get
(
nurseryInfo
.
getHarvestFruit
().
getItemId
()).
getName
());
List
<
ItemDto
>
dropItems
=
nurseryInfo
.
getDropItems
();
List
<
ItemDto
>
dropItems
=
nurseryInfo
.
getDropItems
();
if
(!
StringUtils
.
isEmpty
(
dropItems
))
{
if
(!
StringUtils
.
isEmpty
(
dropItems
))
{
feedText
.
append
(
"额外触发收获了"
);
if
(
dropItems
.
size
()
!=
0
)
{
for
(
ItemDto
item
:
dropItems
)
{
feedText
.
append
(
",额外触发收获了"
);
if
(
item
.
getItemNum
()
!=
0
)
{
for
(
ItemDto
item
:
dropItems
)
{
feedText
.
append
(
item
.
getItemNum
()).
append
(
"个"
).
append
(
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
()).
append
(
"、"
);
if
(
item
.
getItemNum
()
!=
0
)
{
feedText
.
append
(
item
.
getItemNum
()).
append
(
"个"
).
append
(
itemConfigMap
.
get
(
item
.
getItemId
()).
getName
()).
append
(
"、"
);
}
}
}
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
}
}
feedText
.
deleteCharAt
(
feedText
.
length
()
-
1
);
}
}
log
.
info
(
"收获:"
+
feedText
);
log
.
info
(
"收获:"
+
feedText
);
harvestedNurseryMap
.
put
(
nurseryNum
,
nurseryInfo
);
harvestedNurseryMap
.
put
(
nurseryNum
,
nurseryInfo
);
...
@@ -1831,13 +1902,18 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1831,13 +1902,18 @@ public class PlantServiceImpl implements PlantService {
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
log
.
info
(
uid
+
"开始检查待铲除花圃种植情况"
);
log
.
info
(
uid
+
"开始检查待铲除花圃种植情况"
);
log
.
info
(
uid
+
"玩家请求信息, 花圃编号:"
+
nurseryNum
);
log
.
info
(
uid
+
"玩家请求信息, 花圃编号:"
+
nurseryNum
);
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//没有提供花圃编号
//没有提供花圃编号
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
if
(
StringUtils
.
isEmpty
(
nurseryNum
))
{
log
.
info
(
uid
+
"玩家没提供花圃编号"
);
log
.
info
(
uid
+
"玩家没提供花圃编号"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_no_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_no_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100506
);
resultResponse
.
set
反馈
ID
(
100506
);
...
@@ -1885,6 +1961,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1885,6 +1961,7 @@ public class PlantServiceImpl implements PlantService {
if
(
StringUtils
.
isEmpty
(
nurseryInfo
.
getPlantId
())
||
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
)
{
if
(
StringUtils
.
isEmpty
(
nurseryInfo
.
getPlantId
())
||
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_plant"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100502
);
resultResponse
.
set
反馈
ID
(
100502
);
...
@@ -1903,7 +1980,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1903,7 +1980,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"clear_plant_check"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"clear_plant_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
clearCost
.
getValue
(),
nurseryNum
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
clearCost
.
getValue
(),
nurseryNum
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_check"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_check"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100501
);
resultResponse
.
set
反馈
ID
(
100501
);
...
@@ -1938,6 +2015,8 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1938,6 +2015,8 @@ public class PlantServiceImpl implements PlantService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
log
.
info
(
uid
+
"开始铲除植物"
);
log
.
info
(
uid
+
"开始铲除植物"
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//当前玩家上一轮的请求信息
//当前玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -1959,6 +2038,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1959,6 +2038,7 @@ public class PlantServiceImpl implements PlantService {
if
(
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
)
{
if
(
nurseryInfo
.
getStatus
()
==
Constants
.
PLANT_NO
)
{
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_plant"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100505
);
resultResponse
.
set
反馈
ID
(
100505
);
...
@@ -1983,6 +2063,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -1983,6 +2063,7 @@ public class PlantServiceImpl implements PlantService {
if
(
money
<
Integer
.
parseInt
(
clearCost
.
getValue
()))
{
//背包的货币不够
if
(
money
<
Integer
.
parseInt
(
clearCost
.
getValue
()))
{
//背包的货币不够
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_money"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_money"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
).
getName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100507
);
resultResponse
.
set
反馈
ID
(
100507
);
...
@@ -2004,11 +2085,16 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2004,11 +2085,16 @@ public class PlantServiceImpl implements PlantService {
log
.
info
(
uid
+
"玩家的花圃"
+
nurseryConfig
.
getName
()
+
"已经变为空地"
);
log
.
info
(
uid
+
"玩家的花圃"
+
nurseryConfig
.
getName
()
+
"已经变为空地"
);
log
.
info
(
uid
+
"玩家的"
+
nurseryConfig
.
getName
()
+
"信息:"
+
nurseryInfo
);
log
.
info
(
uid
+
"玩家的"
+
nurseryConfig
.
getName
()
+
"信息:"
+
nurseryInfo
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"clear_plant_success"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"clear_plant_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_success"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
...
@@ -2031,6 +2117,10 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2031,6 +2117,10 @@ public class PlantServiceImpl implements PlantService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已进行到的步骤
String
noviceGuide
=
operationReq
.
getNoviceGuide
();
//新手引导已进行到的步骤
log
.
info
(
uid
+
"开始收取花圃的果实后铲除植物"
);
log
.
info
(
uid
+
"开始收取花圃的果实后铲除植物"
);
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//出去玩家上一轮的请求信息
//出去玩家上一轮的请求信息
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
OperationRequest
lastReq
=
(
OperationRequest
)
CacheUtil
.
get
(
uid
);
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
if
(
StringUtils
.
isEmpty
(
lastReq
))
{
...
@@ -2055,6 +2145,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2055,6 +2145,7 @@ public class PlantServiceImpl implements PlantService {
log
.
info
(
nurseryConfigMap
.
get
(
nurseryId
).
getName
()
+
"现在是空地"
);
log
.
info
(
nurseryConfigMap
.
get
(
nurseryId
).
getName
()
+
"现在是空地"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_plant"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_plant"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100504
);
resultResponse
.
set
反馈
ID
(
100504
);
...
@@ -2070,6 +2161,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2070,6 +2161,7 @@ public class PlantServiceImpl implements PlantService {
log
.
info
(
nurseryConfigMap
.
get
(
nurseryId
).
getName
()
+
"的植物尚未成熟,请稍后收取"
);
log
.
info
(
nurseryConfigMap
.
get
(
nurseryId
).
getName
()
+
"的植物尚未成熟,请稍后收取"
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature_nursery"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"harvest_fail_mature_nursery"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100508
);
resultResponse
.
set
反馈
ID
(
100508
);
...
@@ -2102,8 +2194,11 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2102,8 +2194,11 @@ public class PlantServiceImpl implements PlantService {
//玩家货币不够,铲除植物失败
//玩家货币不够,铲除植物失败
if
(
result
==
0
)
{
if
(
result
==
0
)
{
feedText
.
append
(
",背包中的货币不够,铲除植物失败"
);
feedText
.
append
(
",背包中的货币不够,铲除植物失败"
);
//货币id
Integer
moneyId
=
Integer
.
parseInt
(
TimingAcquisition
.
systemConfigMap
.
get
(
"money"
).
getValue
());
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_money"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_fail_money"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
(),
TimingAcquisition
.
itemConfigMap
.
get
(
moneyId
).
getName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100507
);
resultResponse
.
set
反馈
ID
(
100507
);
...
@@ -2114,10 +2209,16 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2114,10 +2209,16 @@ public class PlantServiceImpl implements PlantService {
}
}
//清除缓存,本轮对话结束
//清除缓存,本轮对话结束
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
CacheGlobal
.
concurrentMap
.
remove
(
uid
);
//---------------------持久化该园丁信息--------------------------
Map
<
String
,
GardenerDto
>
gardenerMap
=
new
ConcurrentHashMap
<>();
gardenerMap
.
put
(
uid
,
TimingAcquisition
.
gardenerMap
.
get
(
uid
));
String
gardener
=
JSON
.
toJSONString
(
gardenerMap
);
PersistenceUtil
.
saveDataToFile
(
uid
,
gardener
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"harvest_success"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"harvest_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
feedText
.
toString
());
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_after_harvest"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_after_harvest"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
//新手引导第一次收取果实任务完成
//新手引导第一次收取果实任务完成
Integer
harvestTimes
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getTaskCountMap
().
get
(
Constants
.
HARVEST_EVENT
);
Integer
harvestTimes
=
TimingAcquisition
.
gardenerMap
.
get
(
uid
).
getTaskCountMap
().
get
(
Constants
.
HARVEST_EVENT
);
if
(
harvestTimes
>=
1
&&
"完成10005"
.
equals
(
noviceGuide
))
{
if
(
harvestTimes
>=
1
&&
"完成10005"
.
equals
(
noviceGuide
))
{
...
@@ -2128,7 +2229,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2128,7 +2229,7 @@ public class PlantServiceImpl implements PlantService {
}
}
//-------------------新手引导的获得宠物任务完成。累计宠物数量达到6只----------
//-------------------新手引导的获得宠物任务完成。累计宠物数量达到6只----------
int
petNum
=
TimingAcquisition
.
getPetNum
(
uid
);
int
petNum
=
TimingAcquisition
.
getPetNum
(
uid
);
if
(
petNum
=
=
6
&&
"完成10021"
.
equals
(
noviceGuide
))
{
if
(
petNum
>
=
6
&&
"完成10021"
.
equals
(
noviceGuide
))
{
resultResponse
.
set
任务完成
(
"10022"
);
resultResponse
.
set
任务完成
(
"10022"
);
}
}
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
...
@@ -2164,9 +2265,12 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2164,9 +2265,12 @@ public class PlantServiceImpl implements PlantService {
}
}
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//获取对应话术
//获取对应话术
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"clear_plant_cancel"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"clear_plant_cancel"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_cancel"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"clear_plant_cancel"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100509
);
resultResponse
.
set
反馈
ID
(
100509
);
...
@@ -2185,8 +2289,12 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2185,8 +2289,12 @@ public class PlantServiceImpl implements PlantService {
String
uid
=
operationReq
.
getUid
();
String
uid
=
operationReq
.
getUid
();
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
//花圃编号
Integer
nurseryNum
=
operationReq
.
getNurseryNum
();
//花圃编号
Integer
plantId
=
operationReq
.
getPlantId
();
//植物名称
Integer
plantId
=
operationReq
.
getPlantId
();
//植物名称
//玩家本地操作,清除bot在别人家的标识
resultResponse
.
set
玩家当前位置
(
""
);
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家目前的所有花圃
//玩家目前的所有花圃
String
nurseryText
=
TimingAcquisition
.
getAllNurseryNum
(
uid
);
String
nurseryText
=
TimingAcquisition
.
getAllNurseryNum
(
uid
);
//--------------------玩家未提供花圃编号-------------------
//--------------------玩家未提供花圃编号-------------------
...
@@ -2195,6 +2303,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2195,6 +2303,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_fail_no_num"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_fail_no_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryText
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryText
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_fail_no_num"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_fail_no_num"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
101204
);
resultResponse
.
set
反馈
ID
(
101204
);
...
@@ -2206,6 +2315,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2206,6 +2315,7 @@ public class PlantServiceImpl implements PlantService {
}
}
//--------------------提供了花圃编号--------------------
//--------------------提供了花圃编号--------------------
if
(!
StringUtils
.
isEmpty
(
nurseryNum
)
&&
StringUtils
.
isEmpty
(
plantId
))
{
if
(!
StringUtils
.
isEmpty
(
nurseryNum
)
&&
StringUtils
.
isEmpty
(
plantId
))
{
resultResponse
.
set
后台附加返回
(
"查看植物成熟时间回复3"
);
if
(
nurseryNum
==
Constants
.
REQ_NON
)
{
if
(
nurseryNum
==
Constants
.
REQ_NON
)
{
log
.
info
(
uid
+
"提供的花圃编号不存在"
);
log
.
info
(
uid
+
"提供的花圃编号不存在"
);
//获取对应话术
//获取对应话术
...
@@ -2313,6 +2423,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2313,6 +2423,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_success"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
plantName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
plantName
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_success"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
101202
);
resultResponse
.
set
反馈
ID
(
101202
);
...
@@ -2327,6 +2438,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2327,6 +2438,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_fail_no_mature"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_fail_no_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
plantName
,
subTime
,
DateUtil
.
changeForm
(
nurseryInfo
.
getPlantTime
().
getMatureTime
()));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
plantName
,
subTime
,
DateUtil
.
changeForm
(
nurseryInfo
.
getPlantTime
().
getMatureTime
()));
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_fail_no_mature"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_fail_no_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100201
);
resultResponse
.
set
反馈
ID
(
100201
);
...
@@ -2388,6 +2500,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2388,6 +2500,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_success"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumList
.
get
(
0
).
toString
(),
plantName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumList
.
get
(
0
).
toString
(),
plantName
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_success"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
101202
);
resultResponse
.
set
反馈
ID
(
101202
);
...
@@ -2402,10 +2515,12 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2402,10 +2515,12 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_fail_no_mature"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_fail_no_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumList
.
get
(
0
).
toString
(),
plantName
,
subTime
,
DateUtil
.
changeForm
(
nurseryInfo
.
getPlantTime
().
getMatureTime
()));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNumList
.
get
(
0
).
toString
(),
plantName
,
subTime
,
DateUtil
.
changeForm
(
nurseryInfo
.
getPlantTime
().
getMatureTime
()));
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_fail_no_mature"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_fail_no_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100201
);
resultResponse
.
set
反馈
ID
(
100201
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
反馈文本
(
text
);
resultResponse
.
set
后台附加返回
(
"查看植物成熟时间回复3"
);
resultVarsResponse
.
setVars
(
resultResponse
);
resultVarsResponse
.
setVars
(
resultResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
commonResponse
.
setData
(
resultVarsResponse
);
return
commonResponse
;
return
commonResponse
;
...
@@ -2500,6 +2615,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2500,6 +2615,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_success"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
plantName
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
plantName
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_success"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_success"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
101202
);
resultResponse
.
set
反馈
ID
(
101202
);
...
@@ -2530,6 +2646,7 @@ public class PlantServiceImpl implements PlantService {
...
@@ -2530,6 +2646,7 @@ public class PlantServiceImpl implements PlantService {
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_fail_no_mature"
);
String
text
=
SpeechUtil
.
getPlantSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_plant_mature_time_fail_no_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
plantName
,
subTime
,
DateUtil
.
changeForm
(
nurseryInfo
.
getPlantTime
().
getMatureTime
()));
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
nurseryNum
.
toString
(),
plantName
,
subTime
,
DateUtil
.
changeForm
(
nurseryInfo
.
getPlantTime
().
getMatureTime
()));
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_fail_no_mature"
);
text
+=
SpeechUtil
.
getPlantSpeech
(
gender
,
"check_plant_mature_time_fail_no_mature"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
100201
);
resultResponse
.
set
反馈
ID
(
100201
);
...
...
src/main/java/com/qiwuai/garden/service/socialService/impl/SocialServiceImpl.java
View file @
290107a1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/java/com/qiwuai/garden/service/taskService/impl/TaskServiceImpl.java
View file @
290107a1
...
@@ -11,6 +11,7 @@ import com.qiwuai.garden.dto.base.CommonResponse;
...
@@ -11,6 +11,7 @@ import com.qiwuai.garden.dto.base.CommonResponse;
import
com.qiwuai.garden.dto.base.ResultResponse
;
import
com.qiwuai.garden.dto.base.ResultResponse
;
import
com.qiwuai.garden.dto.base.ResultVarsResponse
;
import
com.qiwuai.garden.dto.base.ResultVarsResponse
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.dto.request.OperationRequest
;
import
com.qiwuai.garden.pojo.CallNamePojo
;
import
com.qiwuai.garden.pojo.TaskPojo
;
import
com.qiwuai.garden.pojo.TaskPojo
;
import
com.qiwuai.garden.pojo.TaskTypePojo
;
import
com.qiwuai.garden.pojo.TaskTypePojo
;
import
com.qiwuai.garden.service.taskService.TaskService
;
import
com.qiwuai.garden.service.taskService.TaskService
;
...
@@ -40,6 +41,8 @@ public class TaskServiceImpl implements TaskService {
...
@@ -40,6 +41,8 @@ public class TaskServiceImpl implements TaskService {
Integer
taskTypeId
=
operationReq
.
getTaskType
();
//任务类型id
Integer
taskTypeId
=
operationReq
.
getTaskType
();
//任务类型id
//园丁性别
//园丁性别
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
String
gender
=
TimingAcquisition
.
getGardenerGender
(
uid
);
//玩家称呼
CallNamePojo
callName
=
TimingAcquisition
.
getCallNameByUid
(
uid
);
//玩家未提供任务类型
//玩家未提供任务类型
if
(
StringUtils
.
isEmpty
(
taskTypeId
))
{
if
(
StringUtils
.
isEmpty
(
taskTypeId
))
{
StringBuilder
typeText
=
new
StringBuilder
();
StringBuilder
typeText
=
new
StringBuilder
();
...
@@ -52,6 +55,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -52,6 +55,7 @@ public class TaskServiceImpl implements TaskService {
String
text
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_task_fail_no_name"
);
String
text
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_task_fail_no_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
typeText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
typeText
.
toString
());
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_task_fail_no_name"
);
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_task_fail_no_name"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
600105
);
resultResponse
.
set
反馈
ID
(
600105
);
...
@@ -96,6 +100,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -96,6 +100,7 @@ public class TaskServiceImpl implements TaskService {
String
text
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_update_task_status_unfinished"
);
String
text
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_update_task_status_unfinished"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
level
+
1
),
taskText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
String
.
valueOf
(
level
+
1
),
taskText
.
toString
());
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_update_task_status_unfinished"
);
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_update_task_status_unfinished"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
600101
);
resultResponse
.
set
反馈
ID
(
600101
);
...
@@ -107,6 +112,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -107,6 +112,7 @@ public class TaskServiceImpl implements TaskService {
//1.2 升级任务已完成
//1.2 升级任务已完成
String
text
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_update_task_status_finished"
);
String
text
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_update_task_status_finished"
);
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_update_task_status_finished"
);
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_update_task_status_finished"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
600102
);
resultResponse
.
set
反馈
ID
(
600102
);
...
@@ -172,6 +178,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -172,6 +178,7 @@ public class TaskServiceImpl implements TaskService {
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
taskName
.
toString
(),
taskText
.
toString
());
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
taskName
.
toString
(),
taskText
.
toString
());
}
}
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_update_task_status_unfinished"
);
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_update_task_status_unfinished"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
600103
);
resultResponse
.
set
反馈
ID
(
600103
);
...
@@ -183,6 +190,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -183,6 +190,7 @@ public class TaskServiceImpl implements TaskService {
//2.2 所有日常任务已完成
//2.2 所有日常任务已完成
String
text
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_daily_task_status_finished"
);
String
text
=
SpeechUtil
.
getTaskSpeech
(
Constants
.
SPEECH_ASIDE
,
"check_daily_task_status_finished"
);
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_daily_task_status_finished"
);
text
+=
SpeechUtil
.
getTaskSpeech
(
gender
,
"check_daily_task_status_finished"
);
text
=
SpeechUtil
.
speechReplaceNum
(
text
,
callName
.
getName
(),
callName
.
getSubName
());
commonResponse
.
setCode
(
1
);
commonResponse
.
setCode
(
1
);
commonResponse
.
setMsg
(
"成功"
);
commonResponse
.
setMsg
(
"成功"
);
resultResponse
.
set
反馈
ID
(
600104
);
resultResponse
.
set
反馈
ID
(
600104
);
...
...
src/main/resources/application-uat.yml
View file @
290107a1
...
@@ -66,4 +66,4 @@ reportFilePath: /home/secretGarden/report/
...
@@ -66,4 +66,4 @@ reportFilePath: /home/secretGarden/report/
#动态词组更新秘钥
#动态词组更新秘钥
appSecret
:
nnPGsrbMriXdrRNISQeb
appSecret
:
nnPGsrbMriXdrRNISQeb
#动态词组更新链接
#动态词组更新链接
updatePhraseUrl
:
http://hw-gz25.heyqiwu.cn:8082/out/phrase
updatePhraseUrl
:
http://hw-gz24.heyqiwu.cn:8082/out/phrase
\ No newline at end of file
\ No newline at end of file
src/main/resources/application.yml
View file @
290107a1
spring
:
spring
:
profiles
:
profiles
:
active
:
dev
active
:
uat
\ No newline at end of file
\ No newline at end of file
src/main/resources/com/qiwuai/garden/dao/ItemMapper.xml
View file @
290107a1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<select
id=
"searchAll"
resultType=
"com.qiwuai.garden.pojo.ItemPojo"
>
<select
id=
"searchAll"
resultType=
"com.qiwuai.garden.pojo.ItemPojo"
>
select
select
id, name, description, item_type_id, price, usable, salable, attribute_id, create_time, update_time
id, name,
alias,
description, item_type_id, price, usable, salable, attribute_id, create_time, update_time
from
from
item
item
</select>
</select>
...
...
src/main/resources/com/qiwuai/garden/dao/PetMapper.xml
View file @
290107a1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<select
id=
"findAll"
resultType=
"com.qiwuai.garden.pojo.PetPojo"
>
<select
id=
"findAll"
resultType=
"com.qiwuai.garden.pojo.PetPojo"
>
select
select
id, name, type_id, description, rarity_id, favorite_plant_id, appear_prob, attribute_ids,
id, name,
alias,
type_id, description, rarity_id, favorite_plant_id, appear_prob, attribute_ids,
hp, fc, drop_items, drop_nums, drop_probs, add_item_set_id, feed_cost, level, price, create_time, update_time
hp, fc, drop_items, drop_nums, drop_probs, add_item_set_id, feed_cost, level, price, create_time, update_time
from
from
pet
pet
...
...
src/main/resources/com/qiwuai/garden/dao/PlantMapper.xml
View file @
290107a1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.qiwuai.garden.dao.PlantMapper"
>
<mapper
namespace=
"com.qiwuai.garden.dao.PlantMapper"
>
<sql
id=
"plant"
>
<sql
id=
"plant"
>
id, name, description, plant_type_id, attribute_id,
id, name,
alias,
description, plant_type_id, attribute_id,
occupy_area, nursery_level, nursery_id, gardener_level, gardener_skill_id,
occupy_area, nursery_level, nursery_id, gardener_level, gardener_skill_id,
near_plant_ids, pet_id, cost_item_nums, fruit_id, fruit_num, fruit_seed_num,
near_plant_ids, pet_id, cost_item_nums, fruit_id, fruit_num, fruit_seed_num,
fruit_times, fruit_mature_time, drop_items, drop_nums, drop_probs, add_item_set_id, rarity_id, price,
fruit_times, fruit_mature_time, drop_items, drop_nums, drop_probs, add_item_set_id, rarity_id, price,
...
...
src/main/resources/speech/gardener.yaml
View file @
290107a1
...
@@ -4,12 +4,8 @@ aside:
...
@@ -4,12 +4,8 @@ aside:
enter_game
:
enter_game
:
-
【旁白@正常】欢迎进入追梦花园。
-
【旁白@正常】欢迎进入追梦花园。
#更改称呼
#更改称呼
gardener_call_name_change_fail_null
:
-
【旁白@正常】你还未提供称呼,暂时无法更改。
gardener_call_name_change_fail_not_exist
:
gardener_call_name_change_fail_not_exist
:
-
【旁白@正常】没有你提供的称呼,暂时无法更改。
-
【旁白@正常】没有你提供的称呼,目前有【1】。
gardener_call_name_change_success
:
-
【旁白@正常】好的【1】,欢迎【2】来到秘密花园。现在我来帮【2】熟悉一下这里吧。
#园丁升级
#园丁升级
gardener_level_check
:
gardener_level_check
:
-
【旁白@正常】园丁目前的等级为【1】级。
-
【旁白@正常】园丁目前的等级为【1】级。
...
@@ -61,13 +57,19 @@ aside:
...
@@ -61,13 +57,19 @@ aside:
-
【旁白@正常】已重置过技能,无需重置。
-
【旁白@正常】已重置过技能,无需重置。
reset_skill_fail_level
:
reset_skill_fail_level
:
-
【旁白@正常】等级1没有技能,无需重置。
-
【旁白@正常】等级1没有技能,无需重置。
reset_skill_fail_null
:
-
【旁白@正常】你还没有学习技能,无需重置。
reset_skill_cancel
:
reset_skill_cancel
:
-
【旁白@正常】已取消重置技能。
-
【旁白@正常】已取消重置技能。
#园丁更名
#园丁更名
rename_fail_no_name
:
-
【旁白@正常】你将为园丁更名,现在园丁的名字是“【1】”,接下来所说内容会作为园丁名称,请仅说园丁的名字,限定【2】到【3】个字。如果不需要请说“取消操作”。
rename_fail_over
:
-
【旁白@正常】字数不对,请你仅说园丁的名字,限定【1】到【2】个字。如果不需要请说“取消操作”。
rename_check_first_free
:
rename_check_first_free
:
-
【旁白@正常】你要为园丁更名?首次可以免费修改。
-
【旁白@正常】你要为园丁更名
成“【1】”
?首次可以免费修改。
rename_check
:
rename_check
:
-
【旁白@正常】你要为园丁更名
?需要花费【1
】。
-
【旁白@正常】你要为园丁更名
“【1】”?需要花费【2
】。
rename_success
:
rename_success
:
-
【旁白@正常】更名成功。
-
【旁白@正常】更名成功。
rename_fail
:
rename_fail
:
...
@@ -78,7 +80,7 @@ aside:
...
@@ -78,7 +80,7 @@ aside:
-
【旁白@正常】已取消更名。
-
【旁白@正常】已取消更名。
#查看背包
#查看背包
view_back_pack
:
view_back_pack
:
-
【旁白@正常】目前背包里有物品类共【1】种,拥有【2】,
物种丰富,
是否要查看特定种类的详情?
-
【旁白@正常】目前背包里有物品类共【1】种,拥有【2】,是否要查看特定种类的详情?
view_back_pack_fail_none
:
view_back_pack_fail_none
:
-
【旁白@正常】目前背包空空如也。
-
【旁白@正常】目前背包空空如也。
view_back_pack_item
:
view_back_pack_item
:
...
@@ -105,182 +107,192 @@ aside:
...
@@ -105,182 +107,192 @@ aside:
man
:
man
:
#更改称呼
gardener_call_name_change_fail_null
:
-
【男园丁@正常】我叫【3】,【1】希望我怎么称呼【2】呢?【4】?
gardener_call_name_change_success
:
-
【男园丁@正常】好的【1】,【2】的称呼已经修改成功了。
#园丁升级
#园丁升级
gardener_upgrade_check
:
gardener_upgrade_check
:
-
【男园丁@正常】
主人
,升级才能让我变得更强大,我想要升级!
-
【男园丁@正常】
【1】
,升级才能让我变得更强大,我想要升级!
-
【男园丁@正常】让我升级吧
主人
!
-
【男园丁@正常】让我升级吧
【1】
!
-
【男园丁@正常】我想升级很久了!
-
【男园丁@正常】我想升级很久了!
gardener_upgrade_success
:
gardener_upgrade_success
:
-
【男园丁@正常】谢谢
主人,我升级成功了!可以更好的帮助主人
管理花园了!
-
【男园丁@正常】谢谢
【1】,我升级成功了!可以更好的帮助【1】
管理花园了!
gardener_upgrade_fail
:
gardener_upgrade_fail
:
-
【男园丁@正常】很抱歉
主人
,我这次升级失败了……
-
【男园丁@正常】很抱歉
【1】
,我这次升级失败了……
gardener_upgrade_fail_had
:
gardener_upgrade_fail_had
:
-
【男园丁@正常】谢谢
主人
,满级了。
-
【男园丁@正常】谢谢
【1】
,满级了。
gardener_upgrade_fail_task
:
gardener_upgrade_fail_task
:
-
【男园丁@正常】
主人
升级不了的话,要了解一下任务详情吗?
-
【男园丁@正常】
【1】
升级不了的话,要了解一下任务详情吗?
gardener_upgrade_cancel
:
gardener_upgrade_cancel
:
-
【男园丁@正常】
主人
有机会下次在帮我升级吧。
-
【男园丁@正常】
【1】
有机会下次在帮我升级吧。
#学习技能
#学习技能
learn_skill_check
:
learn_skill_check
:
-
【男园丁@正常】听
主人
安排。
-
【男园丁@正常】听
【1】
安排。
learn_skill_success
:
learn_skill_success
:
-
【男园丁@正常】谢谢
主人让我变得更强大,我又可以更好的帮主人
管理花园了!
-
【男园丁@正常】谢谢
【1】让我变得更强大,我又可以更好的帮【1】
管理花园了!
learn_skill_fail_had
:
learn_skill_fail_had
:
-
【男园丁@正常】
主人
,我之前学过这个技能了。
-
【男园丁@正常】
【1】
,我之前学过这个技能了。
learn_skill_fail_no_skill
:
learn_skill_fail_no_skill
:
-
【男园丁@正常】
主人
还没有告诉我学习哪个技能呢?
-
【男园丁@正常】
【1】
还没有告诉我学习哪个技能呢?
learn_skill_fail_no_exist
:
learn_skill_fail_no_exist
:
-
【男园丁@正常】
主人
,你要不再想一下。
-
【男园丁@正常】
【1】
,你要不再想一下。
learn_skill_fail_not_allow
:
learn_skill_fail_not_allow
:
-
【男园丁@正常】
主人
,我们还不允许学习这个技能,换一个吧。
-
【男园丁@正常】
【1】
,我们还不允许学习这个技能,换一个吧。
learn_skill_cancel
:
learn_skill_cancel
:
-
【男园丁@正常】我都可以,
主人
想选什么?
-
【男园丁@正常】我都可以,
【1】
想选什么?
#重置技能
#重置技能
reset_skill_check
:
reset_skill_check
:
-
【男园丁@正常】
主人你
确定要这么做吗?
-
【男园丁@正常】
【1】【2】
确定要这么做吗?
-
【男园丁@正常】
主人你
想好了吗?
-
【男园丁@正常】
【1】【2】
想好了吗?
-
【男园丁@正常】我们真的要重置技能吗?
-
【男园丁@正常】我们真的要重置技能吗?
reset_skill_success
:
reset_skill_success
:
-
【男园丁@正常】我可以学习新的技能了
主人
!
-
【男园丁@正常】我可以学习新的技能了
【1】
!
reset_skill_fail_money
:
reset_skill_fail_money
:
-
【男园丁@正常】
主人我们去收集一些【1
】再来吧……
-
【男园丁@正常】
【1】我们去收集一些【3
】再来吧……
reset_skill_fail_had
:
reset_skill_fail_had
:
-
【男园丁@正常】是的,
主人你
之前已经重置过了。
-
【男园丁@正常】是的,
【1】【2】
之前已经重置过了。
reset_skill_fail_level
:
reset_skill_fail_level
:
-
【男园丁@正常】不用重置也好,
主人
可以利用这笔钱干其他的事。
-
【男园丁@正常】不用重置也好,
【1】
可以利用这笔钱干其他的事。
reset_skill_cancel
:
reset_skill_cancel
:
-
【男园丁@正常】我也不想重置技能,还是
主人
懂我。
-
【男园丁@正常】我也不想重置技能,还是
【1】
懂我。
#园丁更名
#园丁更名
rename_check_first_free
:
rename_check_first_free
:
-
【男园丁@正常】只要
主人
开心就好,我都可以。
-
【男园丁@正常】只要
【1】
开心就好,我都可以。
rename_check
:
rename_check
:
-
【男园丁@正常】
主人,改名要花货币的,你
确定要为我改名吗?
-
【男园丁@正常】
【1】,改名要花【3】的,【2】
确定要为我改名吗?
-
【男园丁@正常】我现在的名字不好吗?改名花费的
货币可不少,你
想好了吗?
-
【男园丁@正常】我现在的名字不好吗?改名花费的
【3】可不少,【2】
想好了吗?
-
【男园丁@正常】只要
主人开心就好,不过你
真的要给我改吗?
-
【男园丁@正常】只要
【1】开心就好,不过【2】
真的要给我改吗?
rename_success
:
rename_success
:
-
【男园丁@正常】我以后就叫【
1】了,我很喜欢这个新名字,谢谢主人
!
-
【男园丁@正常】我以后就叫【
3】了,我很喜欢这个新名字,谢谢【1】
!
rename_fail
:
rename_fail
:
-
【男园丁@正常】我改不了名啊……
主人你
先去找一找改名的物品吧。
-
【男园丁@正常】我改不了名啊……
【1】【2】
先去找一找改名的物品吧。
rename_fail_had
:
rename_fail_had
:
-
【男园丁@正常】
主人
,我已经是这个名字了。
-
【男园丁@正常】
【1】
,我已经是这个名字了。
rename_fail_no_name
:
rename_fail_no_name
:
-
【男园丁@正常】
主人,你
想让我改成什么名字?
-
【男园丁@正常】
【1】,【2】
想让我改成什么名字?
rename_cancel
:
rename_cancel
:
-
【男园丁@正常】好的,用原来的名字也好。
-
【男园丁@正常】好的,用原来的名字也好。
#查看背包
#查看背包
view_back_pack_item_lot
:
view_back_pack_item_lot
:
-
【男园丁@正常】这么多东西,把背包都塞得满满当当啊!
-
【男园丁@正常】这么多东西,把背包都塞得满满当当啊!
view_back_pack_item_few
:
view_back_pack_item_few
:
-
【男园丁@正常】这也太少了点吧……
主人
,我们再去多种一点植物吧!
-
【男园丁@正常】这也太少了点吧……
【1】
,我们再去多种一点植物吧!
view_back_pack_item_fail_no_type
:
view_back_pack_item_fail_no_type
:
-
【男园丁@正常】
主人,你
还没告诉我想看的种类。
-
【男园丁@正常】
【1】,【2】
还没告诉我想看的种类。
view_back_pack_item_fail_not_exist
:
view_back_pack_item_fail_not_exist
:
-
【男园丁@正常】
主人,没有这种东西,要不你
再想想。
-
【男园丁@正常】
【1】,没有这种东西,要不【2】
再想想。
#查看货币
#查看货币
view_money_lot
:
view_money_lot
:
-
【男园丁@正常】这么多钱……
主人你
就是大富翁本人吧!
-
【男园丁@正常】这么多钱……
【1】【2】
就是大富翁本人吧!
view_money_few
:
view_money_few
:
-
【男园丁@正常】
主人
,请再接再厉!早日攒到更多成为大富翁吧!
-
【男园丁@正常】
【1】
,请再接再厉!早日攒到更多成为大富翁吧!
#检索物品
#检索物品
search_item_info_not_have
:
search_item_info_not_have
:
-
【男园丁@正常】我陪
主人
一起去找吧!
-
【男园丁@正常】我陪
【1】
一起去找吧!
search_item_info_fruit_none
:
search_item_info_fruit_none
:
-
【男园丁@正常】
主人
,我们可以再种一些。
-
【男园丁@正常】
【1】
,我们可以再种一些。
search_item_info_item_none
:
search_item_info_item_none
:
-
【男园丁@正常】
主人
,要不我们再去商店看看。
-
【男园丁@正常】
【1】
,要不我们再去商店看看。
search_item_info_no_item
:
search_item_info_no_item
:
-
【男园丁@正常】
主人
想知道哪个物品的详情呢?
-
【男园丁@正常】
【1】
想知道哪个物品的详情呢?
search_item_info_no_exist
:
search_item_info_no_exist
:
-
【男园丁@正常】没有这个物品,
主人
再想想。
-
【男园丁@正常】没有这个物品,
【1】
再想想。
woman
:
woman
:
#更改称呼
gardener_call_name_change_fail_null
:
-
【女园丁@正常】我叫【3】,【1】希望我怎么称呼【2】呢?【4】?
gardener_call_name_change_success
:
-
【女园丁@正常】好的【1】,【2】的称呼已经修改成功了。
#园丁升级
#园丁升级
gardener_upgrade_check
:
gardener_upgrade_check
:
-
【女园丁@正常】升级后我的能力也会跟着提升哦!
-
【女园丁@正常】升级后我的能力也会跟着提升哦!
-
【女园丁@正常】快让我升级好吗,
主人
?
-
【女园丁@正常】快让我升级好吗,
【1】
?
-
【女园丁@正常】当然要确认啊!我想升级很久了!
-
【女园丁@正常】当然要确认啊!我想升级很久了!
gardener_upgrade_success
:
gardener_upgrade_success
:
-
【女园丁@正常】我又变厉害了一点,能为
主人
做更多事了!
-
【女园丁@正常】我又变厉害了一点,能为
【1】
做更多事了!
gardener_upgrade_fail
:
gardener_upgrade_fail
:
-
【女园丁@正常】啊……我无法获得更强大的力量升级了吗……
-
【女园丁@正常】啊……我无法获得更强大的力量升级了吗……
gardener_upgrade_fail_had
:
gardener_upgrade_fail_had
:
-
【女园丁@正常】厉害了
主人,我满级可以帮主人
更多的忙。
-
【女园丁@正常】厉害了
【1】,我满级可以帮【1】
更多的忙。
gardener_upgrade_fail_task
:
gardener_upgrade_fail_task
:
-
【女园丁@正常】升级不了呢,要不我们去看一下任务详情吧。
-
【女园丁@正常】升级不了呢,要不我们去看一下任务详情吧。
gardener_upgrade_cancel
:
gardener_upgrade_cancel
:
-
【女园丁@正常】虽然不升级了,但是我依旧会能帮到
主人
的。
-
【女园丁@正常】虽然不升级了,但是我依旧会能帮到
【1】
的。
#学习技能
#学习技能
learn_skill_check
:
learn_skill_check
:
-
【女园丁@正常】好的,
主人
,那我们就学这个吧。
-
【女园丁@正常】好的,
【1】
,那我们就学这个吧。
learn_skill_success
:
learn_skill_success
:
-
【女园丁@正常】我感觉自己又比之前厉害了一点诶!谢谢
主人
!
-
【女园丁@正常】我感觉自己又比之前厉害了一点诶!谢谢
【1】
!
learn_skill_fail_had
:
learn_skill_fail_had
:
-
【女园丁@正常】
主人,你
忘了我们已经学过这个技能了吗?
-
【女园丁@正常】
【1】,【2】
忘了我们已经学过这个技能了吗?
learn_skill_fail_no_skill
:
learn_skill_fail_no_skill
:
-
【女园丁@正常】
主人
想让我学习哪个技能呀?
-
【女园丁@正常】
【1】
想让我学习哪个技能呀?
learn_skill_fail_no_exist
:
learn_skill_fail_no_exist
:
-
【女园丁@正常】没有这个技能呢,要不我们再想一下吧。
-
【女园丁@正常】没有这个技能呢,要不我们再想一下吧。
learn_skill_fail_not_allow
:
learn_skill_fail_not_allow
:
-
【女园丁@正常】不让我们学习这个技能了,没事,我们换一个也一样。
-
【女园丁@正常】不让我们学习这个技能了,没事,我们换一个也一样。
learn_skill_cancel
:
learn_skill_cancel
:
-
【女园丁@正常】我听
主人
的!
-
【女园丁@正常】我听
【1】
的!
#重置技能
#重置技能
reset_skill_check
:
reset_skill_check
:
-
【女园丁@正常】真要重置技能吗
主人
?
-
【女园丁@正常】真要重置技能吗
【1】
?
-
【女园丁@正常】这些技能好不容易才学会啊,重置又得从头来过了……
-
【女园丁@正常】这些技能好不容易才学会啊,重置又得从头来过了……
-
【女园丁@正常】
主人,不如你
再想想?
-
【女园丁@正常】
【1】,不如【2】
再想想?
reset_skill_success
:
reset_skill_success
:
-
【女园丁@正常】快带我去学习新技能吧
主人
!
-
【女园丁@正常】快带我去学习新技能吧
【1】
!
reset_skill_fail_money
:
reset_skill_fail_money
:
-
【女园丁@正常】真尴尬啊,我们去收集【1】再升级的吧……
-
【女园丁@正常】真尴尬啊,我们去收集【1】再升级的吧……
reset_skill_fail_had
:
reset_skill_fail_had
:
-
【女园丁@正常】
主人你
忘了之前重置过技能了吗。
-
【女园丁@正常】
【1】【2】
忘了之前重置过技能了吗。
reset_skill_fail_level
:
reset_skill_fail_level
:
-
【女园丁@正常】不能重置虽然有点可惜,但是我们节省开销了,嘻嘻。
-
【女园丁@正常】不能重置虽然有点可惜,但是我们节省开销了,嘻嘻。
reset_skill_cancel
:
reset_skill_cancel
:
-
【女园丁@正常】好不容易学会的技能我才一点都不想要重置,
主人你
做了正确的选择。
-
【女园丁@正常】好不容易学会的技能我才一点都不想要重置,
【1】【2】
做了正确的选择。
#园丁更名
#园丁更名
rename_check_first_free
:
rename_check_first_free
:
-
【女园丁@正常】第一次免费,好耶,
主人改什么都可以,我听主人
的。
-
【女园丁@正常】第一次免费,好耶,
【1】改什么都可以,我听【1】
的。
rename_check
:
rename_check
:
-
【女园丁@正常】改名可是要花一笔钱的哦!
主人你
想好了吗?
-
【女园丁@正常】改名可是要花一笔钱的哦!
【1】【2】
想好了吗?
-
【女园丁@正常】看来你对我现在的名字不是很满意,不过这笔改名的费用是需要我们自己出的……
主人你
还要给我改名吗?
-
【女园丁@正常】看来你对我现在的名字不是很满意,不过这笔改名的费用是需要我们自己出的……
【1】【2】
还要给我改名吗?
-
【女园丁@正常】想改我的名字可是要花钱的啊,
你
真的要这么做吗?
-
【女园丁@正常】想改我的名字可是要花钱的啊,
【2】
真的要这么做吗?
rename_success
:
rename_success
:
-
【女园丁@正常】【
1】,这个名字……嗯,只要主人你
喜欢就可以了。
-
【女园丁@正常】【
3】,这个名字……嗯,只要【1】【2】
喜欢就可以了。
rename_fail
:
rename_fail
:
-
【女园丁@正常】改不了就别改了吧
主人
,我很喜欢现在的名字。
-
【女园丁@正常】改不了就别改了吧
【1】
,我很喜欢现在的名字。
rename_fail_had
:
rename_fail_had
:
-
【女园丁@正常】
主人
,我本来就是这个名字啊。
-
【女园丁@正常】
【1】
,我本来就是这个名字啊。
rename_fail_no_name
:
rename_fail_no_name
:
-
【女园丁@正常】
主人,你
还没告诉我想改什么名字呢?
-
【女园丁@正常】
【1】,【2】
还没告诉我想改什么名字呢?
rename_cancel
:
rename_cancel
:
-
【女园丁@正常】那就听
主人
的,我们不改了。
-
【女园丁@正常】那就听
【1】
的,我们不改了。
#查看背包
#查看背包
view_back_pack_item_lot
:
view_back_pack_item_lot
:
-
【女园丁@正常】这么多东西都是我为
主人
积攒的,我真厉害。
-
【女园丁@正常】这么多东西都是我为
【1】
积攒的,我真厉害。
view_back_pack_item_few
:
view_back_pack_item_few
:
-
【女园丁@正常】就这么一点?看来我们还要继续努力啊
主人
,不然我们去种一些植物吧。
-
【女园丁@正常】就这么一点?看来我们还要继续努力啊
【1】
,不然我们去种一些植物吧。
view_back_pack_item_fail_no_type
:
view_back_pack_item_fail_no_type
:
-
【女园丁@正常】
主人,你
想看哪类物品呢?
-
【女园丁@正常】
【1】,【2】
想看哪类物品呢?
view_back_pack_item_fail_not_exist
:
view_back_pack_item_fail_not_exist
:
-
【女园丁@正常】
主人
说错了吧,没有这种东西哦。
-
【女园丁@正常】
【1】
说错了吧,没有这种东西哦。
#查看货币
#查看货币
view_money_lot
:
view_money_lot
:
-
【女园丁@正常】我没看错吧?我们竟然已经有这么多钱了,
主人,不!我以后就叫你
富翁了!
-
【女园丁@正常】我没看错吧?我们竟然已经有这么多钱了,
【1】,不!我以后就叫【2】
富翁了!
view_money_few
:
view_money_few
:
-
【女园丁@正常】距离破产也只是时间问题……
主人你
要加油赚钱啊。
-
【女园丁@正常】距离破产也只是时间问题……
【1】【2】
要加油赚钱啊。
#检索物品
#检索物品
search_item_info_not_have
:
search_item_info_not_have
:
-
【女园丁@正常】这种东西比较稀有,我陪
主人
去找找看吧。
-
【女园丁@正常】这种东西比较稀有,我陪
【1】
去找找看吧。
search_item_info_fruit_none
:
search_item_info_fruit_none
:
-
【女园丁@正常】有的是办法,
主人,我陪你
去找一些。
-
【女园丁@正常】有的是办法,
【1】,我陪【2】
去找一些。
search_item_info_item_none
:
search_item_info_item_none
:
-
【女园丁@正常】那我就陪
主人
逛逛商店吧。
-
【女园丁@正常】那我就陪
【1】
逛逛商店吧。
search_item_info_no_item
:
search_item_info_no_item
:
-
【女园丁@正常】
主人,你
还没告诉我想看什么呢?
-
【女园丁@正常】
【1】,【2】
还没告诉我想看什么呢?
search_item_info_no_exist
:
search_item_info_no_exist
:
-
【女园丁@正常】找不到这个物品了,主人你再想想嘛。
-
【女园丁@正常】找不到这个物品了,【1】【2】再想想嘛。
\ No newline at end of file
\ No newline at end of file
src/main/resources/speech/help.yaml
View file @
290107a1
...
@@ -91,7 +91,7 @@ aside:
...
@@ -91,7 +91,7 @@ aside:
#-----------------------------园丁-------------------------------
#-----------------------------园丁-------------------------------
#8009:园丁等级
#8009:园丁等级
gardener_level_explain_check
:
gardener_level_explain_check
:
-
【旁白@正常】园丁可升至最高10级,每级园丁等级都会提升各项能力:宠物养育能力可以提升宠物栏存放宠物的总数,花圃培育能力可以提升花圃开启总数,领导能力可以提升每天率领宠物出击
偷菜
的次数,同时每升级一次都可以从两个技能中选择一个学习,提升种植植物或是培养宠物的能力。
-
【旁白@正常】园丁可升至最高10级,每级园丁等级都会提升各项能力:宠物养育能力可以提升宠物栏存放宠物的总数,花圃培育能力可以提升花圃开启总数,领导能力可以提升每天率领宠物出击
攻打
的次数,同时每升级一次都可以从两个技能中选择一个学习,提升种植植物或是培养宠物的能力。
gardener_upgrade_explain_check
:
gardener_upgrade_explain_check
:
-
【旁白@正常】可以通过下达指令‘园丁升级’来进行升级,升级时需要园丁完成下一级的养成任务,同时消耗一定量的‘游戏货币’和材料提升等级,可以询问具体等级对应的升级条件来获知该等级具体的升级需求。
-
【旁白@正常】可以通过下达指令‘园丁升级’来进行升级,升级时需要园丁完成下一级的养成任务,同时消耗一定量的‘游戏货币’和材料提升等级,可以询问具体等级对应的升级条件来获知该等级具体的升级需求。
gardener_upgrade_task_check
:
gardener_upgrade_task_check
:
...
@@ -103,7 +103,7 @@ aside:
...
@@ -103,7 +103,7 @@ aside:
gardener_upgrade_cost_check_none
:
gardener_upgrade_cost_check_none
:
-
【旁白@正常】等级【1】无需消耗物品。
-
【旁白@正常】等级【1】无需消耗物品。
gardener_level_ability_check
:
gardener_level_ability_check
:
-
【旁白@正常】园丁【1】级时,花圃数量上限【2】,宠物栏容量【3】,
偷菜
和帮助好友次数【4】。
-
【旁白@正常】园丁【1】级时,花圃数量上限【2】,宠物栏容量【3】,
攻打
和帮助好友次数【4】。
gardener_level_rule_check_fail_null
:
gardener_level_rule_check_fail_null
:
-
【旁白@正常】你还未提供园丁等级,无法查看。目前有等级【1】。
-
【旁白@正常】你还未提供园丁等级,无法查看。目前有等级【1】。
gardener_level_rule_check_fail_over
:
gardener_level_rule_check_fail_over
:
...
@@ -133,9 +133,9 @@ aside:
...
@@ -133,9 +133,9 @@ aside:
-
【旁白@正常】【1】会在以下植物成熟时被吸引过来:【2】。
-
【旁白@正常】【1】会在以下植物成熟时被吸引过来:【2】。
#8014:宠物说明
#8014:宠物说明
pet_explain_check
:
pet_explain_check
:
-
【旁白@正常】宠物是作战的主力军,宠物栏中的宠物可以在他人
偷菜时进行防守,也可以由园丁带领去其他人的花园中偷菜
。每个花圃都可以放置一个宠物,放置的宠物有些是因为伴生关系,是种植特定植物不可缺少的条件,同时放置在花圃中的宠物有一定概率掉落稀有的物品。注意:放置宠物以后就没办法吸引到其他宠物到来,如果要吸引宠物,一定要先把花圃中的宠物移动到宠物栏。部分珍稀宠物会要求一些果实,如果超过2天没有提供的话就会自动离开。
-
【旁白@正常】宠物是作战的主力军,宠物栏中的宠物可以在他人
攻打时进行防守,也可以由园丁带领去其他人的花园中攻打
。每个花圃都可以放置一个宠物,放置的宠物有些是因为伴生关系,是种植特定植物不可缺少的条件,同时放置在花圃中的宠物有一定概率掉落稀有的物品。注意:放置宠物以后就没办法吸引到其他宠物到来,如果要吸引宠物,一定要先把花圃中的宠物移动到宠物栏。部分珍稀宠物会要求一些果实,如果超过2天没有提供的话就会自动离开。
pet_fight_rule_check
:
pet_fight_rule_check
:
-
【旁白@正常】宠物战斗在发起
偷菜指令后进行,战斗根据宠物数量分为若干轮次,每个轮次中双方各派遣一位宠物进行对战,对战分为若干回合,每个回合双方宠物各发起一次攻击,根据攻击力和属性克制关系计算造成的伤害,生命值为0的宠物下场,由下一顺位的宠物上场。直到双方其中一方没有宠物可以上场时判定为失败方。若双方都没有宠物可以上场则判定为平局,平局时会判定为偷菜
失败。
-
【旁白@正常】宠物战斗在发起
攻打指令后进行,战斗根据宠物数量分为若干轮次,每个轮次中双方各派遣一位宠物进行对战,对战分为若干回合,每个回合双方宠物各发起一次攻击,根据攻击力和属性克制关系计算造成的伤害,生命值为0的宠物下场,由下一顺位的宠物上场。直到双方其中一方没有宠物可以上场时判定为失败方。若双方都没有宠物可以上场则判定为平局,平局时会判定为攻打
失败。
#宠物属性及各项参数相关
#宠物属性及各项参数相关
pet_attribute_check
:
pet_attribute_check
:
-
【旁白@正常】宠物的属性一共有【1】种,和植物的属性一致,分别为:【2】,一般情况下宠物都会喜欢与自己属性相同的植物,还有些罕见的宠物会同时具有两个属性。
-
【旁白@正常】宠物的属性一共有【1】种,和植物的属性一致,分别为:【2】,一般情况下宠物都会喜欢与自己属性相同的植物,还有些罕见的宠物会同时具有两个属性。
...
@@ -160,9 +160,9 @@ aside:
...
@@ -160,9 +160,9 @@ aside:
visit_strange_rule_check
:
visit_strange_rule_check
:
-
【旁白@正常】你可以通过‘拜访陌生人’指令拜访一名随机问你匹配的陌生人,也可以通过使用‘拜访’加上玩家地址信息拜访一名指定的陌生人。需要注意的是,当跨区拜访时,需要花费【1】【2】才可以拜访。
-
【旁白@正常】你可以通过‘拜访陌生人’指令拜访一名随机问你匹配的陌生人,也可以通过使用‘拜访’加上玩家地址信息拜访一名指定的陌生人。需要注意的是,当跨区拜访时,需要花费【1】【2】才可以拜访。
steal_stranger_rule_check
:
steal_stranger_rule_check
:
-
【旁白@正常】在拜访时,通过下达‘
偷取果实’指令进行偷菜,如果没有另外指定一个花圃编号的话就会随机选取一个有成熟果实的花圃偷菜。当然偷菜需要宠物进行战斗,双方宠物栏中的宠物1对1的进行作战,胜利的话就可以成功偷菜,成功偷菜会获得所有该花圃的产出包括各种掉落物品。战斗失败或平局就没办法偷菜了。对同一个陌生人偷菜后需要等待【1】才可以再次对其偷菜
。
-
【旁白@正常】在拜访时,通过下达‘
攻打花园’指令进行攻打,如果没有另外指定一个花圃编号的话就会随机选取一个有成熟果实的花圃攻打。当然攻打需要宠物进行战斗,双方宠物栏中的宠物1对1的进行作战,胜利的话就可以成功收取对方果实,成功攻打会获得所有该花圃的产出包括各种掉落物品。战斗失败或平局就没办法收取对方果实了。对同一个陌生人攻打后需要等待【1】才可以再次对其攻打
。
steal_report_rule_check
:
steal_report_rule_check
:
-
【旁白@正常】被其他人
偷菜后,您会收到一条偷菜简报,通过下达指令‘查看偷菜
简报’进行查看,简报会存放总数【1】条,每一条的存放时间为【2】天。查看简报时可以选择查看详细的战斗过程,战斗过程需要根据每一轮战斗单独查看详情。
-
【旁白@正常】被其他人
攻打后,您会收到一条防守简报,通过下达指令‘查看防守
简报’进行查看,简报会存放总数【1】条,每一条的存放时间为【2】天。查看简报时可以选择查看详细的战斗过程,战斗过程需要根据每一轮战斗单独查看详情。
#8017:好友
#8017:好友
visit_friend_rule_check
:
visit_friend_rule_check
:
-
【旁白@正常】可以通过下达指令‘拜访好友’拜访一名随机匹配的好友,或是加上好友地址拜访指定的好友,也可以说‘拜访一名有成熟果实的好友’来随机拜访一名满足条件的好友。跨区拜访好友时也需要花费‘数量’‘游戏货币’才能拜访。
-
【旁白@正常】可以通过下达指令‘拜访好友’拜访一名随机匹配的好友,或是加上好友地址拜访指定的好友,也可以说‘拜访一名有成熟果实的好友’来随机拜访一名满足条件的好友。跨区拜访好友时也需要花费‘数量’‘游戏货币’才能拜访。
...
@@ -188,7 +188,7 @@ aside:
...
@@ -188,7 +188,7 @@ aside:
#-----------------------------排行-------------------------------
#-----------------------------排行-------------------------------
#8021:排行榜规则
#8021:排行榜规则
ranking_list_rule_check
:
ranking_list_rule_check
:
-
【旁白@正常】排行榜分为:财富榜、
偷菜榜和友情榜,财富榜以‘游戏货币’数量为排行条件;偷菜榜以偷菜
胜利次数为排行条件;友情榜以帮助好友次数为排行条件;每个榜会展示全区服排行前10名的玩家,每天0点更新一次榜单排名。没有进入榜单的玩家仍然有自己的排名,通过指定一个玩家地址ID和一个榜单类型进行排名查询可以获得该玩家在这个榜单中的排名。
-
【旁白@正常】排行榜分为:财富榜、
挑战榜和友情榜,财富榜以‘游戏货币’数量为排行条件;挑战榜以进攻
胜利次数为排行条件;友情榜以帮助好友次数为排行条件;每个榜会展示全区服排行前10名的玩家,每天0点更新一次榜单排名。没有进入榜单的玩家仍然有自己的排名,通过指定一个玩家地址ID和一个榜单类型进行排名查询可以获得该玩家在这个榜单中的排名。
#8022:排行榜查看
#8022:排行榜查看
ranking_list_rule_look_check
:
ranking_list_rule_look_check
:
-
【旁白@正常】通过‘查看排行榜’指令可以查看各个榜单,指定具体的榜单或地区可以查看相对应的榜单详情。通过下达指令‘查看某玩家名次’并指定玩家地址ID和榜单类型,即可获得该玩家在指定榜单中的名次。您也可以通过指定榜单名次来进行拜访。
-
【旁白@正常】通过‘查看排行榜’指令可以查看各个榜单,指定具体的榜单或地区可以查看相对应的榜单详情。通过下达指令‘查看某玩家名次’并指定玩家地址ID和榜单类型,即可获得该玩家在指定榜单中的名次。您也可以通过指定榜单名次来进行拜访。
...
...
src/main/resources/speech/market.yaml
View file @
290107a1
...
@@ -34,6 +34,8 @@ aside:
...
@@ -34,6 +34,8 @@ aside:
-
【旁白@正常】已成功出售【1】个【2】,为你赚取了【3】【4】。
-
【旁白@正常】已成功出售【1】个【2】,为你赚取了【3】【4】。
sell_cancel
:
sell_cancel
:
-
【旁白@正常】好的,已取消出售。
-
【旁白@正常】好的,已取消出售。
sell_pet_check
:
-
【旁白@正常】宠物不能出售,可以试试出售其他东西。
sell_all_check_success
:
sell_all_check_success
:
-
【旁白@正常】出售背包里的所有【1】一共可获得【2】【3】,是否确定出售?
-
【旁白@正常】出售背包里的所有【1】一共可获得【2】【3】,是否确定出售?
sell_all_check_fail_none
:
sell_all_check_fail_none
:
...
@@ -46,7 +48,7 @@ aside:
...
@@ -46,7 +48,7 @@ aside:
-
【旁白@正常】已为你取消出售所有物品操作。
-
【旁白@正常】已为你取消出售所有物品操作。
#查看商品
#查看商品
goods_check_type_success
:
goods_check_type_success
:
-
【旁白@正常】【1】【2】【3】
有:【4
】,还想看看别的吗?
-
【旁白@正常】【1】【2】【3】
总共有【4】个:【5
】,还想看看别的吗?
goods_check_item_success
:
goods_check_item_success
:
-
【旁白@正常】【1】,【2】,【3】。
-
【旁白@正常】【1】,【2】,【3】。
goods_check_fail_no_name
:
goods_check_fail_no_name
:
...
@@ -97,104 +99,104 @@ man:
...
@@ -97,104 +99,104 @@ man:
-
【男园丁@正常】之后还可以再来购买。
-
【男园丁@正常】之后还可以再来购买。
#出售商品
#出售商品
sell_check_item_no_name
:
sell_check_item_no_name
:
-
【男园丁@正常】【1】
你
想卖什么?可以直接说出名称,或者全部出售。
-
【男园丁@正常】【1】
【2】
想卖什么?可以直接说出名称,或者全部出售。
-
【男园丁@正常】说出物品名,可以更准确的购买该物品。
-
【男园丁@正常】说出物品名,可以更准确的购买该物品。
-
【男园丁@正常】不说出准确的名字,我也不知道【1】想买的是什么。
-
【男园丁@正常】不说出准确的名字,我也不知道【1】想买的是什么。
sell_check_fail_no_exist
:
sell_check_fail_no_exist
:
-
【男园丁@正常】
主人
,是没有这样物品的。
-
【男园丁@正常】
【1】
,是没有这样物品的。
sell_success
:
sell_success
:
-
【男园丁@正常】背包里的钱又变多起来了,
主人
有当商人的潜质啊。
-
【男园丁@正常】背包里的钱又变多起来了,
【1】
有当商人的潜质啊。
-
【男园丁@正常】这些钱,都是
主人
辛勤劳动得到的成果,真让我感动……
-
【男园丁@正常】这些钱,都是
【1】
辛勤劳动得到的成果,真让我感动……
-
【男园丁@正常】我一定会努力的种植物,争取替
主人
赚更多的钱!
-
【男园丁@正常】我一定会努力的种植物,争取替
【1】
赚更多的钱!
sell_cancel
:
sell_cancel
:
-
【男园丁@正常】可以卖掉背包里的其他物品,赚取货币。
-
【男园丁@正常】可以卖掉背包里的其他物品,赚取货币。
-
【男园丁@正常】行,那我们就暂时不卖。
-
【男园丁@正常】行,那我们就暂时不卖。
-
【男园丁@正常】想要卖东西换钱的时候,还可以再来。
-
【男园丁@正常】想要卖东西换钱的时候,还可以再来。
sell_all_success
:
sell_all_success
:
-
【男园丁@正常】虽然赚了不少钱,但背包已经空了,再去卖点果实种植吧。
-
【男园丁@正常】虽然赚了不少钱,但背包已经空了,再去卖点果实种植吧。
-
【男园丁@正常】让我把这些钱装起来,好好替
主人
保管……
-
【男园丁@正常】让我把这些钱装起来,好好替
【1】
保管……
-
【男园丁@正常】这些钱可不能乱花,种子是需要钱来购买的。
-
【男园丁@正常】这些钱可不能乱花,种子是需要钱来购买的。
sell_all_cancel
:
sell_all_cancel
:
-
【男园丁@正常】好的,留着或许其他用处。
-
【男园丁@正常】好的,留着或许其他用处。
#查看商品
#查看商品
goods_check_type_success
:
goods_check_type_success
:
-
【男园丁@正常】可以再多看看,我们不急着买。
-
【男园丁@正常】可以再多看看,我们不急着买。
-
【男园丁@正常】
主人
应该已经想好自己要买什么了吧。
-
【男园丁@正常】
【1】
应该已经想好自己要买什么了吧。
-
【男园丁@正常】不管
主人
买什么,我都会好好保存的!
-
【男园丁@正常】不管
【1】
买什么,我都会好好保存的!
goods_check_fail_type_no_goods
:
goods_check_fail_type_no_goods
:
-
【男园丁@正常】
主人
想买的话,我们先努力升级吧。
-
【男园丁@正常】
【1】
想买的话,我们先努力升级吧。
goods_check_item_success
:
goods_check_item_success
:
-
【男园丁@正常】看好了东西和价格,就可以购买了。
-
【男园丁@正常】看好了东西和价格,就可以购买了。
-
【男园丁@正常】
主人
想买的是这个东西吗?如果不是可以重新挑选的。
-
【男园丁@正常】
【1】
想买的是这个东西吗?如果不是可以重新挑选的。
-
【男园丁@正常】根据我们的存款,适量购买种子就好。
-
【男园丁@正常】根据我们的存款,适量购买种子就好。
goods_check_fail_item_no_exist
:
goods_check_fail_item_no_exist
:
-
【男园丁@正常】
主人
,我们看看其他的吧。
-
【男园丁@正常】
【1】
,我们看看其他的吧。
woman
:
woman
:
#购买物品
#购买物品
buy_check_success
:
buy_check_success
:
-
【女园丁@正常】
你要买这个东西吗主人
?
-
【女园丁@正常】
【2】要买这个东西吗【1】
?
buy_check_fail_no_name
:
buy_check_fail_no_name
:
-
【女园丁@正常】
主人,可以直接说出你想购买东西的名称,不然我也不知道你
想买什么……
-
【女园丁@正常】
【1】,可以直接说出【2】想购买东西的名称,不然我也不知道【2】
想买什么……
-
【女园丁@正常】
主人
想买果实还是材料啊?
-
【女园丁@正常】
【1】
想买果实还是材料啊?
-
【女园丁@正常】
你
要买东西的话,告诉我名字就好了。
-
【女园丁@正常】
【2】
要买东西的话,告诉我名字就好了。
buy_check_fail_no_num
:
buy_check_fail_no_num
:
-
【女园丁@正常】我建议一次性购买,种满花圃后就不用麻烦再来买了!
-
【女园丁@正常】我建议一次性购买,种满花圃后就不用麻烦再来买了!
-
【女园丁@正常】我觉得可以按照我们货币余额的数量购买,不能把钱花光。
-
【女园丁@正常】我觉得可以按照我们货币余额的数量购买,不能把钱花光。
-
【女园丁@正常】先买几个种下试试,等
主人
还想卖了随时再来也行。
-
【女园丁@正常】先买几个种下试试,等
【1】
还想卖了随时再来也行。
buy_success
:
buy_success
:
-
【女园丁@正常】不错诶,我们背包里的东西又增多了!
-
【女园丁@正常】不错诶,我们背包里的东西又增多了!
-
【女园丁@正常】感觉
主人
很有商人敏锐的眼光。
-
【女园丁@正常】感觉
【1】
很有商人敏锐的眼光。
-
【女园丁@正常】攒钱不容易,买东西也要适可而止哦
主人
。
-
【女园丁@正常】攒钱不容易,买东西也要适可而止哦
【1】
。
-
【女园丁@正常】买完种子就可以去种植了,等它成熟后又可以卖掉赚钱了。
-
【女园丁@正常】买完种子就可以去种植了,等它成熟后又可以卖掉赚钱了。
-
【女园丁@正常】这么多种子,之后一定会收获很多果实吧!
-
【女园丁@正常】这么多种子,之后一定会收获很多果实吧!
-
【女园丁@正常】真期待这些种子长大后会变成什么样子……
-
【女园丁@正常】真期待这些种子长大后会变成什么样子……
buy_fail_money
:
buy_fail_money
:
-
【女园丁@正常】真尴尬啊……再去卖点果实换钱吧
主人
。
-
【女园丁@正常】真尴尬啊……再去卖点果实换钱吧
【1】
。
-
【女园丁@正常】
主人,下次卖了果实的钱一定不能再大手大脚的花了。你
看现在我们连东西都买不起了……
-
【女园丁@正常】
【1】,下次卖了果实的钱一定不能再大手大脚的花了。【2】
看现在我们连东西都买不起了……
-
【女园丁@正常】没钱真愁人……我决定了!以后要更努力的种植物,帮
主人
赚更多的钱!
-
【女园丁@正常】没钱真愁人……我决定了!以后要更努力的种植物,帮
【1】
赚更多的钱!
buy_fail_level
:
buy_fail_level
:
-
【女园丁@正常】
主人
,我们先好好升级,总有一天可以买它的。
-
【女园丁@正常】
【1】
,我们先好好升级,总有一天可以买它的。
buy_fail_item_no_exist
:
buy_fail_item_no_exist
:
-
【女园丁@正常】好可惜,没有这个,那我们换其他看看吧。
-
【女园丁@正常】好可惜,没有这个,那我们换其他看看吧。
buy_cancel
:
buy_cancel
:
-
【女园丁@正常】想买的话可以随时来买的。
-
【女园丁@正常】想买的话可以随时来买的。
-
【女园丁@正常】
主人
的想法变得真快。好吧,我们今天就暂时不买了。
-
【女园丁@正常】
【1】
的想法变得真快。好吧,我们今天就暂时不买了。
-
【女园丁@正常】
主人
真是任性……
-
【女园丁@正常】
【1】
真是任性……
#出售商品
#出售商品
sell_check_item_no_name
:
sell_check_item_no_name
:
-
【女园丁@正常】直接说出售卖的东西名称或者全部出售,它才能听得懂啊。
-
【女园丁@正常】直接说出售卖的东西名称或者全部出售,它才能听得懂啊。
sell_check_fail_no_exist
:
sell_check_fail_no_exist
:
-
【女园丁@正常】
主人
,没有这个物品呀,看看别的吧。
-
【女园丁@正常】
【1】
,没有这个物品呀,看看别的吧。
sell_success
:
sell_success
:
-
【女园丁@正常】赚到不少钱了,离成为富翁更进一步了!
-
【女园丁@正常】赚到不少钱了,离成为富翁更进一步了!
-
【女园丁@正常】
主人,下次我会种更多的植物,帮主人
赚更多更多的钱。
-
【女园丁@正常】
【1】,下次我会种更多的植物,帮【1】
赚更多更多的钱。
-
【女园丁@正常】有
主人
在,我们的花园一定会成为全世界最富有的花园!
-
【女园丁@正常】有
【1】
在,我们的花园一定会成为全世界最富有的花园!
sell_cancel
:
sell_cancel
:
-
【女园丁@正常】要不要卖掉背包里的其他东西?总不能空手而归吧。
-
【女园丁@正常】要不要卖掉背包里的其他东西?总不能空手而归吧。
-
【女园丁@正常】既然
主人
不想卖,那我们就不卖吧!留在背包里也挺好的。
-
【女园丁@正常】既然
【1】
不想卖,那我们就不卖吧!留在背包里也挺好的。
-
【女园丁@正常】
主人
要是之后再想来卖的话,随便什么时候来都可以的!
-
【女园丁@正常】
【1】
要是之后再想来卖的话,随便什么时候来都可以的!
sell_all_success
:
sell_all_success
:
-
【女园丁@正常】赚够了钱又可以买新的种子进行种植了,赶快去看啊看吧。
-
【女园丁@正常】赚够了钱又可以买新的种子进行种植了,赶快去看啊看吧。
-
【女园丁@正常】
主人
的努力没有白费,这些酬劳就是最好的证明!
-
【女园丁@正常】
【1】
的努力没有白费,这些酬劳就是最好的证明!
-
【女园丁@正常】我还要努力提升自己的种植能力,为
主人
种出更多的果实!
-
【女园丁@正常】我还要努力提升自己的种植能力,为
【1】
种出更多的果实!
-
【女园丁@正常】赚了好多钱啊,请
主人
来管理花园果然是没错的!
-
【女园丁@正常】赚了好多钱啊,请
【1】
来管理花园果然是没错的!
-
【女园丁@正常】
主人
,我们共同的努力得到了回报!
-
【女园丁@正常】
【1】
,我们共同的努力得到了回报!
-
【女园丁@正常】太好了!下次还有物品也可以继续来这里一起出售。
-
【女园丁@正常】太好了!下次还有物品也可以继续来这里一起出售。
sell_all_cancel
:
sell_all_cancel
:
-
【女园丁@正常】那我们先留着吧。
-
【女园丁@正常】那我们先留着吧。
#查看商品
#查看商品
goods_check_type_success
:
goods_check_type_success
:
-
【女园丁@正常】
主人
有想买的东西可以直接说出来。
-
【女园丁@正常】
【1】
有想买的东西可以直接说出来。
-
【女园丁@正常】
主人
快看,有好东西耶,想买什么呀 。
-
【女园丁@正常】
【1】
快看,有好东西耶,想买什么呀 。
-
【女园丁@正常】买什么我都可以,
主人
尽管挑!
-
【女园丁@正常】买什么我都可以,
【1】
尽管挑!
goods_check_fail_type_no_goods
:
goods_check_fail_type_no_goods
:
-
【女园丁@正常】那我们升级后再来看看吧。
-
【女园丁@正常】那我们升级后再来看看吧。
goods_check_item_success
:
goods_check_item_success
:
-
【女园丁@正常】
主人想买什么就买什么,我听主人
的!
-
【女园丁@正常】
【1】想买什么就买什么,我听【1】
的!
-
【女园丁@正常】明码标价,看来不是黑心商家。
-
【女园丁@正常】明码标价,看来不是黑心商家。
-
【女园丁@正常】真贴心,
主人
就按照它给出的价格买自己想买的就行了。
-
【女园丁@正常】真贴心,
【1】
就按照它给出的价格买自己想买的就行了。
goods_check_fail_item_no_exist
:
goods_check_fail_item_no_exist
:
-
【女园丁@正常】主人,没有这个商品呢,看看其他的吧。
-
【女园丁@正常】【1】,没有这个商品呢,看看其他的吧。
\ No newline at end of file
\ No newline at end of file
src/main/resources/speech/pet.yaml
View file @
290107a1
...
@@ -43,7 +43,7 @@ aside:
...
@@ -43,7 +43,7 @@ aside:
pet_move_field_success
:
pet_move_field_success
:
-
【旁白@正常】花圃【1】中的【2】成功移动到宠物栏。
-
【旁白@正常】花圃【1】中的【2】成功移动到宠物栏。
pet_move_field_fail_pet
:
pet_move_field_fail_pet
:
-
【旁白@正常】
目前
宠物栏已满,暂时无法移动。
-
【旁白@正常】
园丁现在只能照看 【1】 只宠物,
宠物栏已满,暂时无法移动。
pet_move_field_fail_null
:
pet_move_field_fail_null
:
-
【旁白@正常】你还未提供宠物名称或花圃编号,暂时无法移动。
-
【旁白@正常】你还未提供宠物名称或花圃编号,暂时无法移动。
pet_move_field_fail_not_same
:
pet_move_field_fail_not_same
:
...
@@ -107,7 +107,7 @@ aside:
...
@@ -107,7 +107,7 @@ aside:
pet_check_success
:
pet_check_success
:
-
【旁白@正常】目前你的宠物栏共有【1】只宠物,【2】,当前位置上限【3】,还有【4】个空位。
-
【旁白@正常】目前你的宠物栏共有【1】只宠物,【2】,当前位置上限【3】,还有【4】个空位。
pet_check_fail_no_pet
:
pet_check_fail_no_pet
:
-
【旁白@正常】宠物栏为空。
-
【旁白@正常】宠物栏为空
,当前位置上限【1】,还有【1】个空位
。
#查看花圃宠物状况
#查看花圃宠物状况
nursery_pet_check
:
nursery_pet_check
:
-
【旁白@正常】花园目前有宠物的花圃一共有【1】块,【2】块花圃空闲可放置宠物。
-
【旁白@正常】花园目前有宠物的花圃一共有【1】块,【2】块花圃空闲可放置宠物。
...
@@ -138,92 +138,92 @@ man:
...
@@ -138,92 +138,92 @@ man:
#宠物查询
#宠物查询
pet_view_nursery
:
pet_view_nursery
:
-
【男园丁@正常】真是可爱的小动物。
-
【男园丁@正常】真是可爱的小动物。
-
【男园丁@正常】有它们在,我们就不必害怕别人来
偷
植物了。
-
【男园丁@正常】有它们在,我们就不必害怕别人来
收取
植物了。
-
【男园丁@正常】这些小家伙一定会好好守护我们的植物的!
-
【男园丁@正常】这些小家伙一定会好好守护我们的植物的!
pet_view_field
:
pet_view_field
:
-
【男园丁@正常】这小家伙在帮我们看家护院,真是机灵!
-
【男园丁@正常】这小家伙在帮我们看家护院,真是机灵!
-
【男园丁@正常】朝气蓬勃的小东西,给我们的花圃带来了生机。
-
【男园丁@正常】朝气蓬勃的小东西,给我们的花圃带来了生机。
-
【男园丁@正常】哈哈,有空的话
主人
可以陪他们一起玩一玩。
-
【男园丁@正常】哈哈,有空的话
【1】
可以陪他们一起玩一玩。
pet_view_no_pet
:
pet_view_no_pet
:
-
【男园丁@正常】种植特定的植物可以吸引宠物的到来,
主人
快去试试吧。
-
【男园丁@正常】种植特定的植物可以吸引宠物的到来,
【1】
快去试试吧。
-
【男园丁@正常】看来我们种植的植物还不够吸引宠物到来,
主人
再去多种一些吧。
-
【男园丁@正常】看来我们种植的植物还不够吸引宠物到来,
【1】
再去多种一些吧。
-
【男园丁@正常】多去种些植物才能吸引宠物,不然宠物栏看起来空落落的……
-
【男园丁@正常】多去种些植物才能吸引宠物,不然宠物栏看起来空落落的……
pet_view_no_exist
:
pet_view_no_exist
:
-
【男园丁@正常】
主人,你
记错宠物的名称了吧。
-
【男园丁@正常】
【1】,【2】
记错宠物的名称了吧。
pet_view_no_name
:
pet_view_no_name
:
-
【男园丁@正常】
主人,你
还没说想看哪个宠物呢?
-
【男园丁@正常】
【1】,【2】
还没说想看哪个宠物呢?
#宠物移动
#宠物移动
pet_move_nursery_success
:
pet_move_nursery_success
:
-
【男园丁@正常】哈哈哈,小家伙在里面玩的可真开心!
-
【男园丁@正常】哈哈哈,小家伙在里面玩的可真开心!
-
【男园丁@正常】希望它能早日适应这个宠物栏!
-
【男园丁@正常】希望它能早日适应这个宠物栏!
-
【男园丁@正常】小家伙,以后这里就是你的家了……
-
【男园丁@正常】小家伙,以后这里就是你的家了……
pet_move_nursery_fail_have_this_pet
:
pet_move_nursery_fail_have_this_pet
:
-
【男园丁@正常】
主人
,那就帮其他宠物换个地方吧。
-
【男园丁@正常】
【1】
,那就帮其他宠物换个地方吧。
pet_move_nursery_fail_pet
:
pet_move_nursery_fail_pet
:
-
【男园丁@正常】一个花圃里只能放一只宠物哦!
-
【男园丁@正常】一个花圃里只能放一只宠物哦!
-
【男园丁@正常】如果放两只宠物在同一个地方它们会挤不下的。
-
【男园丁@正常】如果放两只宠物在同一个地方它们会挤不下的。
-
【男园丁@正常】我们的宠物已经够多了
主人
……。
-
【男园丁@正常】我们的宠物已经够多了
【1】
……。
pet_move_nursery_fail_no_nursery
:
pet_move_nursery_fail_no_nursery
:
-
【男园丁@正常】
主人你
还没说花圃编号。
-
【男园丁@正常】
【1】【2】
还没说花圃编号。
pet_move_nursery_fail_no_pet
:
pet_move_nursery_fail_no_pet
:
-
【男园丁@正常】
主人
,换其他的宠物试试吧。
-
【男园丁@正常】
【1】
,换其他的宠物试试吧。
pet_move_nursery_fail_no_exist
:
pet_move_nursery_fail_no_exist
:
-
【男园丁@正常】
主人,你
好像说错宠物名称了。
-
【男园丁@正常】
【1】,【2】
好像说错宠物名称了。
pet_move_nursery_fail_wrong_num
:
pet_move_nursery_fail_wrong_num
:
-
【男园丁@正常】
主人
,要不我们再试一遍。
-
【男园丁@正常】
【1】
,要不我们再试一遍。
pet_move_nursery_fail_wrong_pos
:
pet_move_nursery_fail_wrong_pos
:
-
【男园丁@正常】位置错了,没关系,再试一遍。
-
【男园丁@正常】位置错了,没关系,再试一遍。
pet_move_nursery_fail_pos_over
:
pet_move_nursery_fail_pos_over
:
-
【男园丁@正常】
主人
我们将花圃编号说小一点。
-
【男园丁@正常】
【1】
我们将花圃编号说小一点。
pet_move_nursery_fail_none
:
pet_move_nursery_fail_none
:
-
【男园丁@正常】
主人
,我们换其他花圃试试。
-
【男园丁@正常】
【1】
,我们换其他花圃试试。
pet_move_field_success
:
pet_move_field_success
:
-
【男园丁@正常】
主人
我们快去看看吧!
-
【男园丁@正常】
【1】
我们快去看看吧!
-
【男园丁@正常】欢迎它住进新窝!
-
【男园丁@正常】欢迎它住进新窝!
-
【男园丁@正常】这里就是你的小窝了,以后可不要忘了啊!
-
【男园丁@正常】这里就是你的小窝了,以后可不要忘了啊!
pet_move_field_fail_pet
:
pet_move_field_fail_pet
:
-
【男园丁@正常】等宠物栏里有空位了再把它带过来吧。
-
【男园丁@正常】等宠物栏里有空位了再把它带过来吧。
-
【男园丁@正常】我们养的宠物已经够多了,
主人你
可以再考虑考虑……
-
【男园丁@正常】我们养的宠物已经够多了,
【1】【2】
可以再考虑考虑……
-
【男园丁@正常】我们宠物栏里已经满员了。
-
【男园丁@正常】我们宠物栏里已经满员了。
pet_move_field_fail_no_pet
:
pet_move_field_fail_no_pet
:
-
【男园丁@正常】
主人
,宠物栏还没有宠物,可以放一些进去。
-
【男园丁@正常】
【1】
,宠物栏还没有宠物,可以放一些进去。
pet_move_field_fail_no_exist
:
pet_move_field_fail_no_exist
:
-
【男园丁@正常】
主人
,宠物栏中是没有该宠物的。
-
【男园丁@正常】
【1】
,宠物栏中是没有该宠物的。
pet_move_fail_no_pet_name
:
pet_move_fail_no_pet_name
:
-
【男园丁@正常】
主人
要先告诉我宠物名称才可以的。
-
【男园丁@正常】
【1】
要先告诉我宠物名称才可以的。
#宠物删除
#宠物删除
pet_delete_check
:
pet_delete_check
:
-
【男园丁@正常】它多可爱啊,
主人你
再考虑考虑吧……
-
【男园丁@正常】它多可爱啊,
【1】【2】
再考虑考虑吧……
-
【男园丁@正常】小家伙能来到我们花园也是一场缘分。
-
【男园丁@正常】小家伙能来到我们花园也是一场缘分。
-
【男园丁@正常】这个问题,
主人你
还是慎重思考,我不发表意见。
-
【男园丁@正常】这个问题,
【1】【2】
还是慎重思考,我不发表意见。
pet_delete_success
:
pet_delete_success
:
-
【男园丁@正常】它真的走了……希望有另外的人能够收留它。
-
【男园丁@正常】它真的走了……希望有另外的人能够收留它。
-
【男园丁@正常】但愿回到大自然,它能活的更好。
-
【男园丁@正常】但愿回到大自然,它能活的更好。
-
【男园丁@正常】希望它一路平安吧……
-
【男园丁@正常】希望它一路平安吧……
-
【男园丁@正常】唉,希望有缘再见吧……
-
【男园丁@正常】唉,希望有缘再见吧……
-
【男园丁@正常】再见啦小家伙!
-
【男园丁@正常】再见啦小家伙!
-
【男园丁@正常】以后长大了记得回来看看我和
主人
。
-
【男园丁@正常】以后长大了记得回来看看我和
【1】
。
pet_delete_fail_no_pet_nursery
:
pet_delete_fail_no_pet_nursery
:
-
【男园丁@正常】
主人
要放生什么宠物?可以告诉我宠物名称或着花圃编号。
-
【男园丁@正常】
【1】
要放生什么宠物?可以告诉我宠物名称或着花圃编号。
pet_delete_fail_nursery
:
pet_delete_fail_nursery
:
-
【男园丁@正常】
主人,你
说错花圃了。
-
【男园丁@正常】
【1】,【2】
说错花圃了。
pet_delete_fail_no_nursery
:
pet_delete_fail_no_nursery
:
-
【男园丁@正常】
主人
,我们是没有这个花圃的。
-
【男园丁@正常】
【2】
,我们是没有这个花圃的。
pet_delete_fail_nursery_no_exist
:
pet_delete_fail_nursery_no_exist
:
-
【男园丁@正常】还没有花圃【
1】了,主人你
忘了吗。
-
【男园丁@正常】还没有花圃【
3】了,【1】【2】
忘了吗。
pet_delete_cancel
:
pet_delete_cancel
:
-
【男园丁@正常】我就知道
主人你
不会忍心把它赶走的!
-
【男园丁@正常】我就知道
【1】【2】
不会忍心把它赶走的!
-
【男园丁@正常】
主人
让你留下来了,以后你可要好好听话啊小家伙。
-
【男园丁@正常】
【1】
让你留下来了,以后你可要好好听话啊小家伙。
-
【男园丁@正常】开心吧小家伙,
主人
刚才只是在逗你玩!
-
【男园丁@正常】开心吧小家伙,
【1】
刚才只是在逗你玩!
-
【男园丁@正常】太好了,它又可以继续为我们看家护院了!
-
【男园丁@正常】太好了,它又可以继续为我们看家护院了!
#宠物排序
#宠物排序
pet_set_position_pet_success
:
pet_set_position_pet_success
:
-
【男园丁@正常】真是不错的选择,
主人
。
-
【男园丁@正常】真是不错的选择,
【1】
。
-
【男园丁@正常】经过
主人
这样调整,感觉整个战队都焕然一新了。
-
【男园丁@正常】经过
【1】
这样调整,感觉整个战队都焕然一新了。
-
【男园丁@正常】我有一种我们的战队能打败所有战队的感觉!
-
【男园丁@正常】我有一种我们的战队能打败所有战队的感觉!
pet_set_position_pet_fail_no_pet
:
pet_set_position_pet_fail_no_pet
:
-
【男园丁@正常】没有宠物是没办法移动的呢
主人
……
-
【男园丁@正常】没有宠物是没办法移动的呢
【1】
……
-
【男园丁@正常】试试别的宠物吧,
主人
。
-
【男园丁@正常】试试别的宠物吧,
【1】
。
-
【男园丁@正常】想要特定的宠物,可以种植特定的植物吸引它来我们的花圃。
-
【男园丁@正常】想要特定的宠物,可以种植特定的植物吸引它来我们的花圃。
pet_set_position_pet_fail_full
:
pet_set_position_pet_fail_full
:
-
【男园丁@正常】宠物栏空闲才可移动宠物。
-
【男园丁@正常】宠物栏空闲才可移动宠物。
...
@@ -231,47 +231,47 @@ man:
...
@@ -231,47 +231,47 @@ man:
-
【男园丁@正常】先试着空出一些宠物栏,再来移动吧。
-
【男园丁@正常】先试着空出一些宠物栏,再来移动吧。
pet_set_position_field_success
:
pet_set_position_field_success
:
-
【男园丁@正常】它已经成功入住到宠物栏了,我们快去看看吧。
-
【男园丁@正常】它已经成功入住到宠物栏了,我们快去看看吧。
-
【男园丁@正常】按照
主人
的指令,它已经成功入住这个宠物栏了!
-
【男园丁@正常】按照
【1】
的指令,它已经成功入住这个宠物栏了!
-
【男园丁@正常】它可以回宠物栏好好休息了
-
【男园丁@正常】它可以回宠物栏好好休息了
pet_set_position_field_fail
:
pet_set_position_field_fail
:
-
【男园丁@正常】空位,等有宠物了再来移动吧。
-
【男园丁@正常】空位,等有宠物了再来移动吧。
-
【男园丁@正常】这里没有宠物,移不了。
-
【男园丁@正常】这里没有宠物,移不了。
-
【男园丁@正常】一个宠物栏位要有一只宠物才能移动。
-
【男园丁@正常】一个宠物栏位要有一只宠物才能移动。
pet_set_position_fail_no_pos
:
pet_set_position_fail_no_pos
:
-
【男园丁@正常】还不知道
主人
想移到哪个位置呢?
-
【男园丁@正常】还不知道
【1】
想移到哪个位置呢?
pet_set_position_fail_wrong_pos
:
pet_set_position_fail_wrong_pos
:
-
【男园丁@正常】我们的宠物栏没有这样的位置,
主人
忘了吗。
-
【男园丁@正常】我们的宠物栏没有这样的位置,
【1】
忘了吗。
pet_set_position_fail_no_name
:
pet_set_position_fail_no_name
:
-
【男园丁@正常】
主人,你
完了说宠物名称了。
-
【男园丁@正常】
【1】,【2】
完了说宠物名称了。
pet_set_position_fail_wrong_name
:
pet_set_position_fail_wrong_name
:
-
【男园丁@正常】
主人你
把宠物名称弄错了。
-
【男园丁@正常】
【1】【2】
把宠物名称弄错了。
pet_set_position_fail_no_data
:
pet_set_position_fail_no_data
:
-
【男园丁@正常】
主人
具体想怎么做了。
-
【男园丁@正常】
【1】
具体想怎么做了。
pet_switch_success
:
pet_switch_success
:
-
【男园丁@正常】我去帮
主人
看看它们的情况!
-
【男园丁@正常】我去帮
【1】
看看它们的情况!
-
【男园丁@正常】它们的顺序果然发生改变了。
-
【男园丁@正常】它们的顺序果然发生改变了。
-
【男园丁@正常】这真是一个明智的选择啊,
主人
!
-
【男园丁@正常】这真是一个明智的选择啊,
【1】
!
pet_switch_fail_no_pet
:
pet_switch_fail_no_pet
:
-
【男园丁@正常】就让它们待在原位也很好啊!
-
【男园丁@正常】就让它们待在原位也很好啊!
-
【男园丁@正常】
主人
指定的宠物我们没有,可以试试别的宠物。
-
【男园丁@正常】
【1】
指定的宠物我们没有,可以试试别的宠物。
-
【男园丁@正常】特定的宠物可以种植特定的植物来吸引,不如先去种植植物吧?
-
【男园丁@正常】特定的宠物可以种植特定的植物来吸引,不如先去种植植物吧?
pet_switch_fail_over
:
pet_switch_fail_over
:
-
【男园丁@正常】
主人,你
想交换的位置太大了。
-
【男园丁@正常】
【1】,【2】
想交换的位置太大了。
pet_switch_fail_set_error
:
pet_switch_fail_set_error
:
-
【男园丁@正常】
主人
,没有这只宠物,试试其他的吧。
-
【男园丁@正常】
【1】
,没有这只宠物,试试其他的吧。
pet_switch_fail_no_pos
:
pet_switch_fail_no_pos
:
-
【男园丁@正常】还有位置没说了
主人
。
-
【男园丁@正常】还有位置没说了
【1】
。
pet_switch_fail_same_set
:
pet_switch_fail_same_set
:
-
【男园丁@正常】
主人
,那换下位置吧。
-
【男园丁@正常】
【1】
,那换下位置吧。
pet_switch_fail_same_set_only_one
:
pet_switch_fail_same_set_only_one
:
-
【男园丁@正常】看来宠物有点少,
主人
种植植物是能获得一些宠物的。
-
【男园丁@正常】看来宠物有点少,
【1】
种植植物是能获得一些宠物的。
#查看宠物栏
#查看宠物栏
pet_check_lot
:
pet_check_lot
:
-
【男园丁@正常】不知不觉我们竟然已经拥有这么多宠物了,
主人你
可真厉害。
-
【男园丁@正常】不知不觉我们竟然已经拥有这么多宠物了,
【1】【2】
可真厉害。
pet_check_few
:
pet_check_few
:
-
【男园丁@正常】就这么几只小家伙看起来太孤单了……我还要多种植一些植物,吸引更多的宠物来!
-
【男园丁@正常】就这么几只小家伙看起来太孤单了……我还要多种植一些植物,吸引更多的宠物来!
pet_check_fail_no_pet
:
pet_check_fail_no_pet
:
-
【男园丁@正常】
主人
,需要的话,我们在给里面放些宠物。
-
【男园丁@正常】
【1】
,需要的话,我们在给里面放些宠物。
#查看花圃宠物状况
#查看花圃宠物状况
nursery_pet_check_free
:
nursery_pet_check_free
:
-
【男园丁@正常】既然这样,那我们再去吸引一些宠物过来吧。
-
【男园丁@正常】既然这样,那我们再去吸引一些宠物过来吧。
...
@@ -283,16 +283,16 @@ man:
...
@@ -283,16 +283,16 @@ man:
pet_overview_only_field
:
pet_overview_only_field
:
-
【男园丁@正常】只有宠物栏有宠物,可以将宠物栏中的宠物放置到这个花圃中,或是等待植物成熟后看看有没有宠物被吸引过来。
-
【男园丁@正常】只有宠物栏有宠物,可以将宠物栏中的宠物放置到这个花圃中,或是等待植物成熟后看看有没有宠物被吸引过来。
pet_overview_only_nursery
:
pet_overview_only_nursery
:
-
【男园丁@正常】目前只有花圃中有宠物,
需要降低被偷菜可能性的话
,我们可以将花圃中的宠物放置到宠物栏中。
-
【男园丁@正常】目前只有花圃中有宠物,
为了防守别人的进攻
,我们可以将花圃中的宠物放置到宠物栏中。
#查看指定花圃宠物
#查看指定花圃宠物
pet_check_by_num
:
pet_check_by_num
:
-
【男园丁@正常】
主人
,要不我们现在就去看看吧。
-
【男园丁@正常】
【1】
,要不我们现在就去看看吧。
pet_check_by_num_fail_no_num
:
pet_check_by_num_fail_no_num
:
-
【男园丁@正常】
主人
是想看哪个花圃呢。
-
【男园丁@正常】
【1】
是想看哪个花圃呢。
pet_check_by_num_fail_wrong_num
:
pet_check_by_num_fail_wrong_num
:
-
【男园丁@正常】
主人
,我们没有这样的花圃吧。
-
【男园丁@正常】
【1】
,我们没有这样的花圃吧。
pet_check_by_num_fail_no_pet
:
pet_check_by_num_fail_no_pet
:
-
【男园丁@正常】
主人
,里面还没有宠物,可以将宠物栏中的宠物放置到这个花圃中,或是等待植物成熟后看看有没有宠物被吸引过来。
-
【男园丁@正常】
【1】
,里面还没有宠物,可以将宠物栏中的宠物放置到这个花圃中,或是等待植物成熟后看看有没有宠物被吸引过来。
pet_check_by_num_sure
:
pet_check_by_num_sure
:
-
【男园丁@正常】这只宠物看着还行。
-
【男园丁@正常】这只宠物看着还行。
pet_check_by_num_cancel
:
pet_check_by_num_cancel
:
...
@@ -305,25 +305,25 @@ woman:
...
@@ -305,25 +305,25 @@ woman:
#宠物查询
#宠物查询
pet_view_nursery
:
pet_view_nursery
:
-
【女园丁@正常】好可爱的小动物耶。
-
【女园丁@正常】好可爱的小动物耶。
-
【女园丁@正常】动物们可以保护我们种植的植物,不被人
偷走
!
-
【女园丁@正常】动物们可以保护我们种植的植物,不被人
收取
!
-
【女园丁@正常】这些动物真让我安心,不用担心别人会来
偷走
我们的植物了。
-
【女园丁@正常】这些动物真让我安心,不用担心别人会来
收取
我们的植物了。
pet_view_field
:
pet_view_field
:
-
【女园丁@正常】它好可爱啊,记得要帮我和
主人
好好看护植物哦!
-
【女园丁@正常】它好可爱啊,记得要帮我和
【1】
好好看护植物哦!
-
【女园丁@正常】小家伙,我们的花园就靠你们来守护了!
-
【女园丁@正常】小家伙,我们的花园就靠你们来守护了!
-
【女园丁@正常】有这些小家伙在,给我们花园又带来了很多新的乐趣呢!
-
【女园丁@正常】有这些小家伙在,给我们花园又带来了很多新的乐趣呢!
pet_view_no_pet
:
pet_view_no_pet
:
-
【女园丁@正常】多种一些植物可以吸引不同的宠物过来!
-
【女园丁@正常】多种一些植物可以吸引不同的宠物过来!
-
【女园丁@正常】再种一些植物吧
主人
,不要浪费我们宠物栏的位置。
-
【女园丁@正常】再种一些植物吧
【1】
,不要浪费我们宠物栏的位置。
-
【女园丁@正常】想要吸引宠物的话,还是要多种一些植物啊
主人
!
-
【女园丁@正常】想要吸引宠物的话,还是要多种一些植物啊
【1】
!
pet_view_no_exist
:
pet_view_no_exist
:
-
【女园丁@正常】
主人
没有这种宠物哦,我们换一个宠物看看吧。
-
【女园丁@正常】
【1】
没有这种宠物哦,我们换一个宠物看看吧。
pet_view_no_name
:
pet_view_no_name
:
-
【女园丁@正常】
主人呀
,你要告诉我宠物名称才可以帮你找哦。
-
【女园丁@正常】
【1】
,你要告诉我宠物名称才可以帮你找哦。
#宠物移动
#宠物移动
pet_move_nursery_success
:
pet_move_nursery_success
:
-
【女园丁@正常】换了个新窝希望它能早日习惯。
-
【女园丁@正常】换了个新窝希望它能早日习惯。
-
【女园丁@正常】小家伙,我和
主人
会经常来看你的!
-
【女园丁@正常】小家伙,我和
【1】
会经常来看你的!
-
【女园丁@正常】它看起来也很喜欢这个新窝呢
主人
!
-
【女园丁@正常】它看起来也很喜欢这个新窝呢
【1】
!
pet_move_nursery_fail_have_this_pet
:
pet_move_nursery_fail_have_this_pet
:
-
【女园丁@正常】原来有了,那考虑给其他宠物换个位置吧。
-
【女园丁@正常】原来有了,那考虑给其他宠物换个位置吧。
pet_move_nursery_fail_pet
:
pet_move_nursery_fail_pet
:
...
@@ -331,19 +331,19 @@ woman:
...
@@ -331,19 +331,19 @@ woman:
-
【女园丁@正常】我们的宠物栏都满员了……
-
【女园丁@正常】我们的宠物栏都满员了……
-
【女园丁@正常】不如暂时就先维持原样吧!
-
【女园丁@正常】不如暂时就先维持原样吧!
pet_move_nursery_fail_no_nursery
:
pet_move_nursery_fail_no_nursery
:
-
【女园丁@正常】
主人
是说的哪个花圃呀?
-
【女园丁@正常】
【1】
是说的哪个花圃呀?
pet_move_nursery_fail_no_pet
:
pet_move_nursery_fail_no_pet
:
-
【女园丁@正常】
主人
,没有的话可以考虑其他宠物。
-
【女园丁@正常】
【1】
,没有的话可以考虑其他宠物。
pet_move_nursery_fail_no_exist
:
pet_move_nursery_fail_no_exist
:
-
【女园丁@正常】哎呀,
主人你
说错名字吶。
-
【女园丁@正常】哎呀,
【1】【2】
说错名字吶。
pet_move_nursery_fail_wrong_num
:
pet_move_nursery_fail_wrong_num
:
-
【女园丁@正常】花圃编号不对呀,那我们试试其他的。
-
【女园丁@正常】花圃编号不对呀,那我们试试其他的。
pet_move_nursery_fail_wrong_pos
:
pet_move_nursery_fail_wrong_pos
:
-
【女园丁@正常】没有想换的位置了,
主人
,试试其他的吧。
-
【女园丁@正常】没有想换的位置了,
【1】
,试试其他的吧。
pet_move_nursery_fail_pos_over
:
pet_move_nursery_fail_pos_over
:
-
【女园丁@正常】
主人
,换个编号试试吧。
-
【女园丁@正常】
【1】
,换个编号试试吧。
pet_move_nursery_fail_none
:
pet_move_nursery_fail_none
:
-
【女园丁@正常】
主人
,换个花圃试试吧。
-
【女园丁@正常】
【1】
,换个花圃试试吧。
pet_move_field_success
:
pet_move_field_success
:
-
【女园丁@正常】也不知道它会不会习惯这个新的宠物栏。
-
【女园丁@正常】也不知道它会不会习惯这个新的宠物栏。
-
【女园丁@正常】给你换了新窝,以后回家可别走错了!
-
【女园丁@正常】给你换了新窝,以后回家可别走错了!
...
@@ -351,81 +351,81 @@ woman:
...
@@ -351,81 +351,81 @@ woman:
pet_move_field_fail_pet
:
pet_move_field_fail_pet
:
-
【女园丁@正常】宠物栏里不能再放宠物了,想想其他办法吧。
-
【女园丁@正常】宠物栏里不能再放宠物了,想想其他办法吧。
-
【女园丁@正常】宠物栏里已经住满了,现在不能移动。
-
【女园丁@正常】宠物栏里已经住满了,现在不能移动。
-
【女园丁@正常】等以后宠物栏里有空位了再来吧
主人
……
-
【女园丁@正常】等以后宠物栏里有空位了再来吧
【1】
……
pet_move_field_fail_no_pet
:
pet_move_field_fail_no_pet
:
-
【女园丁@正常】
主人
,没在花圃看到这个宠物呀,我们换其他的吧。
-
【女园丁@正常】
【1】
,没在花圃看到这个宠物呀,我们换其他的吧。
pet_move_field_fail_no_exist
:
pet_move_field_fail_no_exist
:
-
【女园丁@正常】
主人,你
说错宠物名字啦,再想想。
-
【女园丁@正常】
【1】,【2】
说错宠物名字啦,再想想。
pet_move_fail_no_pet_name
:
pet_move_fail_no_pet_name
:
-
【女园丁@正常】
主人
是想移动哪只宠物呢?
-
【女园丁@正常】
【1】
是想移动哪只宠物呢?
#宠物删除
#宠物删除
pet_delete_check
:
pet_delete_check
:
-
【女园丁@正常】
主人你
真的忍心不要它了吗?
-
【女园丁@正常】
【1】【2】
真的忍心不要它了吗?
-
【女园丁@正常】
主人,我觉得你
可以再想想。
-
【女园丁@正常】
【1】,我觉得【2】
可以再想想。
-
【女园丁@正常】不论
主人
做什么决定,我都会支持的!
-
【女园丁@正常】不论
【1】
做什么决定,我都会支持的!
pet_delete_success
:
pet_delete_success
:
-
【女园丁@正常】唉,再见了小家伙……
-
【女园丁@正常】唉,再见了小家伙……
-
【女园丁@正常】希望我们还有机会和它见面。
-
【女园丁@正常】希望我们还有机会和它见面。
-
【女园丁@正常】它在冲我们摇尾巴……一定是在感谢这段时间
主人
对它的照顾。
-
【女园丁@正常】它在冲我们摇尾巴……一定是在感谢这段时间
【1】
对它的照顾。
-
【女园丁@正常】希望它以后能遇到更好的主人吧。
-
【女园丁@正常】希望它以后能遇到更好的主人吧。
-
【女园丁@正常】走吧,路上小心啊。
-
【女园丁@正常】走吧,路上小心啊。
-
【女园丁@正常】
主人不要伤心,你
的一切决定我都支持!
-
【女园丁@正常】
【1】不要伤心,【2】
的一切决定我都支持!
pet_delete_fail_no_pet_nursery
:
pet_delete_fail_no_pet_nursery
:
-
【女园丁@正常】都不知道
主人
不要放生哪个宠物呢?告诉我宠物名称或着花圃编号也行哦。
-
【女园丁@正常】都不知道
【1】
不要放生哪个宠物呢?告诉我宠物名称或着花圃编号也行哦。
pet_delete_fail_nursery
:
pet_delete_fail_nursery
:
-
【女园丁@正常】花圃说错了呀,
主人
。
-
【女园丁@正常】花圃说错了呀,
【1】
。
pet_delete_fail_no_nursery
:
pet_delete_fail_no_nursery
:
-
【女园丁@正常】找不到这个花圃哦。
-
【女园丁@正常】找不到这个花圃哦。
pet_delete_fail_nursery_no_exist
:
pet_delete_fail_nursery_no_exist
:
-
【女园丁@正常】
主人,目前还没有花圃【1
】哦。
-
【女园丁@正常】
【1】,目前还没有花圃【3
】哦。
pet_delete_cancel
:
pet_delete_cancel
:
-
【女园丁@正常】吓死了,我还以为
主人你
真的要把它赶走。
-
【女园丁@正常】吓死了,我还以为
【1】【2】
真的要把它赶走。
-
【女园丁@正常】真好啊,你又可以留下来了小可爱!
-
【女园丁@正常】真好啊,你又可以留下来了小可爱!
-
【女园丁@正常】
主人把你留下来了,你可要好好谢谢主人
!
-
【女园丁@正常】
【1】把你留下来了,你可要好好谢谢【1】
!
-
【女园丁@正常】
你还是选择把它留下来了,主人你
有一颗善良的心灵……
-
【女园丁@正常】
【2】还是选择把它留下来了,【1】【2】
有一颗善良的心灵……
#宠物排序
#宠物排序
pet_set_position_pet_success
:
pet_set_position_pet_success
:
-
【女园丁@正常】这样移动,我们的宠物战队看起来好像更强了!
-
【女园丁@正常】这样移动,我们的宠物战队看起来好像更强了!
-
【女园丁@正常】
主人
的排兵布阵,一定能打败更多的战队!
-
【女园丁@正常】
【1】
的排兵布阵,一定能打败更多的战队!
-
【女园丁@正常】我们的宠物战队感觉蓄势待发,看来都想要和别的战队一决雌雄了!
-
【女园丁@正常】我们的宠物战队感觉蓄势待发,看来都想要和别的战队一决雌雄了!
pet_set_position_pet_fail_no_pet
:
pet_set_position_pet_fail_no_pet
:
-
【女园丁@正常】我们没有这样的宠物哦
主人
。
-
【女园丁@正常】我们没有这样的宠物哦
【1】
。
-
【女园丁@正常】可以试试种植特定植物,吸引这只动物来。
-
【女园丁@正常】可以试试种植特定植物,吸引这只动物来。
-
【女园丁@正常】有指定的宠物才能移动位置。
-
【女园丁@正常】有指定的宠物才能移动位置。
pet_set_position_pet_fail_full
:
pet_set_position_pet_fail_full
:
-
【女园丁@正常】这个宠物栏上住着别的小动物,它可不愿意和别人分享自己的地盘!
-
【女园丁@正常】这个宠物栏上住着别的小动物,它可不愿意和别人分享自己的地盘!
-
【女园丁@正常】要先把宠物栏空出来才能移动的,
主人
。
-
【女园丁@正常】要先把宠物栏空出来才能移动的,
【1】
。
-
【女园丁@正常】等宠物栏空了再尝试移动吧
主人
。
-
【女园丁@正常】等宠物栏空了再尝试移动吧
【1】
。
pet_set_position_field_success
:
pet_set_position_field_success
:
-
【女园丁@正常】欢迎你来入住我们的宠物栏啊,小家伙。
-
【女园丁@正常】欢迎你来入住我们的宠物栏啊,小家伙。
-
【女园丁@正常】战斗辛苦了小家伙,先回宠物栏休养生息吧。
-
【女园丁@正常】战斗辛苦了小家伙,先回宠物栏休养生息吧。
-
【女园丁@正常】
主人,已经按照你
所说的移动完成了。
-
【女园丁@正常】
【1】,已经按照【2】
所说的移动完成了。
pet_set_position_field_fail
:
pet_set_position_field_fail
:
-
【女园丁@正常】这个宠物栏里没有宠物,不能移动哦。
-
【女园丁@正常】这个宠物栏里没有宠物,不能移动哦。
-
【女园丁@正常】这里还没有宠物了,
主人,我帮不了你
了!
-
【女园丁@正常】这里还没有宠物了,
【1】,我帮不了【2】
了!
-
【女园丁@正常】这里需要有宠物才能再移动哦,
主人
。
-
【女园丁@正常】这里需要有宠物才能再移动哦,
【1】
。
pet_set_position_fail_no_pos
:
pet_set_position_fail_no_pos
:
-
【女园丁@正常】
主人
告诉我想移动到哪个位置,就可以帮你啦。
-
【女园丁@正常】
【1】
告诉我想移动到哪个位置,就可以帮你啦。
pet_set_position_fail_wrong_pos
:
pet_set_position_fail_wrong_pos
:
-
【女园丁@正常】搞错位置啦
主人
。
-
【女园丁@正常】搞错位置啦
【1】
。
pet_set_position_fail_no_name
:
pet_set_position_fail_no_name
:
-
【女园丁@正常】
主人,你
还没告诉我宠物名称呀。
-
【女园丁@正常】
【1】,【2】
还没告诉我宠物名称呀。
pet_set_position_fail_wrong_name
:
pet_set_position_fail_wrong_name
:
-
【女园丁@正常】
你说错宠物名称啦,我的主人
。
-
【女园丁@正常】
【2】说错宠物名称啦,我的【1】
。
pet_set_position_fail_no_data
:
pet_set_position_fail_no_data
:
-
【女园丁@正常】还不知道
主人
想怎么做呀。
-
【女园丁@正常】还不知道
【1】
想怎么做呀。
pet_switch_success
:
pet_switch_success
:
-
【女园丁@正常】换来换去的,把它们都给换晕了吧……要记住自己的新窝哦。
-
【女园丁@正常】换来换去的,把它们都给换晕了吧……要记住自己的新窝哦。
-
【女园丁@正常】哈哈,希望它们以后回窝不要找错位置。
-
【女园丁@正常】哈哈,希望它们以后回窝不要找错位置。
-
【女园丁@正常】
主人
的选择一定是最正确的。
-
【女园丁@正常】
【1】
的选择一定是最正确的。
pet_switch_fail_no_pet
:
pet_switch_fail_no_pet
:
-
【女园丁@正常】它们已经习惯了现在的窝,不换也挺好的。
-
【女园丁@正常】它们已经习惯了现在的窝,不换也挺好的。
-
【女园丁@正常】
主人
可以看看其他宠物栏的状况,再决定换不换位置。
-
【女园丁@正常】
【1】
可以看看其他宠物栏的状况,再决定换不换位置。
-
【女园丁@正常】
主人
是记错宠物了吗?可以再看看别的宠物。
-
【女园丁@正常】
【1】
是记错宠物了吗?可以再看看别的宠物。
pet_switch_fail_over
:
pet_switch_fail_over
:
-
【女园丁@正常】
主人,你
说的位置越界了哦。
-
【女园丁@正常】
【1】,【2】
说的位置越界了哦。
pet_switch_fail_set_error
:
pet_switch_fail_set_error
:
-
【女园丁@正常】看来是
主人
记错了哦,宠物栏没有这只宠物的。
-
【女园丁@正常】看来是
【1】
记错了哦,宠物栏没有这只宠物的。
pet_switch_fail_no_pos
:
pet_switch_fail_no_pos
:
-
【女园丁@正常】不知道位置的话,不知道要怎么换呀。
-
【女园丁@正常】不知道位置的话,不知道要怎么换呀。
pet_switch_fail_same_set
:
pet_switch_fail_same_set
:
...
@@ -438,29 +438,29 @@ woman:
...
@@ -438,29 +438,29 @@ woman:
pet_check_few
:
pet_check_few
:
-
【女园丁@正常】就这么几只宠物太孤单了,看来我们要多种植一些植物再吸引新的宠物来,好让他们有玩耍的同伴!
-
【女园丁@正常】就这么几只宠物太孤单了,看来我们要多种植一些植物再吸引新的宠物来,好让他们有玩耍的同伴!
pet_check_fail_no_pet
:
pet_check_fail_no_pet
:
-
【女园丁@正常】
主人
,宠物栏中还没有宠物哦,我们可以放一些进去。
-
【女园丁@正常】
【1】
,宠物栏中还没有宠物哦,我们可以放一些进去。
#查看花圃宠物状况
#查看花圃宠物状况
nursery_pet_check_free
:
nursery_pet_check_free
:
-
【女园丁@正常】看来我们还可以再去多吸引一些宠物过来!
-
【女园丁@正常】看来我们还可以再去多吸引一些宠物过来!
nursery_pet_check_no_free
:
nursery_pet_check_no_free
:
-
【女园丁@正常】我们竟然已经吸引来这么多可爱的小宠物了,这都是
主人你
的功劳啊。
-
【女园丁@正常】我们竟然已经吸引来这么多可爱的小宠物了,这都是
【1】【2】
的功劳啊。
#宠物总览查询
#宠物总览查询
pet_overview_both
:
pet_overview_both
:
-
【女园丁@正常】宠物栏和花圃中都有宠物了耶,
主人
实力相当可以呀。
-
【女园丁@正常】宠物栏和花圃中都有宠物了耶,
【1】
实力相当可以呀。
pet_overview_only_field
:
pet_overview_only_field
:
-
【女园丁@正常】宠物栏有了,花圃还没有,
主人
再接再厉哦,可以种植后等待植物成熟就可能有新宠物来了。
-
【女园丁@正常】宠物栏有了,花圃还没有,
【1】
再接再厉哦,可以种植后等待植物成熟就可能有新宠物来了。
pet_overview_only_nursery
:
pet_overview_only_nursery
:
-
【女园丁@正常】宠物栏中还没有宠物哦,为了守护自己的花园,
主人
可以把花圃的宠物放到宠物栏。
-
【女园丁@正常】宠物栏中还没有宠物哦,为了守护自己的花园,
【1】
可以把花圃的宠物放到宠物栏。
#查看指定花圃宠物
#查看指定花圃宠物
pet_check_by_num
:
pet_check_by_num
:
-
【女园丁@正常】去看看吧,我都已经迫不及待了。
-
【女园丁@正常】去看看吧,我都已经迫不及待了。
pet_check_by_num_fail_no_num
:
pet_check_by_num_fail_no_num
:
-
【女园丁@正常】
主人,你
要先告诉我花圃编号哦。
-
【女园丁@正常】
【1】,【2】
要先告诉我花圃编号哦。
pet_check_by_num_fail_wrong_num
:
pet_check_by_num_fail_wrong_num
:
-
【女园丁@正常】没有这样的花圃呢,换一个试试吧。
-
【女园丁@正常】没有这样的花圃呢,换一个试试吧。
pet_check_by_num_fail_no_pet
:
pet_check_by_num_fail_no_pet
:
-
【女园丁@正常】哎呀,花圃中还没有宠物,
主人
可以将宠物栏中的宠物放在这个花圃中,或是等待植物成熟后看看有没有宠物被吸引过来吧。
-
【女园丁@正常】哎呀,花圃中还没有宠物,
【1】
可以将宠物栏中的宠物放在这个花圃中,或是等待植物成熟后看看有没有宠物被吸引过来吧。
pet_check_by_num_sure
:
pet_check_by_num_sure
:
-
【女园丁@正常】还行还行,
主人
继续加油哦。
-
【女园丁@正常】还行还行,
【1】
继续加油哦。
pet_check_by_num_cancel
:
pet_check_by_num_cancel
:
-
【女园丁@正常】那我们下次再看看吧。
-
【女园丁@正常】那我们下次再看看吧。
\ No newline at end of file
src/main/resources/speech/plant.yaml
View file @
290107a1
...
@@ -17,8 +17,10 @@ aside:
...
@@ -17,8 +17,10 @@ aside:
-
【旁白@正常】背包里没有可在花圃【1】种植的物品。
-
【旁白@正常】背包里没有可在花圃【1】种植的物品。
plant_fail_seed
:
plant_fail_seed
:
-
【旁白@正常】背包里的【1】数量不够,目前有【2】个,需要【3】个才能种植,无法进行播种。
-
【旁白@正常】背包里的【1】数量不够,目前有【2】个,需要【3】个才能种植,无法进行播种。
plant_fail_planted
:
plant_fail_planted_hava_free
:
-
【旁白@正常】这块花圃已经种了【1】,种植失败。
-
【旁白@正常】这块花圃已经种了【1】,种植失败。可在花圃【2】中种植。
plant_fail_planted_no_free
:
-
【旁白@正常】这块花圃已经种了【1】,种植失败。目前还没有花圃可种植。
plant_fail_nursery_level
:
plant_fail_nursery_level
:
-
【旁白@正常】花圃种植【1】需要达到等级【2】,目前花圃等级为【3】,种植失败。
-
【旁白@正常】花圃种植【1】需要达到等级【2】,目前花圃等级为【3】,种植失败。
plant_fail_nursery_type
:
plant_fail_nursery_type
:
...
@@ -112,23 +114,25 @@ aside:
...
@@ -112,23 +114,25 @@ aside:
-
【旁白@正常】花圃【1】的果实已经成熟可以摘取!
-
【旁白@正常】花圃【1】的果实已经成熟可以摘取!
-
【旁白@正常】花圃【1】硕果累累,可以摘取了!
-
【旁白@正常】花圃【1】硕果累累,可以摘取了!
nursery_pet
:
nursery_pet
:
-
【旁白@正常】
,【1】
来了【2】只神秘的动物。
-
【旁白@正常】
【1】种植过的植物吸引
来了【2】只神秘的动物。
nursery_level
:
nursery_level
:
-
【旁白@正常】花圃【1】的等级目前为【2】级,类型为【3】。
-
【旁白@正常】花圃【1】的等级目前为【2】级,类型为【3】。
nursery_fail_no_nursery
:
nursery_fail_no_nursery
:
-
【旁白@正常】你还提供没有花圃编号,目前有【1】。
-
【旁白@正常】你还提供没有花圃编号,目前有【1】。
nursery_all_fail_no_plant
:
nursery_all_fail_no_plant
:
-
【旁白@正常】所有花圃还未种植。
-
【旁白@正常】所有花圃还未种植。
nursery_all_check
:
-
【旁白@正常】【1】。
nursery_all_seeding
:
nursery_all_seeding
:
-
中的
植物
刚刚播种了,
-
中的
【1】
刚刚播种了,
nursery_all_sowing
:
nursery_all_sowing
:
-
中的
植物
刚刚发出嫩芽,
-
中的
【1】
刚刚发出嫩芽,
nursery_all_growing
:
nursery_all_growing
:
-
中的
植物
正在茁壮成长,
-
中的
【1】
正在茁壮成长,
nursery_all_blooming
:
nursery_all_blooming
:
-
中的
植物
已经开花,
-
中的
【1】
已经开花,
nursery_all_mature
:
nursery_all_mature
:
-
中的
植物
已经成熟,
-
中的
【1】
已经成熟,
#铲除植物
#铲除植物
clear_plant_check
:
clear_plant_check
:
-
【旁白@正常】确定消耗【1】个货币,铲除花圃【2】上的植物吗?
-
【旁白@正常】确定消耗【1】个货币,铲除花圃【2】上的植物吗?
...
@@ -302,25 +306,25 @@ man:
...
@@ -302,25 +306,25 @@ man:
-
【男园丁@正常】【1】【2】可真是幸运啊!
-
【男园丁@正常】【1】【2】可真是幸运啊!
-
【男园丁@正常】真不错,【1】,我们下次种植也要再接再厉啊!
-
【男园丁@正常】真不错,【1】,我们下次种植也要再接再厉啊!
harvest_fail_mature
:
harvest_fail_mature
:
-
【男园丁@正常】
主人,你
不如先去别的地方转转?过会儿再来收取。
-
【男园丁@正常】
【1】,【2】
不如先去别的地方转转?过会儿再来收取。
harvest_fail_mature_nursery
:
harvest_fail_mature_nursery
:
-
【男园丁@正常】
主人
,植物离成熟期还有一段时间,不如你先去别的花圃看看。
-
【男园丁@正常】
【1】
,植物离成熟期还有一段时间,不如你先去别的花圃看看。
harvest_fail_mature_all
:
harvest_fail_mature_all
:
-
【男园丁@正常】
主人
,我们所有花圃中的植物都还没成熟!再耐心等待一段时间吧!
-
【男园丁@正常】
【1】
,我们所有花圃中的植物都还没成熟!再耐心等待一段时间吧!
harvest_fail_plant
:
harvest_fail_plant
:
-
【男园丁@正常】哈哈,
主人你
忘了吗?我们花圃可没种这种东西……
-
【男园丁@正常】哈哈,
【1】【2】
忘了吗?我们花圃可没种这种东西……
harvest_fail_plant_nursery
:
harvest_fail_plant_nursery
:
-
【男园丁@正常】这里没东西啊……现在种一些植物进去,
主人你
看怎么样?
-
【男园丁@正常】这里没东西啊……现在种一些植物进去,
【1】【2】
看怎么样?
harvest_fail_plant_all
:
harvest_fail_plant_all
:
-
【男园丁@正常】
主人你
又忘了吗?我们的花圃里还没有种植植物,想要收获东西的话赶快种植吧!
-
【男园丁@正常】
【1】【2】
又忘了吗?我们的花圃里还没有种植植物,想要收获东西的话赶快种植吧!
harvest_fail_usable
:
harvest_fail_usable
:
-
【男园丁@正常】这块花圃……我们还没有开启权限呢。要先开启,才能种植哦
主人
!
-
【男园丁@正常】这块花圃……我们还没有开启权限呢。要先开启,才能种植哦
【1】
!
#查看花圃数量
#查看花圃数量
nursery_amount_check
:
nursery_amount_check
:
-
【男园丁@正常】提高等级后就能开启新的花圃,再接再厉吧。
-
【男园丁@正常】提高等级后就能开启新的花圃,再接再厉吧。
#查看花圃概览信息
#查看花圃概览信息
check_nursery_fail_no_num
:
check_nursery_fail_no_num
:
-
【男园丁@正常】请问
主人
想要查看的是哪个花圃?
-
【男园丁@正常】请问
【1】
想要查看的是哪个花圃?
check_nursery_info_have_plant_no_pet
:
check_nursery_info_have_plant_no_pet
:
-
【男园丁@正常】再耐心等一等,说不定就有宠物出现了。
-
【男园丁@正常】再耐心等一等,说不定就有宠物出现了。
check_nursery_info_no_plant_have_pet
:
check_nursery_info_no_plant_have_pet
:
...
@@ -329,116 +333,116 @@ man:
...
@@ -329,116 +333,116 @@ man:
-
【男园丁@正常】空地是吸引不了宠物的,还是要先种植植物才行。
-
【男园丁@正常】空地是吸引不了宠物的,还是要先种植植物才行。
#查看花圃状态
#查看花圃状态
nursery_status
:
nursery_status
:
-
【男园丁@正常】花园在
主人
井井有条的打理下,所有花圃的植物都在茁壮成长!
-
【男园丁@正常】花园在
【1】
井井有条的打理下,所有花圃的植物都在茁壮成长!
-
【男园丁@正常】又是美好的一天,让我们静静等待植物成熟吧。
-
【男园丁@正常】又是美好的一天,让我们静静等待植物成熟吧。
-
【男园丁@正常】能和
主人
一起陪伴着植物们长大,我真的很开心!
-
【男园丁@正常】能和
【1】
一起陪伴着植物们长大,我真的很开心!
nursery_pet
:
nursery_pet
:
-
【男园丁@正常】
主人
感兴趣的话快去看看吧!
-
【男园丁@正常】
【1】
感兴趣的话快去看看吧!
-
【男园丁@正常】
主人
喜欢动物的话,可以去看看。
-
【男园丁@正常】
【1】
喜欢动物的话,可以去看看。
-
【男园丁@正常】不知道这次来的是什么动物啊……
-
【男园丁@正常】不知道这次来的是什么动物啊……
nursery_level
:
nursery_level
:
-
【男园丁@正常】
主人
,等级越高种植权限就越大,赶快去升级吧!
-
【男园丁@正常】
【1】
,等级越高种植权限就越大,赶快去升级吧!
nursery_level_fail_usable
:
nursery_level_fail_usable
:
-
【男园丁@正常】
主人
,花圃还未开启,等级还看不了!
-
【男园丁@正常】
【1】
,花圃还未开启,等级还看不了!
nursery_fail_plant
:
nursery_fail_plant
:
-
【男园丁@正常】
主人
,花圃是空的,先种点什么吧。
-
【男园丁@正常】
【1】
,花圃是空的,先种点什么吧。
nursery_fail_no_nursery
:
nursery_fail_no_nursery
:
-
【男园丁@正常】
主人,你
还没告诉我想看哪个花圃呢。
-
【男园丁@正常】
【1】,【2】
还没告诉我想看哪个花圃呢。
nursery_fail_no_exist
:
nursery_fail_no_exist
:
-
【男园丁@正常】
主人
,我们是没有这个花圃的。
-
【男园丁@正常】
【1】
,我们是没有这个花圃的。
nursery_all_fail_no_plant
:
nursery_all_fail_no_plant
:
-
【男园丁@正常】没有的话就先种点什么吧。
-
【男园丁@正常】没有的话就先种点什么吧。
#铲除植物
#铲除植物
clear_plant_check
:
clear_plant_check
:
-
【男园丁@正常】
主人,这样做会清空花圃里所有的东西哦……主人
真的想好了吗?
-
【男园丁@正常】
【1】,这样做会清空花圃里所有的东西哦……【1】
真的想好了吗?
clear_plant_check_mature
:
clear_plant_check_mature
:
-
【男园丁@正常】这块花圃里种的植物已经成熟了,你要先收获再铲除吗?
-
【男园丁@正常】这块花圃里种的植物已经成熟了,你要先收获再铲除吗?
clear_plant_success
:
clear_plant_success
:
-
【男园丁@正常】目前这块花圃干干净净什么都没有了,
主人
赶快来种下新的植物吧!
-
【男园丁@正常】目前这块花圃干干净净什么都没有了,
【1】
赶快来种下新的植物吧!
-
【男园丁@正常】已经可以了,花圃现在又变成了空地,
主人你
想种点新的植物下去吗?
-
【男园丁@正常】已经可以了,花圃现在又变成了空地,
【1】【2】
想种点新的植物下去吗?
clear_plant_fail_plant
:
clear_plant_fail_plant
:
-
【男园丁@正常】
主人
,花圃空空如也,你还是先种点东西下去吧!
-
【男园丁@正常】
【1】
,花圃空空如也,你还是先种点东西下去吧!
clear_plant_fail_money
:
clear_plant_fail_money
:
-
【男园丁@正常】
主人,钱
不够啊。
-
【男园丁@正常】
【1】【2】的【3】
不够啊。
clear_plant_fail_no_nursery
:
clear_plant_fail_no_nursery
:
-
【男园丁@正常】
主人
,你还没说花圃编号呢。
-
【男园丁@正常】
【1】
,你还没说花圃编号呢。
clear_after_harvest
:
clear_after_harvest
:
-
【男园丁@正常】已经按照
主人
的吩咐,收取果实后铲除了植物,现在可以种植新的植物了。
-
【男园丁@正常】已经按照
【1】
的吩咐,收取果实后铲除了植物,现在可以种植新的植物了。
clear_plant_cancel
:
clear_plant_cancel
:
-
【男园丁@正常】好,就按
主人
说的办。
-
【男园丁@正常】好,就按
【1】
说的办。
#升级花圃
#升级花圃
search_nursery_to_type
:
search_nursery_to_type
:
-
【男园丁@正常】
主人
想要哪一种类型?
-
【男园丁@正常】
【1】
想要哪一种类型?
search_upgrade_condition
:
search_upgrade_condition
:
-
【男园丁@正常】确定升级吗
主人
?
-
【男园丁@正常】确定升级吗
【1】
?
search_upgrade_condition_fail_no_type
:
search_upgrade_condition_fail_no_type
:
-
【男园丁@正常】
主人,你
还没选择花圃类型。
-
【男园丁@正常】
【1】,【2】
还没选择花圃类型。
search_upgrade_condition_fail_not_exist
:
search_upgrade_condition_fail_not_exist
:
-
【男园丁@正常】
主人,你
说错花圃类型了,要不再试试。
-
【男园丁@正常】
【1】,【2】
说错花圃类型了,要不再试试。
nursery_upgrade_success
:
nursery_upgrade_success
:
-
【男园丁@正常】该花圃成功升级了,
主人你
可真厉害!
-
【男园丁@正常】该花圃成功升级了,
【1】【2】
可真厉害!
nursery_upgrade_succeed
:
nursery_upgrade_succeed
:
-
【男园丁@正常】该花圃升级过了,
主人
。
-
【男园丁@正常】该花圃升级过了,
【1】
。
nursery_upgrade_fail_nursery
:
nursery_upgrade_fail_nursery
:
-
【男园丁@正常】我们没有这块花圃,无法为其进行升级哦
主人
。
-
【男园丁@正常】我们没有这块花圃,无法为其进行升级哦
【1】
。
-
【男园丁@正常】开启花圃之后,才能进行升级。
-
【男园丁@正常】开启花圃之后,才能进行升级。
-
【男园丁@正常】不先开启花圃的话,是不能升级的。
-
【男园丁@正常】不先开启花圃的话,是不能升级的。
nursery_upgrade_fail_planted
:
nursery_upgrade_fail_planted
:
-
【男园丁@正常】我们还是先去多种植几次再来吧,
主人
。
-
【男园丁@正常】我们还是先去多种植几次再来吧,
【1】
。
nursery_upgrade_fail_item
:
nursery_upgrade_fail_item
:
-
【男园丁@正常】该物品数量不足,无法进行升级呢
主人……我还是陪主人你
再去找找吧。
-
【男园丁@正常】该物品数量不足,无法进行升级呢
【1】……我还是陪【1】【2】
再去找找吧。
nursery_upgrade_fail_no_nursery
:
nursery_upgrade_fail_no_nursery
:
-
【男园丁@正常】
主人
,你还没有提供花圃编号,还升级不了。
-
【男园丁@正常】
【1】
,你还没有提供花圃编号,还升级不了。
nursery_upgrade_fail_usable
:
nursery_upgrade_fail_usable
:
-
【男园丁@正常】
主人
,想升级的话,我们先把花圃开启吧。
-
【男园丁@正常】
【1】
,想升级的话,我们先把花圃开启吧。
nursery_upgrade_fail_type
:
nursery_upgrade_fail_type
:
-
【男园丁@正常】没有这类花圃哦,
主人
要不你再看一下。
-
【男园丁@正常】没有这类花圃哦,
【1】
要不你再看一下。
nursery_upgrade_fail_money
:
nursery_upgrade_fail_money
:
-
【男园丁@正常】【
1】数量不足,无法进行升级呢主人……我还是陪主人你
再去找找吧。
-
【男园丁@正常】【
3】数量不足,无法进行升级呢【1】……我还是陪【1】【2】
再去找找吧。
nursery_upgrade_fail_material
:
nursery_upgrade_fail_material
:
-
【男园丁@正常】【
1】数量不足,无法进行升级呢主人……我还是陪主人你
再去找找吧。
-
【男园丁@正常】【
3】数量不足,无法进行升级呢【1】……我还是陪【1】【2】
再去找找吧。
nursery_upgrade_fail_no_type
:
nursery_upgrade_fail_no_type
:
-
【男园丁@正常】
主人
,没有可选择的花圃类型了。
-
【男园丁@正常】
【1】
,没有可选择的花圃类型了。
#重置花圃
#重置花圃
nursery_reset_check
:
nursery_reset_check
:
-
【男园丁@正常】价位有些高……
主人你
确定要这么做吗?
-
【男园丁@正常】价位有些高……
【1】【2】
确定要这么做吗?
nursery_reset_check_mature
:
nursery_reset_check_mature
:
-
【男园丁@正常】
你
真的要这么做吗?
-
【男园丁@正常】
【1】【2】
真的要这么做吗?
nursery_reset_success_no_plant
:
nursery_reset_success_no_plant
:
-
【男园丁@正常】
你现在可以在花圃上种植新的东西了!让我们从头再来吧主人
!
-
【男园丁@正常】
【2】现在可以在花圃上种植新的东西了!让我们从头再来吧【1】
!
nursery_reset_success_have_plant
:
nursery_reset_success_have_plant
:
-
【男园丁@正常】这片花圃又变回最初的样子了,让我们一起重新再来创造它吧
主人
!
-
【男园丁@正常】这片花圃又变回最初的样子了,让我们一起重新再来创造它吧
【1】
!
nursery_reset_succeed
:
nursery_reset_succeed
:
-
【男园丁@正常】
主人,你
已经重置过花圃了。
-
【男园丁@正常】
【1】,【2】
已经重置过花圃了。
nursery_reset_fail_money
:
nursery_reset_fail_money
:
-
【男园丁@正常】
主人我们再去多赚点货币
吧。
-
【男园丁@正常】
【1】我们再去多赚点【3】
吧。
nursery_reset_fail_usable
:
nursery_reset_fail_usable
:
-
【男园丁@正常】
主人,你
忘了这个花圃还没开启。
-
【男园丁@正常】
【1】,【2】
忘了这个花圃还没开启。
nursery_reset_fail_no_nursery
:
nursery_reset_fail_no_nursery
:
-
【男园丁@正常】我们花园目前拥有【
1】块花圃,主人
是想重置哪一块呢?
-
【男园丁@正常】我们花园目前拥有【
3】块花圃,【1】【2】
是想重置哪一块呢?
nursery_reset_fail_nursery_no_exist
:
nursery_reset_fail_nursery_no_exist
:
-
【男园丁@正常】
主人
,再试试重置其他花圃吧。
-
【男园丁@正常】
【1】
,再试试重置其他花圃吧。
#开启花圃
#开启花圃
nursery_reclaim_check
:
nursery_reclaim_check
:
-
【男园丁@正常】搜集【
1】的目的就是为了用在这些事情上,不过这还是要看主人的个人意愿。你想要花费【1
】开启花圃吗?
-
【男园丁@正常】搜集【
3】的目的就是为了用在这些事情上,不过这还是要看【1】的个人意愿。【2】想要花费【3
】开启花圃吗?
nursery_reclaim_success
:
nursery_reclaim_success
:
-
【男园丁@正常】我就知道有你在,我们的花园建设的会越来越好。
-
【男园丁@正常】我就知道有你在,我们的花园建设的会越来越好。
nursery_reclaim_fail_num
:
nursery_reclaim_fail_num
:
-
【男园丁@正常】暂时不能再开启新的花圃,因为
主人现在所拥有的花圃已经是数量最多的!主人
真厉害啊!
-
【男园丁@正常】暂时不能再开启新的花圃,因为
【1】现在所拥有的花圃已经是数量最多的!【1】
真厉害啊!
-
【男园丁@正常】
主人
现在所拥有的花圃已经是数量最多的,这些成果在我看来真的很厉害。
-
【男园丁@正常】
【1】
现在所拥有的花圃已经是数量最多的,这些成果在我看来真的很厉害。
nursery_reclaim_fail_money
:
nursery_reclaim_fail_money
:
-
【男园丁@正常】想要开启新花圃,我们的【
1】还差一点,主人我们先去赚些【1
】再来吧!
-
【男园丁@正常】想要开启新花圃,我们的【
3】还差一点,【1】我们先去赚些【3
】再来吧!
#查看植物成熟时间
#查看植物成熟时间
check_plant_mature_time_success
:
check_plant_mature_time_success
:
-
【男园丁@正常】
主人
,可以去采摘了。
-
【男园丁@正常】
【1】
,可以去采摘了。
check_plant_mature_time_fail_no_mature
:
check_plant_mature_time_fail_no_mature
:
-
【男园丁@正常】还没有熟,晚点再来看看吧。
-
【男园丁@正常】还没有熟,晚点再来看看吧。
check_plant_mature_time_fail_no_plant
:
check_plant_mature_time_fail_no_plant
:
-
【男园丁@正常】我们可以在花圃里先种点东西。
-
【男园丁@正常】我们可以在花圃里先种点东西。
check_plant_mature_time_fail_no_num
:
check_plant_mature_time_fail_no_num
:
-
【男园丁@正常】
主人
,你还告诉我想看哪个花圃的植物呢?
-
【男园丁@正常】
【1】
,你还告诉我想看哪个花圃的植物呢?
check_plant_mature_time_fail_plant_not_exist
:
check_plant_mature_time_fail_plant_not_exist
:
-
【男园丁@正常】
主人
,要不我们先去种点这个。
-
【男园丁@正常】
【1】
,要不我们先去种点这个。
...
@@ -447,9 +451,9 @@ woman:
...
@@ -447,9 +451,9 @@ woman:
plant_confirm
:
plant_confirm
:
-
【女园丁@正常】我也觉得可以这样种植。
-
【女园丁@正常】我也觉得可以这样种植。
plant_cancel
:
plant_cancel
:
-
【女园丁@正常】好的
主人
,我们下次再种吧。
-
【女园丁@正常】好的
【1】
,我们下次再种吧。
plant_success
:
plant_success
:
-
【女园丁@正常】真期待以后和
主人
一起看到它成熟的样子……
-
【女园丁@正常】真期待以后和
【1】
一起看到它成熟的样子……
-
【女园丁@正常】真好啊,这样它就能慢慢长大了。
-
【女园丁@正常】真好啊,这样它就能慢慢长大了。
-
【女园丁@正常】过一段时间它就会慢慢成熟了……
-
【女园丁@正常】过一段时间它就会慢慢成熟了……
plant_fail_seed_none
:
plant_fail_seed_none
:
...
@@ -458,23 +462,23 @@ woman:
...
@@ -458,23 +462,23 @@ woman:
-
【女园丁@正常】没关系,我们再去找一点。
-
【女园丁@正常】没关系,我们再去找一点。
plant_fail_seed
:
plant_fail_seed
:
-
【女园丁@正常】晕……居然是没有库存了,我们再去买点吧。
-
【女园丁@正常】晕……居然是没有库存了,我们再去买点吧。
-
【女园丁@正常】去市场买点种子再来种植吧
主人
!
-
【女园丁@正常】去市场买点种子再来种植吧
【1】
!
-
【女园丁@正常】我们的库存竟然已经这么少了吗?快去买点吧
主人
!
-
【女园丁@正常】我们的库存竟然已经这么少了吗?快去买点吧
【1】
!
plant_fail_planted
:
plant_fail_planted
:
-
【女园丁@正常】
主人
,我们之前已经在这块花圃上种了别的植物了,换一块试试吧!
-
【女园丁@正常】
【1】
,我们之前已经在这块花圃上种了别的植物了,换一块试试吧!
-
【女园丁@正常】找一找空闲的花圃吧。
-
【女园丁@正常】找一找空闲的花圃吧。
-
【女园丁@正常】我们还有其他的花圃啊!再去种植试试吧!
-
【女园丁@正常】我们还有其他的花圃啊!再去种植试试吧!
plant_fail_nursery_level
:
plant_fail_nursery_level
:
-
【女园丁@正常】我们的花圃等级还差一点点就够升级了……主要我会陪
你
一起加油升级的!
-
【女园丁@正常】我们的花圃等级还差一点点就够升级了……主要我会陪
【2】
一起加油升级的!
-
【女园丁@正常】不要灰心!我会陪着
主人
一起给花圃升级的!
-
【女园丁@正常】不要灰心!我会陪着
【1】
一起给花圃升级的!
-
【女园丁@正常】没关系,只要
主人
每天都来管理花圃,我相信再过不久花圃就能升级了!
-
【女园丁@正常】没关系,只要
【1】
每天都来管理花圃,我相信再过不久花圃就能升级了!
plant_fail_nursery_type
:
plant_fail_nursery_type
:
-
【女园丁@正常】没关系,
主人
我们换一块花圃再种植吧!
-
【女园丁@正常】没关系,
【1】
我们换一块花圃再种植吧!
-
【女园丁@正常】看看其他的花圃吧。
-
【女园丁@正常】看看其他的花圃吧。
-
【女园丁@正常】有些植物比较特殊,只有在特定的花圃上才能种植。
-
【女园丁@正常】有些植物比较特殊,只有在特定的花圃上才能种植。
plant_fail_material
:
plant_fail_material
:
-
【女园丁@正常】
主人
不要灰心!我们再去找找材料吧!
-
【女园丁@正常】
【1】
不要灰心!我们再去找找材料吧!
-
【女园丁@正常】没再
主人的背包里看到这种材料呢……我陪主人
再去外面找找吧。
-
【女园丁@正常】没再
【1】的背包里看到这种材料呢……我陪【1】
再去外面找找吧。
-
【女园丁@正常】没关系,找到材料后我们还可以回来种植的。
-
【女园丁@正常】没关系,找到材料后我们还可以回来种植的。
plant_fail_no_near_plant
:
plant_fail_no_near_plant
:
-
【女园丁@正常】这种植物需要先种植另一种植物才可以呢。
-
【女园丁@正常】这种植物需要先种植另一种植物才可以呢。
...
@@ -482,24 +486,24 @@ woman:
...
@@ -482,24 +486,24 @@ woman:
-
【女园丁@正常】种植完伴生植物后,再来种植对应的植物吧!
-
【女园丁@正常】种植完伴生植物后,再来种植对应的植物吧!
plant_fail_pet
:
plant_fail_pet
:
-
【女园丁@正常】看来缺一不可啊!没关系,我们可以先种别的植物!
-
【女园丁@正常】看来缺一不可啊!没关系,我们可以先种别的植物!
-
【女园丁@正常】
主人
别灰心,我们可以先等到有这个动物后再来种植的!
-
【女园丁@正常】
【1】
别灰心,我们可以先等到有这个动物后再来种植的!
-
【女园丁@正常】等小动物来了我再跟
主人
一起种吧。
-
【女园丁@正常】等小动物来了我再跟
【1】
一起种吧。
plant_fail_gardener_level
:
plant_fail_gardener_level
:
-
【女园丁@正常】很抱歉!是我拖累了
主人
……
-
【女园丁@正常】很抱歉!是我拖累了
【1】
……
-
【女园丁@正常】果然目前的我还是不足以种植这种高阶植物,还是要好好升级啊。
-
【女园丁@正常】果然目前的我还是不足以种植这种高阶植物,还是要好好升级啊。
-
【女园丁@正常】我想要能种植更多的植物,还请
主人
帮助我一起升级!
-
【女园丁@正常】我想要能种植更多的植物,还请
【1】
帮助我一起升级!
plant_fail_skill
:
plant_fail_skill
:
-
【女园丁@正常】
主人,你
能帮助我学会这个技能吗?
-
【女园丁@正常】
【1】,【2】
能帮助我学会这个技能吗?
-
【女园丁@正常】原来要学习这个技能才能种植啊,
主人你
快帮我学习吧!
-
【女园丁@正常】原来要学习这个技能才能种植啊,
【1】【2】
快帮我学习吧!
-
【女园丁@正常】事不宜迟,
你赶快带我去学习技能吧主人
。
-
【女园丁@正常】事不宜迟,
【2】赶快带我去学习技能吧【1】
。
plant_fail_no_nursery
:
plant_fail_no_nursery
:
-
【女园丁@正常】
主人你
说的是哪一块花圃啊?
-
【女园丁@正常】
【1】【2】
说的是哪一块花圃啊?
plant_fail_no_plant_name
:
plant_fail_no_plant_name
:
-
【女园丁@正常】
主人,你
想种植什么植物呢?可以告诉我植物名称哦。
-
【女园丁@正常】
【1】,【2】
想种植什么植物呢?可以告诉我植物名称哦。
-
【女园丁@正常】
主人,你还要告诉我植物名哦,这样才能帮你
种呢!
-
【女园丁@正常】
【1】,【2】还要告诉我植物名哦,这样才能帮【2】
种呢!
-
【女园丁@正常】要种什么呢?好期待啊。
-
【女园丁@正常】要种什么呢?好期待啊。
plant_fail_nursery_not_exist
:
plant_fail_nursery_not_exist
:
-
【女园丁@正常】没事,
主人
,还有其他花圃可以选择呢。
-
【女园丁@正常】没事,
【1】
,还有其他花圃可以选择呢。
plant_fail_plant_not_exist
:
plant_fail_plant_not_exist
:
-
【女园丁@正常】没有就没有,我们看看其他的吧。
-
【女园丁@正常】没有就没有,我们看看其他的吧。
plant_check_nursery_random
:
plant_check_nursery_random
:
...
@@ -508,28 +512,28 @@ woman:
...
@@ -508,28 +512,28 @@ woman:
-
【女园丁@正常】这个也不错耶。
-
【女园丁@正常】这个也不错耶。
#植物收获
#植物收获
harvest_success
:
harvest_success
:
-
【女园丁@正常】真让人惊喜,相信以后有
主人
在,我们还能收获更多的果实!
-
【女园丁@正常】真让人惊喜,相信以后有
【1】
在,我们还能收获更多的果实!
-
【女园丁@正常】这么多果实,
主人
的背包里又能被装满了!
-
【女园丁@正常】这么多果实,
【1】
的背包里又能被装满了!
-
【女园丁@正常】相信下一次也能收获更多的果实,我们一起加油吧
主人
!
-
【女园丁@正常】相信下一次也能收获更多的果实,我们一起加油吧
【1】
!
-
【女园丁@正常】一定是
主人
给我们的花圃带来了幸运!
-
【女园丁@正常】一定是
【1】
给我们的花圃带来了幸运!
-
【女园丁@正常】我们的努力付出没有白费,
主人你
辛苦了。
-
【女园丁@正常】我们的努力付出没有白费,
【1】【2】
辛苦了。
harvest_fail_mature
:
harvest_fail_mature
:
-
【女园丁@正常】
主人
别心急啊!先去别的地方看看,过会儿再来吧。
-
【女园丁@正常】
【1】
别心急啊!先去别的地方看看,过会儿再来吧。
harvest_fail_mature_nursery
:
harvest_fail_mature_nursery
:
-
【女园丁@正常】还没成熟呢
主人
,再耐心等一段时间吧。
-
【女园丁@正常】还没成熟呢
【1】
,再耐心等一段时间吧。
harvest_fail_mature_all
:
harvest_fail_mature_all
:
-
【女园丁@正常】距离植物成熟还有一段时间,再等等吧
主人
……
-
【女园丁@正常】距离植物成熟还有一段时间,再等等吧
【1】
……
harvest_fail_plant
:
harvest_fail_plant
:
-
【女园丁@正常】
主人你
又记错了,我们的花圃没种这种植物哦!
-
【女园丁@正常】
【1】【2】
又记错了,我们的花圃没种这种植物哦!
harvest_fail_plant_nursery
:
harvest_fail_plant_nursery
:
-
【女园丁@正常】这块花圃是空的,想要收获的话要先种下植物才行呢。
-
【女园丁@正常】这块花圃是空的,想要收获的话要先种下植物才行呢。
harvest_fail_plant_all
:
harvest_fail_plant_all
:
-
【女园丁@正常】花圃里空空如也,要想收获还要先种植!
-
【女园丁@正常】花圃里空空如也,要想收获还要先种植!
harvest_fail_usable
:
harvest_fail_usable
:
-
【女园丁@正常】要先开启这块花圃才能进行种植,
主人
赶快去开启吧!
-
【女园丁@正常】要先开启这块花圃才能进行种植,
【1】
赶快去开启吧!
#查看花圃数量
#查看花圃数量
nursery_amount_check
:
nursery_amount_check
:
-
【女园丁@正常】我会帮助
你
一起升级,我们早日解锁所有的花圃。
-
【女园丁@正常】我会帮助
【2】
一起升级,我们早日解锁所有的花圃。
#查看花圃概览信息
#查看花圃概览信息
check_nursery_fail_no_num
:
check_nursery_fail_no_num
:
-
【女园丁@正常】你想看的是我们花园里的哪一个花圃?
-
【女园丁@正常】你想看的是我们花园里的哪一个花圃?
...
@@ -543,23 +547,23 @@ woman:
...
@@ -543,23 +547,23 @@ woman:
nursery_status
:
nursery_status
:
-
【女园丁@正常】太阳当空照,花园乐淘淘,我们的花园正在往更好的方向发展呢!
-
【女园丁@正常】太阳当空照,花园乐淘淘,我们的花园正在往更好的方向发展呢!
-
【女园丁@正常】看见花园被打理的这么好,我真的很开心。
-
【女园丁@正常】看见花园被打理的这么好,我真的很开心。
-
【女园丁@正常】听我说谢谢你,因为有
主人你
,我们的花园变得越来越美丽!
-
【女园丁@正常】听我说谢谢你,因为有
【1】【2】
,我们的花园变得越来越美丽!
nursery_pet
:
nursery_pet
:
-
【女园丁@正常】我们的花圃吸引来了一只神秘动物,不知道长什么样,真是让人觉得好奇……
-
【女园丁@正常】我们的花圃吸引来了一只神秘动物,不知道长什么样,真是让人觉得好奇……
-
【女园丁@正常】我希望来的能是可爱的动物,嘿嘿。
-
【女园丁@正常】我希望来的能是可爱的动物,嘿嘿。
-
【女园丁@正常】真想去看看是什么动物,
主人
我们去吧!
-
【女园丁@正常】真想去看看是什么动物,
【1】
我们去吧!
nursery_level
:
nursery_level
:
-
【女园丁@正常】等级越高就种植的东西也就越多,我陪
主人
一起努力,争取早日解锁花圃的全部权限!
-
【女园丁@正常】等级越高就种植的东西也就越多,我陪
【1】
一起努力,争取早日解锁花圃的全部权限!
nursery_level_fail_usable
:
nursery_level_fail_usable
:
-
【女园丁@正常】
主人,我们还看不了等级,你
忘了还没有开启花圃了吗!
-
【女园丁@正常】
【1】,我们还看不了等级,【2】
忘了还没有开启花圃了吗!
nursery_fail_plant
:
nursery_fail_plant
:
-
【女园丁@正常】
主人
,花圃里还没有种植植物哦。
-
【女园丁@正常】
【1】
,花圃里还没有种植植物哦。
nursery_fail_no_nursery
:
nursery_fail_no_nursery
:
-
【女园丁@正常】
主人,你看哪个花圃可以告诉我,我陪你
去看。
-
【女园丁@正常】
【1】,【2】看哪个花圃可以告诉我,我陪【2】
去看。
nursery_fail_no_exist
:
nursery_fail_no_exist
:
-
【女园丁@正常】没有这个花圃耶,
主人
,我们看看其他的吧。
-
【女园丁@正常】没有这个花圃耶,
【1】
,我们看看其他的吧。
nursery_all_fail_no_plant
:
nursery_all_fail_no_plant
:
-
【女园丁@正常】
主人
,那我们先去种植吧。
-
【女园丁@正常】
【1】
,那我们先去种植吧。
#铲除植物
#铲除植物
clear_plant_check
:
clear_plant_check
:
-
【女园丁@正常】这块花圃还有未成熟的植物,真的要一起清空吗?确认之后就无法挽回了哦。
-
【女园丁@正常】这块花圃还有未成熟的植物,真的要一起清空吗?确认之后就无法挽回了哦。
...
@@ -567,89 +571,89 @@ woman:
...
@@ -567,89 +571,89 @@ woman:
-
【女园丁@正常】这块花圃里还有成熟的植物没收获,我的建议是先收获再清除,要不要听我的试试看?
-
【女园丁@正常】这块花圃里还有成熟的植物没收获,我的建议是先收获再清除,要不要听我的试试看?
clear_plant_success
:
clear_plant_success
:
-
【女园丁@正常】现在可以种新的植物了!
-
【女园丁@正常】现在可以种新的植物了!
-
【女园丁@正常】花圃里什么都没有了,可以再种新植物进去了哦
主人
。
-
【女园丁@正常】花圃里什么都没有了,可以再种新植物进去了哦
【1】
。
clear_plant_fail_plant
:
clear_plant_fail_plant
:
-
【女园丁@正常】花圃是空的,没有可以清除的东西!
主人,你
要不要先种点植物啊?
-
【女园丁@正常】花圃是空的,没有可以清除的东西!
【1】,【2】
要不要先种点植物啊?
clear_plant_fail_money
:
clear_plant_fail_money
:
-
【女园丁@正常】
钱不够哦主人
。
-
【女园丁@正常】
【2】的【3】不够哦【1】
。
clear_plant_fail_no_nursery
:
clear_plant_fail_no_nursery
:
-
【女园丁@正常】
主人,你
还没告诉人家花圃编号呢。
-
【女园丁@正常】
【1】,【2】
还没告诉人家花圃编号呢。
clear_after_harvest
:
clear_after_harvest
:
-
【女园丁@正常】
主人,我已经按你
吩咐的做了,花圃现在可以种植新的植物了。
-
【女园丁@正常】
【1】,我已经按【2】
吩咐的做了,花圃现在可以种植新的植物了。
clear_plant_cancel
:
clear_plant_cancel
:
-
【女园丁@正常】好呀,随
主人
心意。
-
【女园丁@正常】好呀,随
【1】
心意。
#升级花圃
#升级花圃
search_nursery_to_type
:
search_nursery_to_type
:
-
【女园丁@正常】
主人
希望升级成哪一种?
-
【女园丁@正常】
【1】
希望升级成哪一种?
search_upgrade_condition
:
search_upgrade_condition
:
-
【女园丁@正常】确认升级吗?
-
【女园丁@正常】确认升级吗?
search_upgrade_condition_fail_no_type
:
search_upgrade_condition_fail_no_type
:
-
【女园丁@正常】
主人
还没告诉我花圃类型呢。
-
【女园丁@正常】
【1】
还没告诉我花圃类型呢。
search_upgrade_condition_fail_not_exist
:
search_upgrade_condition_fail_not_exist
:
-
【女园丁@正常】
主人
可能记错了,没有这样的花圃类型呢。
-
【女园丁@正常】
【1】
可能记错了,没有这样的花圃类型呢。
nursery_upgrade_success
:
nursery_upgrade_success
:
-
【女园丁@正常】按照
主人的吩咐成功升级,我们的花圃权限又提高了一些,主人
辛苦了!
-
【女园丁@正常】按照
【1】的吩咐成功升级,我们的花圃权限又提高了一些,【1】
辛苦了!
nursery_upgrade_succeed
:
nursery_upgrade_succeed
:
-
【女园丁@正常】
主人
,该花圃已经升级过了。
-
【女园丁@正常】
【1】
,该花圃已经升级过了。
nursery_upgrade_fail_nursery
:
nursery_upgrade_fail_nursery
:
-
【女园丁@正常】哈哈哈
主人
又在开玩笑,我们根本没有这块花圃。
-
【女园丁@正常】哈哈哈
【1】
又在开玩笑,我们根本没有这块花圃。
-
【女园丁@正常】是花圃太多记错了吗?我们这块花圃还没解锁呢。
-
【女园丁@正常】是花圃太多记错了吗?我们这块花圃还没解锁呢。
-
【女园丁@正常】先去解锁开启花圃,再来做升级的工作吧!
-
【女园丁@正常】先去解锁开启花圃,再来做升级的工作吧!
nursery_upgrade_fail_planted
:
nursery_upgrade_fail_planted
:
-
【女园丁@正常】目前种植的次数还不足以升级这块花圃,要辛苦
主人
再多种几次,再来升级吧。
-
【女园丁@正常】目前种植的次数还不足以升级这块花圃,要辛苦
【1】
再多种几次,再来升级吧。
nursery_upgrade_fail_item
:
nursery_upgrade_fail_item
:
-
【女园丁@正常】升级还缺少相应物品,
主人
我们再去找找吧!
-
【女园丁@正常】升级还缺少相应物品,
【1】
我们再去找找吧!
nursery_upgrade_fail_no_nursery
:
nursery_upgrade_fail_no_nursery
:
-
【女园丁@正常】
主人,你
还没有提供花圃编号,还升级不了。
-
【女园丁@正常】
【1】,【2】
还没有提供花圃编号,还升级不了。
nursery_upgrade_fail_usable
:
nursery_upgrade_fail_usable
:
-
【女园丁@正常】呜,
主人
,花圃还没开启还不能升级呢。
-
【女园丁@正常】呜,
【1】
,花圃还没开启还不能升级呢。
nursery_upgrade_fail_type
:
nursery_upgrade_fail_type
:
-
【女园丁@正常】没有这种类型花圃哦,
主人
我们再看看吧。
-
【女园丁@正常】没有这种类型花圃哦,
【1】
我们再看看吧。
nursery_upgrade_fail_money
:
nursery_upgrade_fail_money
:
-
【女园丁@正常】啊,
主人,没【1】啦,我们先去存钱
吧。
-
【女园丁@正常】啊,
【1】,没【3】啦,我们先去存点
吧。
nursery_upgrade_fail_material
:
nursery_upgrade_fail_material
:
-
【女园丁@正常】可惜这种【
1】不够,不然就成功了,主人
,我们再去收集点。
-
【女园丁@正常】可惜这种【
3】不够,不然就成功了,【1】
,我们再去收集点。
nursery_upgrade_fail_no_type
:
nursery_upgrade_fail_no_type
:
-
【女园丁@正常】
主人
,没有找到可选择的花圃类型以供升级哦。
-
【女园丁@正常】
【1】
,没有找到可选择的花圃类型以供升级哦。
#重置花圃
#重置花圃
nursery_reset_check
:
nursery_reset_check
:
-
【女园丁@正常】这个价格可不低啊,
主人你
确定要重置吗??
-
【女园丁@正常】这个价格可不低啊,
【1】【2】
确定要重置吗??
nursery_reset_check_mature
:
nursery_reset_check_mature
:
-
【女园丁@正常】重置花圃会将目前在种的一起清除,这可是一笔不小的损失,
主人你
是认真的吗?
-
【女园丁@正常】重置花圃会将目前在种的一起清除,这可是一笔不小的损失,
【1】【2】
是认真的吗?
nursery_reset_success_no_plant
:
nursery_reset_success_no_plant
:
-
【女园丁@正常】花圃又回到了初始阶段,我们又只能从头再来了
主人
……
-
【女园丁@正常】花圃又回到了初始阶段,我们又只能从头再来了
【1】
……
nursery_reset_success_have_plant
:
nursery_reset_success_have_plant
:
-
【女园丁@正常】唉,又要从头再来升级了……
-
【女园丁@正常】唉,又要从头再来升级了……
nursery_reset_succeed
:
nursery_reset_succeed
:
-
【女园丁@正常】已经重置过花圃了啦,可以不用重置了哦。
-
【女园丁@正常】已经重置过花圃了啦,可以不用重置了哦。
nursery_reset_fail_money
:
nursery_reset_fail_money
:
-
【女园丁@正常】
主人我们没有这么多货币
重置啊……还是算了吧,真尴尬。
-
【女园丁@正常】
【1】我们没有这么多【3】
重置啊……还是算了吧,真尴尬。
nursery_reset_fail_usable
:
nursery_reset_fail_usable
:
-
【女园丁@正常】
主人
,这个花圃还没开启呢,可以不用重置哦。
-
【女园丁@正常】
【1】
,这个花圃还没开启呢,可以不用重置哦。
nursery_reset_fail_no_nursery
:
nursery_reset_fail_no_nursery
:
-
【女园丁@正常】
主人
现在拥有【1】块花圃,是想重置哪一块?
-
【女园丁@正常】
【1】【2】
现在拥有【1】块花圃,是想重置哪一块?
nursery_reset_fail_nursery_no_exist
:
nursery_reset_fail_nursery_no_exist
:
-
【女园丁@正常】
主人
,没有这样的花圃,重置不了呀。
-
【女园丁@正常】
【1】
,没有这样的花圃,重置不了呀。
#开启花圃
#开启花圃
nursery_reclaim_check
:
nursery_reclaim_check
:
-
【女园丁@正常】【
1】足够的情况下,可以选择这么做,主人你
确认开启新花圃吗?
-
【女园丁@正常】【
3】足够的情况下,可以选择这么做,【1】【2】
确认开启新花圃吗?
nursery_reclaim_success
:
nursery_reclaim_success
:
-
【女园丁@正常】花园变得更繁荣了,果然有
主人
在,做什么事情都会变得游刃有余!
-
【女园丁@正常】花园变得更繁荣了,果然有
【1】
在,做什么事情都会变得游刃有余!
nursery_reclaim_fail_num
:
nursery_reclaim_fail_num
:
-
【女园丁@正常】我们现在已经拥有最大限度数量的花圃了,暂时无法开启新花圃了,
主人
就不要再贪心啦!
-
【女园丁@正常】我们现在已经拥有最大限度数量的花圃了,暂时无法开启新花圃了,
【1】
就不要再贪心啦!
-
【女园丁@正常】我们现在已经拥有最大限度数量的花圃了,
主人
就不要再贪心啦!
-
【女园丁@正常】我们现在已经拥有最大限度数量的花圃了,
【1】
就不要再贪心啦!
nursery_reclaim_fail_money
:
nursery_reclaim_fail_money
:
-
【女园丁@正常】【
1】不够啊,我们先去赚一点【1
】再来升级吧。
-
【女园丁@正常】【
3】不够啊,我们先去赚一点【3
】再来升级吧。
-
【女园丁@正常】看来【
1】这个东西缺一枚都不行,我们先去赚一点【1
】再来升级吧。
-
【女园丁@正常】看来【
3】这个东西缺一枚都不行,我们先去赚一点【3
】再来升级吧。
#查看植物成熟时间
#查看植物成熟时间
check_plant_mature_time_success
:
check_plant_mature_time_success
:
-
【女园丁@正常】哇,已经熟啦,那我们赶紧摘了吧。
-
【女园丁@正常】哇,已经熟啦,那我们赶紧摘了吧。
check_plant_mature_time_fail_no_mature
:
check_plant_mature_time_fail_no_mature
:
-
【女园丁@正常】
主人
不急,我们晚点再来看看吧。
-
【女园丁@正常】
【1】
不急,我们晚点再来看看吧。
check_plant_mature_time_fail_no_plant
:
check_plant_mature_time_fail_no_plant
:
-
【女园丁@正常】花圃还没有植物,可以先去种点哦。
-
【女园丁@正常】花圃还没有植物,可以先去种点哦。
check_plant_mature_time_fail_no_num
:
check_plant_mature_time_fail_no_num
:
-
【女园丁@正常】
主人,你
想看哪个花圃的植物成熟时间呢?
-
【女园丁@正常】
【1】,【2】
想看哪个花圃的植物成熟时间呢?
check_plant_mature_time_fail_plant_not_exist
:
check_plant_mature_time_fail_plant_not_exist
:
-
【女园丁@正常】我们可以先去种点这个。
-
【女园丁@正常】我们可以先去种点这个。
...
...
src/main/resources/speech/social.yaml
View file @
290107a1
...
@@ -54,7 +54,9 @@ aside:
...
@@ -54,7 +54,9 @@ aside:
-
【旁白@正常】好的,已为你取消删除好友【1】。
-
【旁白@正常】好的,已为你取消删除好友【1】。
#查看园地
#查看园地
garden_check_all_mature
:
garden_check_all_mature
:
-
【旁白@正常】这里共有【1】个花圃,其中【2】个花圃的植物未成熟,【3】的植物已成熟。。
-
【旁白@正常】这里共有【1】个花圃,【2】的植物均已成熟。
garden_check_part_mature
:
-
【旁白@正常】这里共有【1】个花圃,其中【2】个花圃的植物未成熟,【3】的植物已成熟。
garden_check_all_no_mature
:
garden_check_all_no_mature
:
-
【旁白@正常】这里共有【1】个花圃种植了植物,花圃中暂无成熟的植物。
-
【旁白@正常】这里共有【1】个花圃种植了植物,花圃中暂无成熟的植物。
garden_check_mature
:
garden_check_mature
:
...
@@ -75,39 +77,39 @@ aside:
...
@@ -75,39 +77,39 @@ aside:
-
【旁白@正常】目前背包仅有【1】【2】,无法前往查看。
-
【旁白@正常】目前背包仅有【1】【2】,无法前往查看。
#偷菜
#偷菜
steal_success
:
steal_success
:
-
【旁白@正常】成功在【1】的花圃【2】
偷取了【3】,需要查看战斗简报
吗?
-
【旁白@正常】成功在【1】的花圃【2】
收取了【3】,需要查看战斗详情
吗?
steal_success_no_items
:
steal_success_no_items
:
-
【旁白@正常】在花圃【1】没有
偷取到东西,需要查看战斗简报
吗?
-
【旁白@正常】在花圃【1】没有
收取到东西,需要查看战斗详情
吗?
steal_fail_not_exist
:
steal_fail_not_exist
:
-
【旁白@正常】【1】这里没有这个花圃。
-
【旁白@正常】【1】这里没有这个花圃。
steal_fail_unusable
:
steal_fail_unusable
:
-
【旁白@正常】这个花圃还未开启。
-
【旁白@正常】这个花圃还未开启。
steal_fail_fight
:
steal_fail_fight
:
-
【旁白@正常】本次在【1】的花圃【2】
偷菜失败,是否查看战斗简报
?
-
【旁白@正常】本次在【1】的花圃【2】
攻打失败,是否查看战斗详情
?
steal_fail_no_plant
:
steal_fail_no_plant
:
-
【旁白@正常】【1】的花圃【2】
暂时无法进行偷菜
。
-
【旁白@正常】【1】的花圃【2】
还没有植物,暂时无法进行攻打
。
steal_fail_had
:
steal_fail_had
:
-
【旁白@正常】【1】这里已经
偷取过一次,暂时无法再偷取
。
-
【旁白@正常】【1】这里已经
攻打过一次,暂时无法再攻打
。
steal_fail_no_times
:
steal_fail_no_times
:
-
【旁白@正常】今日的
偷菜次数已用尽,偷取
失败。
-
【旁白@正常】今日的
攻打次数已用尽,攻打
失败。
steal_fail_no_mature
:
steal_fail_no_mature
:
-
【旁白@正常】花圃【1】的【2】尚未成熟,暂时无法
偷
取。
-
【旁白@正常】花圃【1】的【2】尚未成熟,暂时无法
收
取。
steal_fail_self
:
steal_fail_self
:
-
【旁白@正常】无法
在本人的花园偷取
。
-
【旁白@正常】无法
攻打本人的花园
。
steal_fail_friend
:
steal_fail_friend
:
-
【旁白@正常】【1】是好友,无法
偷取
。
-
【旁白@正常】【1】是好友,无法
攻打
。
steal_fail_address_not_exist
:
steal_fail_address_not_exist
:
-
【旁白@正常】不存在玩家【1】,无法
偷取
。
-
【旁白@正常】不存在玩家【1】,无法
攻打
。
steal_cross_cost
:
steal_cross_cost
:
-
【旁白@正常】在【1】区域
偷菜
需要花费【2】【3】前往,是否继续?
-
【旁白@正常】在【1】区域
攻打花园
需要花费【2】【3】前往,是否继续?
steal_cross_cost_fail
:
steal_cross_cost_fail
:
-
【旁白@正常】目前背包仅有【1】【2】,无法前往
偷菜
。
-
【旁白@正常】目前背包仅有【1】【2】,无法前往
攻打花园
。
steal_random_success
:
steal_random_success
:
-
【旁白@正常】宠物们真棒,赢得了战斗,成功
偷取了花圃【1】中的【2】,要查看战斗简报
吗?
-
【旁白@正常】宠物们真棒,赢得了战斗,成功
收取了花圃【1】中的【2】,要查看战斗详情
吗?
steal_random_fail_fight
:
steal_random_fail_fight
:
-
【旁白@正常】宠物们状态不是很好,对花圃【1】的
偷菜失败,要查看战斗简报
吗?
-
【旁白@正常】宠物们状态不是很好,对花圃【1】的
攻打失败,要查看战斗详情
吗?
steal_random_fail_no_mature
:
steal_random_fail_no_mature
:
-
【旁白@正常】【1】这里没有成熟的植物可
偷
。
-
【旁白@正常】【1】这里没有成熟的植物可
收取
。
steal_random_fail_no_people
:
steal_random_fail_no_people
:
-
【旁白@正常】【1】不存在。
-
【旁白@正常】【1】不存在。
#帮助好友
#帮助好友
...
@@ -199,7 +201,7 @@ aside:
...
@@ -199,7 +201,7 @@ aside:
-
【旁白@正常】【1】还没有给你留言。
-
【旁白@正常】【1】还没有给你留言。
#查看简报
#查看简报
check_report_fail
:
check_report_fail
:
-
【旁白@正常】你想哪种简报呢?目前有帮助简报和
偷菜
简报。
-
【旁白@正常】你想哪种简报呢?目前有帮助简报和
防守
简报。
#查看帮助简报
#查看帮助简报
help_report_check
:
help_report_check
:
-
【旁白@正常】花圃植物成熟后,你的好友【1】在时间:【2】,帮你收取了花圃【3】上的【4】。为你一共收获了【5】,为表达感谢,赠送好友【6】。
-
【旁白@正常】花圃植物成熟后,你的好友【1】在时间:【2】,帮你收取了花圃【3】上的【4】。为你一共收获了【5】,为表达感谢,赠送好友【6】。
...
@@ -217,17 +219,17 @@ aside:
...
@@ -217,17 +219,17 @@ aside:
-
【旁白@正常】目前有【1】个帮助简报,超出范围,没找到对应简报。
-
【旁白@正常】目前有【1】个帮助简报,超出范围,没找到对应简报。
#查看偷菜简报
#查看偷菜简报
steal_report_check
:
steal_report_check
:
-
【旁白@正常】目前一共有【1】人
来你的花圃偷菜
,简报分别是【2】,你要查看其中哪一个的简报?
-
【旁白@正常】目前一共有【1】人
攻打过你的花圃
,简报分别是【2】,你要查看其中哪一个的简报?
steal_report_check_one
:
steal_report_check_one
:
-
【旁白@正常】目前【1】
来过你的花圃偷菜
,简报是【2】,你要查看详情吗?
-
【旁白@正常】目前【1】
攻打过你的花圃
,简报是【2】,你要查看详情吗?
steal_report_check_fail_no_name
:
steal_report_check_fail_no_name
:
-
【旁白@正常】暂时没有找到相关简报。
-
【旁白@正常】暂时没有找到相关简报。
steal_report_check_fail_over
:
steal_report_check_fail_over
:
-
【旁白@正常】目前有【1】个
偷菜
简报,超出范围,没找到对应简报。
-
【旁白@正常】目前有【1】个
防守
简报,超出范围,没找到对应简报。
steal_report_check_fail_no_names
:
steal_report_check_fail_no_names
:
-
【旁白@正常】目前还未查看都有哪些
偷菜
简报。
-
【旁白@正常】目前还未查看都有哪些
防守
简报。
steal_report_success_check
:
steal_report_success_check
:
-
【旁白@正常】时间:【1】,【2】率领宠物小队向你的花圃发起攻击,成功
偷
取了花圃【3】的【4】,给你的花圃造成了不小的损失。
-
【旁白@正常】时间:【1】,【2】率领宠物小队向你的花圃发起攻击,成功
收
取了花圃【3】的【4】,给你的花圃造成了不小的损失。
steal_report_fail_check
:
steal_report_fail_check
:
-
【旁白@正常】时间:【1】,【2】率领宠物小队向你的花圃发起攻击,经过你宠物小队们的顽强抗争,最终成功守护了你的花圃,让对方落荒而逃。
-
【旁白@正常】时间:【1】,【2】率领宠物小队向你的花圃发起攻击,经过你宠物小队们的顽强抗争,最终成功守护了你的花圃,让对方落荒而逃。
#战斗详情播放
#战斗详情播放
...
@@ -236,16 +238,16 @@ aside:
...
@@ -236,16 +238,16 @@ aside:
fight_detail_check
:
fight_detail_check
:
-
【旁白@正常】本次战斗我方上阵宠物【1】只,【2】对方上阵宠物【3】只,【4】一共进行了【5】轮次,【6】获得了胜利。
-
【旁白@正常】本次战斗我方上阵宠物【1】只,【2】对方上阵宠物【3】只,【4】一共进行了【5】轮次,【6】获得了胜利。
fight_detail_check_fail_no_pre
:
fight_detail_check_fail_no_pre
:
-
【旁白@正常】暂时无法查看战斗详情,请先查看
偷菜
简报。
-
【旁白@正常】暂时无法查看战斗详情,请先查看
防守
简报。
fight_detail_play_fail_none
:
fight_detail_play_fail_none
:
-
【旁白@正常】没有找到该战斗
简报
。
-
【旁白@正常】没有找到该战斗
详情
。
#获取战斗详情
#获取战斗详情
fight_detail_get_no_address
:
fight_detail_get_no_address
:
-
【旁白@正常】你还未提供对方的玩家地址,目前无法查看战斗
简报
。
-
【旁白@正常】你还未提供对方的玩家地址,目前无法查看战斗
详情
。
fight_detail_get_no_report
:
fight_detail_get_no_report
:
-
【旁白@正常】无法查看,
偷菜
后才能接着获取战斗详情。
-
【旁白@正常】无法查看,
攻打
后才能接着获取战斗详情。
fight_detail_get_fail_none
:
fight_detail_get_fail_none
:
-
【旁白@正常】没有找到该战斗
简报
,无法查看。
-
【旁白@正常】没有找到该战斗
详情
,无法查看。
#查看战斗轮次
#查看战斗轮次
fight_round_fight_check_no_pre
:
fight_round_fight_check_no_pre
:
-
【旁白@正常】你还没未查看战斗详情,请查看后再查看战斗轮次。
-
【旁白@正常】你还没未查看战斗详情,请查看后再查看战斗轮次。
...
@@ -270,7 +272,7 @@ aside:
...
@@ -270,7 +272,7 @@ aside:
delete_report_fail_no_name
:
delete_report_fail_no_name
:
-
【旁白@正常】你想删除哪些简报。
-
【旁白@正常】你想删除哪些简报。
delete_report_fail_no_type
:
delete_report_fail_no_type
:
-
【旁白@正常】你想删除哪种类型的简报呢?目前有帮助简报和
偷菜
简报。
-
【旁白@正常】你想删除哪种类型的简报呢?目前有帮助简报和
防守
简报。
delete_report_fail_num_not_exist
:
delete_report_fail_num_not_exist
:
-
【旁白@正常】不存在这样的简报。目前有【1】。
-
【旁白@正常】不存在这样的简报。目前有【1】。
delete_report_check
:
delete_report_check
:
...
@@ -286,31 +288,33 @@ aside:
...
@@ -286,31 +288,33 @@ aside:
-
【旁白@正常】你要删除哪个简报呢?目前有【1】。
-
【旁白@正常】你要删除哪个简报呢?目前有【1】。
delete_help_report_fail_over
:
delete_help_report_fail_over
:
-
【旁白@正常】第【1】个越界了,目前有【2】个帮助简报。
-
【旁白@正常】第【1】个越界了,目前有【2】个帮助简报。
#删除
偷菜
简报
#删除
防守
简报
delete_steal_report_fail_none
:
delete_steal_report_fail_none
:
-
【旁白@正常】暂无
偷菜
简报,无需删除。
-
【旁白@正常】暂无
防守
简报,无需删除。
delete_steal_report_fail_no_num
:
delete_steal_report_fail_no_num
:
-
【旁白@正常】你要删除哪个简报呢?目前有【1】。
-
【旁白@正常】你要删除哪个简报呢?目前有【1】。
delete_steal_report_fail_over
:
delete_steal_report_fail_over
:
-
【旁白@正常】第【1】个越界了,目前有【2】个
偷菜
简报。
-
【旁白@正常】第【1】个越界了,目前有【2】个
防守
简报。
#消息推送
#消息推送
check_notice_add_friend
:
check_notice_add_friend
:
-
收到了
【1】条新的好友申请
-
【1】条新的好友申请
check_notice_message
:
check_notice_message
:
-
收到了
【1】条新的好友留言
-
【1】条新的好友留言
check_notice_steal_report
:
check_notice_steal_report
:
-
收到了【1】条新的偷菜
简报
-
【1】条新的防守
简报
check_notice_help_report
:
check_notice_help_report
:
-
收到了
【1】条新的帮助简报
-
【1】条新的帮助简报
check_notice_task
:
check_notice_task
:
-
有【1】个新的任务
-
有【1】个新的任务
check_notice
:
check_notice
:
-
【旁白@正常】你【1】。
-
【旁白@正常】你
收到了
【1】。
check_notice_none
:
check_notice_none
:
-
【旁白@正常】暂无消息。
-
【旁白@正常】暂无消息。
check_notice_fail_wrong_num
:
-
【旁白@正常】没有你说的这个序号,目前有【1】个,你要看第几个呢?
#好友列表查询
#好友列表查询
all_friend_num_check_none
:
all_friend_num_check_none
:
-
【旁白@正常】你当前没有好友,好友列表上限为【
2
】,拜访陌生人再发送好友申请,等待对方接受申请就可以成为好友了。
-
【旁白@正常】你当前没有好友,好友列表上限为【
1
】,拜访陌生人再发送好友申请,等待对方接受申请就可以成为好友了。
all_friend_num_check
:
all_friend_num_check
:
-
【旁白@正常】你当前有【1】个好友,好友列表上限【2】个,还可以添加【3】个好友。
-
【旁白@正常】你当前有【1】个好友,好友列表上限【2】个,还可以添加【3】个好友。
all_friend_num_check_max
:
all_friend_num_check_max
:
...
@@ -320,7 +324,7 @@ aside:
...
@@ -320,7 +324,7 @@ aside:
online_friend_num_check
:
online_friend_num_check
:
-
【旁白@正常】当前有【1】个好友在线,【2】个好友离线。
-
【旁白@正常】当前有【1】个好友在线,【2】个好友离线。
friend_check
:
friend_check
:
-
【旁白@正常】你有【1】个好友,
园丁名称
是【2】。
-
【旁白@正常】你有【1】个好友,
玩家地址
是【2】。
offline_friend_num_check
:
offline_friend_num_check
:
-
【旁白@正常】离线超过【1】天的好友有【2】个,园丁名称是【3】。
-
【旁白@正常】离线超过【1】天的好友有【2】个,园丁名称是【3】。
offline_friend_num_check_none
:
offline_friend_num_check_none
:
...
@@ -355,11 +359,11 @@ man:
...
@@ -355,11 +359,11 @@ man:
-
【男园丁@正常】对花园主人感兴趣的话,可以添加好友的。
-
【男园丁@正常】对花园主人感兴趣的话,可以添加好友的。
-
【男园丁@正常】申请一下好友,下次还能来拜访。
-
【男园丁@正常】申请一下好友,下次还能来拜访。
visit_stranger_check_fail_none
:
visit_stranger_check_fail_none
:
-
【男园丁@正常】
主人,你
是想看谁的。
-
【男园丁@正常】
【1】,【2】
是想看谁的。
visit_stranger_check_fail_self
:
visit_stranger_check_fail_self
:
-
【男园丁@正常】
主人
,这个人是我们自己呀。
-
【男园丁@正常】
【1】
,这个人是我们自己呀。
visit_stranger_check_fail_no_exist
:
visit_stranger_check_fail_no_exist
:
-
【男园丁@正常】找不到的话,
主人
就换一个人访问吧。
-
【男园丁@正常】找不到的话,
【1】
就换一个人访问吧。
visit_stranger_cross
:
visit_stranger_cross
:
-
【男园丁@正常】去看看他的花圃种的如何吧?
-
【男园丁@正常】去看看他的花圃种的如何吧?
-
【男园丁@正常】参观看看吧。
-
【男园丁@正常】参观看看吧。
...
@@ -370,19 +374,19 @@ man:
...
@@ -370,19 +374,19 @@ man:
-
【男园丁@正常】能遇到也是缘分,不如和这个花园主人加个好友吧?
-
【男园丁@正常】能遇到也是缘分,不如和这个花园主人加个好友吧?
#好友申请
#好友申请
add_friend_ask_fail_self
:
add_friend_ask_fail_self
:
-
【男园丁@正常】
主人
,可以不用加自己为好友的。
-
【男园丁@正常】
【1】
,可以不用加自己为好友的。
add_friend_ask_fail_full
:
add_friend_ask_fail_full
:
-
【男园丁@正常】可以先清理一下好友列表,再发送好友申请。
-
【男园丁@正常】可以先清理一下好友列表,再发送好友申请。
-
【男园丁@正常】没关系,清理好友列表之后,可以再次发送申请的。
-
【男园丁@正常】没关系,清理好友列表之后,可以再次发送申请的。
-
【男园丁@正常】
主人
想添加吗?先清理下好友列表再来吧。
-
【男园丁@正常】
【1】
想添加吗?先清理下好友列表再来吧。
add_friend_ask_fail_full_side
:
add_friend_ask_fail_full_side
:
-
【男园丁@正常】看来对方的人缘不错啊,以后再来申请试试吧。
-
【男园丁@正常】看来对方的人缘不错啊,以后再来申请试试吧。
-
【男园丁@正常】竟然连好友都满员了,莫非是社牛?
-
【男园丁@正常】竟然连好友都满员了,莫非是社牛?
-
【男园丁@正常】还真是不凑巧。
-
【男园丁@正常】还真是不凑巧。
add_friend_ask_fail_had
:
add_friend_ask_fail_had
:
-
【男园丁@正常】
主人
,我们等回复就行了。
-
【男园丁@正常】
【1】
,我们等回复就行了。
add_friend_ask_fail_none
:
add_friend_ask_fail_none
:
-
【男园丁@正常】
主人,你
是想加谁为好友啊。
-
【男园丁@正常】
【1】,【2】
是想加谁为好友啊。
add_friend_ask_fail_exist
:
add_friend_ask_fail_exist
:
-
【男园丁@正常】已经是好友的话,要不要查看下对方的花圃。
-
【男园丁@正常】已经是好友的话,要不要查看下对方的花圃。
add_friend_ask_fail_not_exist
:
add_friend_ask_fail_not_exist
:
...
@@ -393,22 +397,22 @@ man:
...
@@ -393,22 +397,22 @@ man:
-
【男园丁@正常】我们一起去看看他的花园。
-
【男园丁@正常】我们一起去看看他的花园。
-
【男园丁@正常】这片花园的环境感觉还不错。
-
【男园丁@正常】这片花园的环境感觉还不错。
visit_friend_fail
:
visit_friend_fail
:
-
【男园丁@正常】
没有这样的好友,主人看看其他的吧
。
-
【男园丁@正常】
【1】,没有好友可以去拜访陌生人,说不定就能成为志同道合的新朋友了
。
visit_friend_cancel
:
visit_friend_cancel
:
-
【男园丁@正常】那下次再去拜访。
-
【男园丁@正常】那下次再去拜访。
#删除好友
#删除好友
delete_friend_check
:
delete_friend_check
:
-
【男园丁@正常】唉,认识一场不容易……
-
【男园丁@正常】唉,认识一场不容易……
-
【男园丁@正常】
主人
再考虑考虑吧。
-
【男园丁@正常】
【1】
再考虑考虑吧。
-
【男园丁@正常】
主人
决定了的事情,我都支持。
-
【男园丁@正常】
【1】
决定了的事情,我都支持。
delete_friend_success
:
delete_friend_success
:
-
【男园丁@正常】缘来缘去终会散,期待下一个和
主人
相遇的有缘人。
-
【男园丁@正常】缘来缘去终会散,期待下一个和
【1】
相遇的有缘人。
-
【男园丁@正常】也许下一个成为
主人好友的人,就是主人
的有缘人。
-
【男园丁@正常】也许下一个成为
【1】好友的人,就是【1】
的有缘人。
-
【男园丁@正常】天下没有不散的筵席,谁也不知道下一个和
你
相遇的会是什么人。
-
【男园丁@正常】天下没有不散的筵席,谁也不知道下一个和
【2】
相遇的会是什么人。
delete_friend_fail_none
:
delete_friend_fail_none
:
-
【男园丁@正常】那
主人
可以不用删了。
-
【男园丁@正常】那
【1】
可以不用删了。
delete_friend_fail_no_name
:
delete_friend_fail_no_name
:
-
【男园丁@正常】
主人,你
是想删除哪个呢。
-
【男园丁@正常】
【1】,【2】
是想删除哪个呢。
delete_friend_cancel
:
delete_friend_cancel
:
-
【男园丁@正常】朋友一场,还可以互帮互助。
-
【男园丁@正常】朋友一场,还可以互帮互助。
#查看园地
#查看园地
...
@@ -418,40 +422,42 @@ man:
...
@@ -418,40 +422,42 @@ man:
-
【男园丁@正常】我们的植物不知道现在是什么状态了。
-
【男园丁@正常】我们的植物不知道现在是什么状态了。
garden_check_no_plant
:
garden_check_no_plant
:
-
【男园丁@正常】哈哈,竟然是个什么东西都没有的花圃。
-
【男园丁@正常】哈哈,竟然是个什么东西都没有的花圃。
-
【男园丁@正常】也许是这个花园的
主人
已经很久没回来过了,所以连花圃都空了。
-
【男园丁@正常】也许是这个花园的
【1】
已经很久没回来过了,所以连花圃都空了。
-
【男园丁@正常】花圃都要干涸了,看来这里的园丁不是很喜欢这份工作啊。
-
【男园丁@正常】花圃都要干涸了,看来这里的园丁不是很喜欢这份工作啊。
garden_check_fail_no_exist
:
garden_check_fail_no_exist
:
-
【男园丁@正常】
主人
,我们确实没有这个花圃。
-
【男园丁@正常】
【1】
,我们确实没有这个花圃。
garden_check_fail_none
:
garden_check_fail_none
:
-
【男园丁@正常】还不知道
主人
想看谁的花圃呢。
-
【男园丁@正常】还不知道
【1】
想看谁的花圃呢。
#偷菜
#偷菜
steal_success
:
steal_success
:
-
【男园丁@正常】我们的宠物越来越强了,竟然连这样的战斗都能打赢,还是主人你驯养的好!
-
【男园丁@正常】我们的宠物越来越强了,竟然连这样的战斗都能打赢,还是【1】【2】驯养的好!
steal_fail_no_pet
:
-
【男园丁@正常】宠物栏还没有宠物,暂时无法随【1】前去攻打,可以种植些植物来吸引宠物再放到宠物栏。
steal_fail_no_nursery
:
steal_fail_no_nursery
:
-
【男园丁@正常】还不知道
主人你想偷
哪个花圃。
-
【男园丁@正常】还不知道
【1】【2】想攻打
哪个花圃。
steal_fail_not_exist
:
steal_fail_not_exist
:
-
【男园丁@正常】
主人
,我们换其他的吧。
-
【男园丁@正常】
【1】
,我们换其他的吧。
steal_fail_unusable
:
steal_fail_unusable
:
-
【男园丁@正常】看来只能下次来了。
-
【男园丁@正常】看来只能下次来了。
steal_fail_fight
:
steal_fail_fight
:
-
【男园丁@正常】快走吧
主人
,别让花园的人发现了……
-
【男园丁@正常】快走吧
【1】
,别让花园的人发现了……
steal_fail_no_plant
:
steal_fail_no_plant
:
-
【男园丁@正常】看看下一个花圃吧。
-
【男园丁@正常】看看下一个花圃吧。
steal_fail_had
:
steal_fail_had
:
-
【男园丁@正常】没事,还有其他花圃在等我们。
-
【男园丁@正常】没事,还有其他花圃在等我们。
steal_fail_no_times
:
steal_fail_no_times
:
-
【男园丁@正常】明天再来
偷取
吧。
-
【男园丁@正常】明天再来
攻打
吧。
steal_fail_no_mature
:
steal_fail_no_mature
:
-
【男园丁@正常】等这些植物再长大一点吧……
-
【男园丁@正常】等这些植物再长大一点吧……
steal_fail_no_address
:
steal_fail_no_address
:
-
【男园丁@正常】
主人,还不知道你想偷
谁的。
-
【男园丁@正常】
【1】,还不知道【2】想攻打
谁的。
steal_fail_self
:
steal_fail_self
:
-
【男园丁@正常】
主人,自己花园不用偷的,我能帮你
收取。
-
【男园丁@正常】
【1】,自己花园不用去攻打的,我能帮【2】
收取。
steal_random_fail_no_people
:
steal_random_fail_no_people
:
-
【男园丁@正常】没有这个人的话,我们看看其他人的吧。
-
【男园丁@正常】没有这个人的话,我们看看其他人的吧。
#帮助好友
#帮助好友
help_friend_success
:
help_friend_success
:
-
【男园丁@正常】
主人,你
可真是一个乐于助人的人。
-
【男园丁@正常】
【1】,【2】
可真是一个乐于助人的人。
help_friend_fail_no_times
:
help_friend_fail_no_times
:
-
【男园丁@正常】今天已经帮忙收取过了,你已经很辛苦了,明天再来帮忙吧。
-
【男园丁@正常】今天已经帮忙收取过了,你已经很辛苦了,明天再来帮忙吧。
help_friend_fail_all_no_mature
:
help_friend_fail_all_no_mature
:
...
@@ -459,80 +465,80 @@ man:
...
@@ -459,80 +465,80 @@ man:
help_friend_fail_no_mature
:
help_friend_fail_no_mature
:
-
【男园丁@正常】这个花圃的植物还没有成功,晚点再来看看吧。
-
【男园丁@正常】这个花圃的植物还没有成功,晚点再来看看吧。
help_friend_fail_no_plant
:
help_friend_fail_no_plant
:
-
【男园丁@正常】
你
的好友太懒了,花圃里都没种植物。
-
【男园丁@正常】
【2】
的好友太懒了,花圃里都没种植物。
help_friend_fail_no_help_times
:
help_friend_fail_no_help_times
:
-
【男园丁@正常】明白
主人主
人为乐,今天不能帮忙的话,明天再来吧。
-
【男园丁@正常】明白
【1】助
人为乐,今天不能帮忙的话,明天再来吧。
help_friend_fail_no_nursery
:
help_friend_fail_no_nursery
:
-
【男园丁@正常】没有这个花圃,
主人
我们换一个吧。
-
【男园丁@正常】没有这个花圃,
【1】
我们换一个吧。
help_friend_fail_no_address
:
help_friend_fail_no_address
:
-
【男园丁@正常】
主人,你
想帮助哪位好友呢?
-
【男园丁@正常】
【1】,【2】
想帮助哪位好友呢?
#设置帮助收益比例
#设置帮助收益比例
set_earn_rate_check
:
set_earn_rate_check
:
-
【男园丁@正常】好的,
主人
,那我们就用这个设置了。
-
【男园丁@正常】好的,
【1】
,那我们就用这个设置了。
set_earn_rate_success
:
set_earn_rate_success
:
-
【男园丁@正常】之后还想随时更换比例,可以再来进行设置。
-
【男园丁@正常】之后还想随时更换比例,可以再来进行设置。
set_earn_rate_fail_over
:
set_earn_rate_fail_over
:
-
【男园丁@正常】
主人
再考虑考虑吧。
-
【男园丁@正常】
【1】
再考虑考虑吧。
-
【男园丁@正常】在这个区间内,选择一个合理的比例。
-
【男园丁@正常】在这个区间内,选择一个合理的比例。
-
【男园丁@正常】不同的比例,帮助得到的收益也就不同了。
-
【男园丁@正常】不同的比例,帮助得到的收益也就不同了。
set_earn_rate_fail_unusable
:
set_earn_rate_fail_unusable
:
-
【男园丁@正常】先去开启花圃,再来设置比例吧。
-
【男园丁@正常】先去开启花圃,再来设置比例吧。
set_earn_rate_fail_no_nursery
:
set_earn_rate_fail_no_nursery
:
-
【男园丁@正常】
主人,你
要设置帮助受益比例的是哪一个花圃?
-
【男园丁@正常】
【1】,【2】
要设置帮助受益比例的是哪一个花圃?
set_earn_rate_fail_not_exist
:
set_earn_rate_fail_not_exist
:
-
【男园丁@正常】
主人,你
记错了,换一个试试吧。
-
【男园丁@正常】
【1】,【2】
记错了,换一个试试吧。
set_earn_rate_cancel
:
set_earn_rate_cancel
:
-
【男园丁@正常】那
主人
下次再设置吧。
-
【男园丁@正常】那
【1】
下次再设置吧。
#查看好友申请
#查看好友申请
add_friend_check
:
add_friend_check
:
-
【男园丁@正常】听
主人
安排。
-
【男园丁@正常】听
【1】
安排。
add_friend_check_fail_none
:
add_friend_check_fail_none
:
-
【男园丁@正常】
主人
不急,会有人来找我们的。
-
【男园丁@正常】
【1】
不急,会有人来找我们的。
add_friend_check_by_name
:
add_friend_check_by_name
:
-
【男园丁@正常】多一个朋友多一条路,不过随
主人
意愿。
-
【男园丁@正常】多一个朋友多一条路,不过随
【1】
意愿。
add_friend_check_by_name_fail
:
add_friend_check_by_name_fail
:
-
【男园丁@正常】可能对方还没加
你
,要不看看其他的吧。
-
【男园丁@正常】可能对方还没加
【2】
,要不看看其他的吧。
add_friend_check_by_name_fail_no_name
:
add_friend_check_by_name_fail_no_name
:
-
【男园丁@正常】
主人
,没有园丁名称或玩家地址是找不到人的。
-
【男园丁@正常】
【1】
,没有园丁名称或玩家地址是找不到人的。
#好友申请反馈
#好友申请反馈
add_friend_request_agree
:
add_friend_request_agree
:
-
【男园丁@正常】恭喜
主人
,又遇到了新的朋友!
-
【男园丁@正常】恭喜
【1】
,又遇到了新的朋友!
-
【男园丁@正常】这一次,也应该会是很好的朋友吧。
-
【男园丁@正常】这一次,也应该会是很好的朋友吧。
-
【男园丁@正常】友谊万岁!
-
【男园丁@正常】友谊万岁!
#好友留言。
#好友留言。
leave_message_success
:
leave_message_success
:
-
【男园丁@正常】不知道对方看到
主人的留言后,会不会给你
回信。
-
【男园丁@正常】不知道对方看到
【1】的留言后,会不会给【2】
回信。
-
【男园丁@正常】对方看到
主人
的留言,一定很欣慰。
-
【男园丁@正常】对方看到
【1】
的留言,一定很欣慰。
-
【男园丁@正常】再去给别的好友留言试试吧。
-
【男园丁@正常】再去给别的好友留言试试吧。
leave_message_fail_not_friend
:
leave_message_fail_not_friend
:
-
【男园丁@正常】不如先申请好友,再来留言?
-
【男园丁@正常】不如先申请好友,再来留言?
-
【男园丁@正常】只有成为才能留言。
-
【男园丁@正常】只有成为才能留言。
-
【男园丁@正常】不能给陌生人的留言的。
-
【男园丁@正常】不能给陌生人的留言的。
leave_message_fail_no_address
:
leave_message_fail_no_address
:
-
【男园丁@正常】
主人,你
想给谁留言呢?
-
【男园丁@正常】
【1】,【2】
想给谁留言呢?
leave_message_fail_self
:
leave_message_fail_self
:
-
【男园丁@正常】这个地址是我们自己的,换换其他的吧。
-
【男园丁@正常】这个地址是我们自己的,换换其他的吧。
leave_message_fail_not_exist
:
leave_message_fail_not_exist
:
-
【男园丁@正常】没有这个人,
主人
,我们换一个好友留言吧。
-
【男园丁@正常】没有这个人,
【1】
,我们换一个好友留言吧。
#查看留言
#查看留言
read_message_fail_none
:
read_message_fail_none
:
-
【男园丁@正常】
主人
,要不看下其他的留言吧。
-
【男园丁@正常】
【1】
,要不看下其他的留言吧。
#查看帮助简报
#查看帮助简报
help_report_check
:
help_report_check
:
-
【男园丁@正常】他可真有心,下次
主人
也可以去帮他收获花圃里成熟的植物!
-
【男园丁@正常】他可真有心,下次
【1】
也可以去帮他收获花圃里成熟的植物!
#查看偷菜简报
#查看偷菜简报
steal_report_check_fail_no_name
:
steal_report_check_fail_no_name
:
-
【男园丁@正常】
主人
,不如去看一看有没有其他简报?
-
【男园丁@正常】
【1】
,不如去看一看有没有其他简报?
-
【男园丁@正常】先去查询一下其他简报吧。
-
【男园丁@正常】先去查询一下其他简报吧。
-
【男园丁@正常】还剩下一些别的简报,需要先读取吗?
-
【男园丁@正常】还剩下一些别的简报,需要先读取吗?
steal_report_check_fail_none
:
steal_report_check_fail_none
:
-
【男园丁@正常】暂时还没人来
偷
过,看来我们花圃的护卫做得很好啊。
-
【男园丁@正常】暂时还没人来
攻打
过,看来我们花圃的护卫做得很好啊。
steal_report_success_check
:
steal_report_success_check
:
-
【男园丁@正常】真惨啊……你还想看一下战斗详情吗
主人
?
-
【男园丁@正常】真惨啊……你还想看一下战斗详情吗
【1】
?
-
【男园丁@正常】我都不忍心看战斗详情了,
主人你
自己看吧……
-
【男园丁@正常】我都不忍心看战斗详情了,
【1】【2】
自己看吧……
-
【男园丁@正常】是我这个园丁的失职,真是对不起。战斗的过程,
主人
想看吗?
-
【男园丁@正常】是我这个园丁的失职,真是对不起。战斗的过程,
【1】
想看吗?
steal_report_fail_check
:
steal_report_fail_check
:
-
【男园丁@正常】多亏了
主人
平时的驯养才能让我们的宠物在关键时刻,发挥这么强大的作用。
-
【男园丁@正常】多亏了
【1】
平时的驯养才能让我们的宠物在关键时刻,发挥这么强大的作用。
#战斗详情播放
#战斗详情播放
fight_detail_play
:
fight_detail_play
:
-
【男园丁@正常】真是一场精彩的战斗,宠物们也在战斗中变得越来越强了呢!
-
【男园丁@正常】真是一场精彩的战斗,宠物们也在战斗中变得越来越强了呢!
...
@@ -540,40 +546,40 @@ man:
...
@@ -540,40 +546,40 @@ man:
-
【男园丁@正常】可以告诉我想要看第几个轮次,我会告诉你那个轮次的详细情况。
-
【男园丁@正常】可以告诉我想要看第几个轮次,我会告诉你那个轮次的详细情况。
#好友列表查询
#好友列表查询
all_friend_num_check_none
:
all_friend_num_check_none
:
-
【男园丁@正常】
主人
,下次有机会我们先加些好友吧。
-
【男园丁@正常】
【1】
,下次有机会我们先加些好友吧。
all_friend_num_check
:
all_friend_num_check
:
-
【男园丁@正常】
主人
什么时候有想加好友告诉我就行。
-
【男园丁@正常】
【1】
什么时候有想加好友告诉我就行。
all_friend_num_check_max
:
all_friend_num_check_max
:
-
【男园丁@正常】
主人
人缘太好了,如果要再加好友,可以适当删掉一些好友。
-
【男园丁@正常】
【1】
人缘太好了,如果要再加好友,可以适当删掉一些好友。
online_friend_num_check_none
:
online_friend_num_check_none
:
-
【男园丁@正常】大家都没在,
主人
要不要去帮他们收一下果实。
-
【男园丁@正常】大家都没在,
【1】
要不要去帮他们收一下果实。
online_friend_num_check
:
online_friend_num_check
:
-
【男园丁@正常】
主人
,有时间去看看好友吧。
-
【男园丁@正常】
【1】
,有时间去看看好友吧。
friend_check
:
friend_check
:
-
【男园丁@正常】他们都在呢。
-
【男园丁@正常】他们都在呢。
offline_friend_num_check
:
offline_friend_num_check
:
-
【男园丁@正常】都没在,下次来看看他们吧。
-
【男园丁@正常】都没在,下次来看看他们吧。
offline_friend_num_check_none
:
offline_friend_num_check_none
:
-
【旁白@正常】
主人
,那他们都近期上线了,可以看看他们。
-
【旁白@正常】
【1】
,那他们都近期上线了,可以看看他们。
#返回自己花园
#返回自己花园
back_home_success
:
back_home_success
:
-
【男园丁@正常】
主人
,我们已经回来了,接下来想干什么呢?
-
【男园丁@正常】
【1】
,我们已经回来了,接下来想干什么呢?
back_home_fail
:
back_home_fail
:
-
【男园丁@正常】
主人
,我们其实就在自己的花园里。
-
【男园丁@正常】
【1】
,我们其实就在自己的花园里。
#查询他人花圃数量
#查询他人花圃数量
check_nursery_amount_side_fail
:
check_nursery_amount_side_fail
:
-
【男园丁@正常】
主人
,我们还在自己的花园,要先拜访的。
-
【男园丁@正常】
【1】
,我们还在自己的花园,要先拜访的。
#查看对方指定花圃宠物
#查看对方指定花圃宠物
nursery_pet_side_check
:
nursery_pet_side_check
:
-
【男园丁@正常】原来对方是这只宠物啊。
-
【男园丁@正常】原来对方是这只宠物啊。
nursery_pet_side_check_fail_no_address
:
nursery_pet_side_check_fail_no_address
:
-
【男园丁@正常】
主人,还不知道你
想看哪个人花圃中的宠物。
-
【男园丁@正常】
【1】,还不知道【2】
想看哪个人花圃中的宠物。
nursery_pet_side_check_fail_wrong_address
:
nursery_pet_side_check_fail_wrong_address
:
-
【男园丁@正常】没有这个玩家,我们换一个人试试吧。
-
【男园丁@正常】没有这个玩家,我们换一个人试试吧。
nursery_pet_side_check_fail_no_num
:
nursery_pet_side_check_fail_no_num
:
-
【男园丁@正常】
主人你
是想看这个人的哪个花圃呢?
-
【男园丁@正常】
【1】【2】
是想看这个人的哪个花圃呢?
nursery_pet_side_check_fail_wrong_num
:
nursery_pet_side_check_fail_wrong_num
:
-
【男园丁@正常】
主人
,要不换个花圃试试吧。
-
【男园丁@正常】
【1】
,要不换个花圃试试吧。
nursery_pet_side_check_fail_no_pet
:
nursery_pet_side_check_fail_no_pet
:
-
【男园丁@正常】里面没有宠物的话,估计在其他地方了,还看吗?
-
【男园丁@正常】里面没有宠物的话,估计在其他地方了,还看吗?
...
@@ -590,174 +596,176 @@ woman:
...
@@ -590,174 +596,176 @@ woman:
visit_stranger_check
:
visit_stranger_check
:
-
【女园丁@正常】可以申请加花园主人的好友,以后共同谈论打理花园的心得!
-
【女园丁@正常】可以申请加花园主人的好友,以后共同谈论打理花园的心得!
visit_stranger_check_fail_none
:
visit_stranger_check_fail_none
:
-
【女园丁@正常】
主人,还不知道你
想找谁呢。
-
【女园丁@正常】
【1】,还不知道【2】
想找谁呢。
visit_stranger_check_fail_self
:
visit_stranger_check_fail_self
:
-
【女园丁@正常】
主人
,这个是我们自己哦。
-
【女园丁@正常】
【1】
,这个是我们自己哦。
visit_stranger_check_fail_no_exist
:
visit_stranger_check_fail_no_exist
:
-
【女园丁@正常】
主人
,没有这个人呢,换个看看吧。
-
【女园丁@正常】
【1】
,没有这个人呢,换个看看吧。
visit_stranger_cross
:
visit_stranger_cross
:
-
【女园丁@正常】不知道这一家的
主人
把花圃打理成了什么样子,去看看吧?
-
【女园丁@正常】不知道这一家的
【1】
把花圃打理成了什么样子,去看看吧?
visit_stranger_cancel
:
visit_stranger_cancel
:
-
【女园丁@正常】
主人
可以拜访一下别人的花园,说不定能交到志同道合的朋友呢!
-
【女园丁@正常】
【1】
可以拜访一下别人的花园,说不定能交到志同道合的朋友呢!
visit_stranger_random
:
visit_stranger_random
:
-
【女园丁@正常】这样也能遇见,看来缘分不浅啊。
主人
试着加一加花园主人的好友吧!
-
【女园丁@正常】这样也能遇见,看来缘分不浅啊。
【1】
试着加一加花园主人的好友吧!
#好友申请
#好友申请
add_friend_ask_fail_self
:
add_friend_ask_fail_self
:
-
【女园丁@正常】
主人,你
怎么加自己为好友啊。
-
【女园丁@正常】
【1】,【2】
怎么加自己为好友啊。
add_friend_ask_fail_full
:
add_friend_ask_fail_full
:
-
【女园丁@正常】
主人
的好友太多了,偶尔也可以……适当清理一下吧?
-
【女园丁@正常】
【1】
的好友太多了,偶尔也可以……适当清理一下吧?
add_friend_ask_fail_full_side
:
add_friend_ask_fail_full_side
:
-
【女园丁@正常】对方居然有这么多好友,人气真高,看来只能下次有机会再加了……
-
【女园丁@正常】对方居然有这么多好友,人气真高,看来只能下次有机会再加了……
add_friend_ask_fail_had
:
add_friend_ask_fail_had
:
-
【女园丁@正常】申请过了的话,我跟
主人
一起等回复吧。
-
【女园丁@正常】申请过了的话,我跟
【1】
一起等回复吧。
add_friend_ask_fail_none
:
add_friend_ask_fail_none
:
-
【女园丁@正常】
主人,你
要先告诉我对方是谁才行哦。
-
【女园丁@正常】
【1】,【2】
要先告诉我对方是谁才行哦。
add_friend_ask_fail_exist
:
add_friend_ask_fail_exist
:
-
【女园丁@正常】看来
主人
都忘了,要不我们去看看对方的花圃。
-
【女园丁@正常】看来
【1】
都忘了,要不我们去看看对方的花圃。
add_friend_ask_fail_not_exist
:
add_friend_ask_fail_not_exist
:
-
【女园丁@正常】
主人
,可能说错了,我们再试试吧。
-
【女园丁@正常】
【1】
,可能说错了,我们再试试吧。
#拜访好友
#拜访好友
visit_friend_check
:
visit_friend_check
:
-
【女园丁@正常】可以去花圃里逛逛,看看对方有没有需要
主人
帮助的地方。
-
【女园丁@正常】可以去花圃里逛逛,看看对方有没有需要
【1】
帮助的地方。
visit_friend_fail
:
visit_friend_fail
:
-
【女园丁@正常】
主人,没有找到这样的人,我们再等等
吧。
-
【女园丁@正常】
【1】,没有找到这样的人,我们去其他地方逛逛
吧。
visit_friend_cancel
:
visit_friend_cancel
:
-
【女园丁@正常】好的
主人
,那我们下次再去咯。
-
【女园丁@正常】好的
【1】
,那我们下次再去咯。
#删除好友
#删除好友
delete_friend_check
:
delete_friend_check
:
-
【女园丁@正常】朋友一生一起走……
-
【女园丁@正常】朋友一生一起走……
delete_friend_success
:
delete_friend_success
:
-
【女园丁@正常】天下没有不散的筵席,谁也不知道下一个和
你
相遇的会是什么人。
-
【女园丁@正常】天下没有不散的筵席,谁也不知道下一个和
【2】
相遇的会是什么人。
delete_friend_fail_none
:
delete_friend_fail_none
:
-
【女园丁@正常】
主人
,删不了那就不删了吧。
-
【女园丁@正常】
【1】
,删不了那就不删了吧。
delete_friend_fail_no_name
:
delete_friend_fail_no_name
:
-
【女园丁@正常】
主人,还不知道你
想删哪个呢。
-
【女园丁@正常】
【1】,还不知道【2】
想删哪个呢。
delete_friend_cancel
:
delete_friend_cancel
:
-
【女园丁@正常】好耶,还可以愉快的做朋友了。
-
【女园丁@正常】好耶,还可以愉快的做朋友了。
#查看园地
#查看园地
garden_check_all_no_mature
:
garden_check_all_no_mature
:
-
【女园丁@正常】要不,先去别的地方看看?
-
【女园丁@正常】要不,先去别的地方看看?
garden_check_no_plant
:
garden_check_no_plant
:
-
【女园丁@正常】身为花园的
主人竟然让花圃空着,主人你
可不要向他学习。
-
【女园丁@正常】身为花园的
【1】竟然让花圃空着,【1】【2】
可不要向他学习。
garden_check_fail_no_exist
:
garden_check_fail_no_exist
:
-
【女园丁@正常】
主人
,是没有这个花圃呀。
-
【女园丁@正常】
【1】
,是没有这个花圃呀。
garden_check_fail_none
:
garden_check_fail_none
:
-
【女园丁@正常】
主人,你
想看谁的花圃呢。
-
【女园丁@正常】
【1】,【2】
想看谁的花圃呢。
#偷菜
#偷菜
steal_success
:
steal_success
:
-
【女园丁@正常】这些宠物们也太厉害了,回去一定要好好犒劳他们啊主人!
-
【女园丁@正常】这些宠物们也太厉害了,回去一定要好好犒劳他们啊【1】!
steal_fail_no_pet
:
-
【女园丁@正常】宠物栏里没有宠物是不能去攻打别人的花园噢,快去花圃种些植物来吸引宠物再放到宠物栏吧。
steal_fail_no_nursery
:
steal_fail_no_nursery
:
-
【女园丁@正常】
主人,快告诉我你想偷
哪个花圃吧,等不及了。
-
【女园丁@正常】
【1】,快告诉我【2】想攻打
哪个花圃吧,等不及了。
steal_fail_not_exist
:
steal_fail_not_exist
:
-
【女园丁@正常】没有这个花圃,那我们就换一个。嘿嘿,
主人
,我们不能空手回。
-
【女园丁@正常】没有这个花圃,那我们就换一个。嘿嘿,
【1】
,我们不能空手回。
steal_fail_unusable
:
steal_fail_unusable
:
-
【女园丁@正常】居然还没开启,这个人好懒呀。
-
【女园丁@正常】居然还没开启,这个人好懒呀。
steal_fail_fight
:
steal_fail_fight
:
-
【女园丁@正常】
偷菜
都失败,好尴尬啊,我们快找个地方躲起来别被发现了……
-
【女园丁@正常】
攻打花园
都失败,好尴尬啊,我们快找个地方躲起来别被发现了……
steal_fail_no_plant
:
steal_fail_no_plant
:
-
【女园丁@正常】我们去拜访别人的花圃吧。
-
【女园丁@正常】我们去拜访别人的花圃吧。
steal_fail_had
:
steal_fail_had
:
-
【女园丁@正常】不要灰心
主人
,再去看看其他的花圃。
-
【女园丁@正常】不要灰心
【1】
,再去看看其他的花圃。
steal_fail_no_times
:
steal_fail_no_times
:
-
【女园丁@正常】看来
偷的已经够多了,知足吧主人
。
-
【女园丁@正常】看来
攻打的已经够多了,知足吧【1】
。
steal_fail_no_mature
:
steal_fail_no_mature
:
-
【女园丁@正常】原来还没成熟,这次就先算了吧。
-
【女园丁@正常】原来还没成熟,这次就先算了吧。
steal_fail_no_address
:
steal_fail_no_address
:
-
【女园丁@正常】
主人告诉我想偷谁的,跟你
一起去。
-
【女园丁@正常】
【1】告诉我想攻打谁的,跟【2】
一起去。
steal_fail_self
:
steal_fail_self
:
-
【女园丁@正常】
主人又在逗我玩,自己的花园明明我可以帮你
收取的。
-
【女园丁@正常】
【1】又在逗我玩,自己的花园明明我可以帮【2】
收取的。
steal_random_fail_no_people
:
steal_random_fail_no_people
:
-
【女园丁@正常】
主人
,要不我们再看看其他人的吧,说不定可以有机会哦。
-
【女园丁@正常】
【1】
,要不我们再看看其他人的吧,说不定可以有机会哦。
#帮助好友
#帮助好友
help_friend_success
:
help_friend_success
:
-
【女园丁@正常】
主人你
真是热心肠,以后可以常来帮忙收获啊。
-
【女园丁@正常】
【1】【2】
真是热心肠,以后可以常来帮忙收获啊。
help_friend_fail_no_times
:
help_friend_fail_no_times
:
-
【女园丁@正常】
主人你
就是太勤快了,今天先回去好好休息,明天再来帮忙收取吧!
-
【女园丁@正常】
【1】【2】
就是太勤快了,今天先回去好好休息,明天再来帮忙收取吧!
help_friend_fail_all_no_mature
:
help_friend_fail_all_no_mature
:
-
【女园丁@正常】
主人
好友的花圃好像还没有成熟的植物,我们过一段时间再来看看吧。
-
【女园丁@正常】
【1】
好友的花圃好像还没有成熟的植物,我们过一段时间再来看看吧。
help_friend_fail_no_mature
:
help_friend_fail_no_mature
:
-
【女园丁@正常】可惜了,里面的植物还没有成熟,只好晚点过来看看了。
-
【女园丁@正常】可惜了,里面的植物还没有成熟,只好晚点过来看看了。
help_friend_fail_no_plant
:
help_friend_fail_no_plant
:
-
【女园丁@正常】这个花圃的主人竟然没有种植物,真是太不上心了,
主人你
可别向他学习。
-
【女园丁@正常】这个花圃的主人竟然没有种植物,真是太不上心了,
【1】【2】
可别向他学习。
help_friend_fail_no_help_times
:
help_friend_fail_no_help_times
:
-
【女园丁@正常】
主人
太勤奋了,帮了好多人,可惜今天不能再帮忙了,明天再来吧。
-
【女园丁@正常】
【1】
太勤奋了,帮了好多人,可惜今天不能再帮忙了,明天再来吧。
help_friend_fail_no_nursery
:
help_friend_fail_no_nursery
:
-
【女园丁@正常】没有这个花圃呢,
主人
,我们看看其他的吧。
-
【女园丁@正常】没有这个花圃呢,
【1】
,我们看看其他的吧。
help_friend_fail_no_address
:
help_friend_fail_no_address
:
-
【女园丁@正常】
主人
要先告诉我想帮助谁哦。
-
【女园丁@正常】
【1】
要先告诉我想帮助谁哦。
#设置帮助收益比例
#设置帮助收益比例
set_earn_rate_check
:
set_earn_rate_check
:
-
【女园丁@正常】听
主人
的,就用这个设置吧。
-
【女园丁@正常】听
【1】
的,就用这个设置吧。
set_earn_rate_success
:
set_earn_rate_success
:
-
【女园丁@正常】设置比例的权限在
主人手中,主人
随时可以过来进行设置。
-
【女园丁@正常】设置比例的权限在
【1】手中,【1】
随时可以过来进行设置。
set_earn_rate_fail_over
:
set_earn_rate_fail_over
:
-
【女园丁@正常】
主人
,换一个合适的比例吧。
-
【女园丁@正常】
【1】
,换一个合适的比例吧。
set_earn_rate_fail_unusable
:
set_earn_rate_fail_unusable
:
-
【女园丁@正常】等花圃开启之后,再来做设置比例的工作吧。
-
【女园丁@正常】等花圃开启之后,再来做设置比例的工作吧。
set_earn_rate_fail_no_nursery
:
set_earn_rate_fail_no_nursery
:
-
【女园丁@正常】具体要设置帮助收益比例的是哪一个花圃呢?
-
【女园丁@正常】具体要设置帮助收益比例的是哪一个花圃呢?
set_earn_rate_fail_not_exist
:
set_earn_rate_fail_not_exist
:
-
【女园丁@正常】
主人
,我们没有这个花圃哦。
-
【女园丁@正常】
【1】
,我们没有这个花圃哦。
set_earn_rate_cancel
:
set_earn_rate_cancel
:
-
【女园丁@正常】好的,
主人
有另有打算的话,那下次再设置吧。
-
【女园丁@正常】好的,
【1】
有另有打算的话,那下次再设置吧。
#查看好友申请
#查看好友申请
add_friend_check
:
add_friend_check
:
-
【女园丁@正常】我听
主人
的。
-
【女园丁@正常】我听
【1】
的。
add_friend_check_fail_none
:
add_friend_check_fail_none
:
-
【女园丁@正常】
主人
这么出色,会有人来的,我们不急哦。
-
【女园丁@正常】
【1】
这么出色,会有人来的,我们不急哦。
add_friend_check_by_name
:
add_friend_check_by_name
:
-
【女园丁@正常】
主人
想加就加吧,多一个朋友多一份力量。
-
【女园丁@正常】
【1】
想加就加吧,多一个朋友多一份力量。
add_friend_check_by_name_fail
:
add_friend_check_by_name_fail
:
-
【女园丁@正常】没找到这个人耶,要不换一个吧。
-
【女园丁@正常】没找到这个人耶,要不换一个吧。
add_friend_check_by_name_fail_no_name
:
add_friend_check_by_name_fail_no_name
:
-
【女园丁@正常】
主人,你
要告诉我园丁名称或者玩家地址哦。
-
【女园丁@正常】
【1】,【2】
要告诉我园丁名称或者玩家地址哦。
#好友申请反馈
#好友申请反馈
add_friend_request_agree
:
add_friend_request_agree
:
-
【女园丁@正常】和
主人
志同道合的朋友又增多了呢!
-
【女园丁@正常】和
【1】
志同道合的朋友又增多了呢!
#好友留言。
#好友留言。
leave_message_success
:
leave_message_success
:
-
【女园丁@正常】能收到朋友的留言,应该会很开心吧。
-
【女园丁@正常】能收到朋友的留言,应该会很开心吧。
leave_message_fail_not_friend
:
leave_message_fail_not_friend
:
-
【女园丁@正常】添加好友之后才能给对方留言,
你
要不要先添加试试?
-
【女园丁@正常】添加好友之后才能给对方留言,
【2】
要不要先添加试试?
leave_message_fail_no_address
:
leave_message_fail_no_address
:
-
【女园丁@正常】
主人
,都还不知道要给谁留言呢?
-
【女园丁@正常】
【1】
,都还不知道要给谁留言呢?
leave_message_fail_self
:
leave_message_fail_self
:
-
【女园丁@正常】
主人,你
在给自己留言呢,换一个人吧。
-
【女园丁@正常】
【1】,【2】
在给自己留言呢,换一个人吧。
leave_message_fail_not_exist
:
leave_message_fail_not_exist
:
-
【女园丁@正常】没有这个人呢,没关系,我们换一个好友留言吧。
-
【女园丁@正常】没有这个人呢,没关系,我们换一个好友留言吧。
#查看留言
#查看留言
read_message_fail_none
:
read_message_fail_none
:
-
【女园丁@正常】
主人
,没有的话,我们去看看其他人的吧。
-
【女园丁@正常】
【1】
,没有的话,我们去看看其他人的吧。
#查看帮助简报
#查看帮助简报
help_report_check
:
help_report_check
:
-
【女园丁@正常】真是谢谢这位热心的朋友啦,
主人
有空的话,也可以去帮他收获一下成熟的植物,还能获得一些报酬!
-
【女园丁@正常】真是谢谢这位热心的朋友啦,
【1】
有空的话,也可以去帮他收获一下成熟的植物,还能获得一些报酬!
#查看偷菜简报
#查看偷菜简报
steal_report_check_fail_no_name
:
steal_report_check_fail_no_name
:
-
【女园丁@正常】既然这样,可以先去看看其他简报。
-
【女园丁@正常】既然这样,可以先去看看其他简报。
-
【女园丁@正常】还有很多其他简报等着
主人
去看啊!要先去读读看吗?
-
【女园丁@正常】还有很多其他简报等着
【1】
去看啊!要先去读读看吗?
-
【女园丁@正常】看一下其他的简报也很有意思啊,
主人
去看看吧?
-
【女园丁@正常】看一下其他的简报也很有意思啊,
【1】
去看看吧?
steal_report_check_fail_none
:
steal_report_check_fail_none
:
-
【女园丁@正常】没有人来
偷我们的花圃,真幸运啊主人
!
-
【女园丁@正常】没有人来
攻打我们的花圃,真幸运啊【1】
!
steal_report_success_check
:
steal_report_success_check
:
-
【女园丁@正常】我们辛辛苦苦种的植物就这么被
偷了啊……你还想看战斗详情吗主人
?
-
【女园丁@正常】我们辛辛苦苦种的植物就这么被
收取了啊……【2】还想看战斗详情吗【1】
?
-
【女园丁@正常】对不起,是我战斗能力太弱了……我为
主人回放一下战斗详情吧,你
要看吗?
-
【女园丁@正常】对不起,是我战斗能力太弱了……我为
【1】回放一下战斗详情吧,【2】
要看吗?
-
【女园丁@正常】
主人,下一次我一定会率领小动物们好好保护花圃的……至于战斗详情,你
真的想看吗?
-
【女园丁@正常】
【1】,下一次我一定会率领小动物们好好保护花圃的……至于战斗详情,【2】
真的想看吗?
steal_report_fail_check
:
steal_report_fail_check
:
-
【女园丁@正常】宠物们真是厉害,看来
主人
对它们的驯养方法很正常,我们继续保持吧!
-
【女园丁@正常】宠物们真是厉害,看来
【1】
对它们的驯养方法很正常,我们继续保持吧!
#战斗详情播放
#战斗详情播放
fight_detail_play
:
fight_detail_play
:
-
【女园丁@正常】好精彩的战斗,我感觉我们的宠物也在战斗中成长的越来越厉害了!
-
【女园丁@正常】好精彩的战斗,我感觉我们的宠物也在战斗中成长的越来越厉害了!
fight_detail_check
:
fight_detail_check
:
-
【女园丁@正常】
主人你
可以告诉我想看哪轮的战斗,马上为你播报哦。
-
【女园丁@正常】
【1】【2】
可以告诉我想看哪轮的战斗,马上为你播报哦。
#好友列表查询
#好友列表查询
all_friend_num_check_none
:
all_friend_num_check_none
:
-
【女园丁@正常】
主人
,那我们先去加好友吧,嘻嘻。
-
【女园丁@正常】
【1】
,那我们先去加好友吧,嘻嘻。
all_friend_num_check
:
all_friend_num_check
:
-
【女园丁@正常】多个好友多条路,
主人
继续加油哦。
-
【女园丁@正常】多个好友多条路,
【1】
继续加油哦。
all_friend_num_check_max
:
all_friend_num_check_max
:
-
【女园丁@正常】哇,我们都已经有这么多好友啦,旧的不去新的不来,
主人
有时间就整理下吧。
-
【女园丁@正常】哇,我们都已经有这么多好友啦,旧的不去新的不来,
【1】
有时间就整理下吧。
online_friend_num_check_none
:
online_friend_num_check_none
:
-
【女园丁@正常】
主人
,是个好机会去帮帮他们收取果实啦!
-
【女园丁@正常】
【1】
,是个好机会去帮帮他们收取果实啦!
online_friend_num_check
:
online_friend_num_check
:
-
【女园丁@正常】有时间再去他们那看看吧。
-
【女园丁@正常】有时间再去他们那看看吧。
friend_check
:
friend_check
:
...
@@ -765,25 +773,25 @@ woman:
...
@@ -765,25 +773,25 @@ woman:
offline_friend_num_check
:
offline_friend_num_check
:
-
【女园丁@正常】也不知道他们都去哪呢,有点想他们了。
-
【女园丁@正常】也不知道他们都去哪呢,有点想他们了。
offline_friend_num_check_none
:
offline_friend_num_check_none
:
-
【女园丁@正常】
主人
,看来他们最近上线时间挺近的,要去看看他们吗?
-
【女园丁@正常】
【1】
,看来他们最近上线时间挺近的,要去看看他们吗?
#返回自己花园
#返回自己花园
back_home_success
:
back_home_success
:
-
【女园丁@正常】
主人
,回来啦,下一步打算是什么呢?
-
【女园丁@正常】
【1】
,回来啦,下一步打算是什么呢?
back_home_fail
:
back_home_fail
:
-
【女园丁@正常】
主人
,不用回啦,因为我们就在自己家哦。
-
【女园丁@正常】
【1】
,不用回啦,因为我们就在自己家哦。
#查询他人花圃数量
#查询他人花圃数量
check_nursery_amount_side_fail
:
check_nursery_amount_side_fail
:
-
【女园丁@正常】
主人
,要先拜访才可以查看对方的花圃数量哦。
-
【女园丁@正常】
【1】
,要先拜访才可以查看对方的花圃数量哦。
#查看对方指定花圃宠物
#查看对方指定花圃宠物
nursery_pet_side_check
:
nursery_pet_side_check
:
-
【女园丁@正常】哦哦,原来里面是这只宠物啊。
-
【女园丁@正常】哦哦,原来里面是这只宠物啊。
nursery_pet_side_check_fail_no_address
:
nursery_pet_side_check_fail_no_address
:
-
【女园丁@正常】
主人,你想看谁的花圃里的宠物呀,我跟你
一起去。
-
【女园丁@正常】
【1】,【2】想看谁的花圃里的宠物呀,我跟【2】
一起去。
nursery_pet_side_check_fail_wrong_address
:
nursery_pet_side_check_fail_wrong_address
:
-
【女园丁@正常】
主人
记错了吧,没有这个人呢,换个人试试。
-
【女园丁@正常】
【1】
记错了吧,没有这个人呢,换个人试试。
nursery_pet_side_check_fail_no_num
:
nursery_pet_side_check_fail_no_num
:
-
【女园丁@正常】哪个花圃呢?
主人
快告诉我,我已经迫不及待了。
-
【女园丁@正常】哪个花圃呢?
【1】
快告诉我,我已经迫不及待了。
nursery_pet_side_check_fail_wrong_num
:
nursery_pet_side_check_fail_wrong_num
:
-
【女园丁@正常】哎呀,
主人
弄错了,没有这个花圃哦。
-
【女园丁@正常】哎呀,
【1】
弄错了,没有这个花圃哦。
nursery_pet_side_check_fail_no_pet
:
nursery_pet_side_check_fail_no_pet
:
-
【女园丁@正常】说不定其他花圃有呢,
主人
其他的还看吗。
-
【女园丁@正常】说不定其他花圃有呢,
【1】
其他的还看吗。
src/main/resources/speech/task.yaml
View file @
290107a1
...
@@ -39,41 +39,41 @@ aside:
...
@@ -39,41 +39,41 @@ aside:
man
:
man
:
#查看任务
#查看任务
check_task_fail_no_name
:
check_task_fail_no_name
:
-
【男园丁@正常】
主人,你
还告诉想看哪种任务类型呢。
-
【男园丁@正常】
【1】,【2】
还告诉想看哪种任务类型呢。
#查看园丁升级任务状态
#查看园丁升级任务状态
check_update_task_status_unfinished
:
check_update_task_status_unfinished
:
-
【男园丁@正常】我会早日完成,争取变得更强!
-
【男园丁@正常】我会早日完成,争取变得更强!
-
【男园丁@正常】我会脚踏实地的努力,快点升级。
-
【男园丁@正常】我会脚踏实地的努力,快点升级。
-
【男园丁@正常】
主人
,我们快去完成任务吧。
-
【男园丁@正常】
【1】
,我们快去完成任务吧。
check_update_task_status_finished
:
check_update_task_status_finished
:
-
【男园丁@正常】现在可以给我升级了!
-
【男园丁@正常】现在可以给我升级了!
-
【男园丁@正常】
主人
可以现在为我升级,也可以之后再来为我升级。
-
【男园丁@正常】
【1】
可以现在为我升级,也可以之后再来为我升级。
-
【男园丁@正常】升级之后,我的能力会得到一定的提升。
-
【男园丁@正常】升级之后,我的能力会得到一定的提升。
#询问日常任务
#询问日常任务
check_daily_task_status_unfinished
:
check_daily_task_status_unfinished
:
-
【男园丁@正常】时间不等人,我建议
主人
现在就去完成接下来的任务。
-
【男园丁@正常】时间不等人,我建议
【1】
现在就去完成接下来的任务。
-
【男园丁@正常】做完任务可以获得应有的报酬。
-
【男园丁@正常】做完任务可以获得应有的报酬。
-
【男园丁@正常】累了吗?适当的休息,可以更好的完成任务。
-
【男园丁@正常】累了吗?适当的休息,可以更好的完成任务。
check_daily_task_status_finished
:
check_daily_task_status_finished
:
-
【男园丁@正常】
主人
真勤快,明天的任务也要继续努力。
-
【男园丁@正常】
【1】
真勤快,明天的任务也要继续努力。
-
【男园丁@正常】辛苦了,好好休息一下。
-
【男园丁@正常】辛苦了,好好休息一下。
-
【男园丁@正常】我为
主人
的能力感到自豪。
-
【男园丁@正常】我为
【1】
的能力感到自豪。
#任务提醒
#任务提醒
#园丁任务完成提示
#园丁任务完成提示
update_task_finished
:
update_task_finished
:
-
【男园丁@正常】我离升到下一级又更近一步了,谢谢
主人
。
-
【男园丁@正常】我离升到下一级又更近一步了,谢谢
【1】
。
-
【男园丁@正常】都是
主人
的努力,才让我能够更进一步。
-
【男园丁@正常】都是
【1】
的努力,才让我能够更进一步。
-
【男园丁@正常】我一定会充分运用这份力量,为
主人
打理好花园的。
-
【男园丁@正常】我一定会充分运用这份力量,为
【1】
打理好花园的。
update_task_level_finished
:
update_task_level_finished
:
-
【男园丁@正常】
主人,你
现在可以帮我升级了。
-
【男园丁@正常】
【1】,【2】
现在可以帮我升级了。
-
【男园丁@正常】升完级之后,我的能力又会得到大幅度的提升。
-
【男园丁@正常】升完级之后,我的能力又会得到大幅度的提升。
-
【男园丁@正常】为我完成任务,
你辛苦了主人
。
-
【男园丁@正常】为我完成任务,
【2】辛苦了【1】
。
daily_task_finished
:
daily_task_finished
:
-
【男园丁@正常】
主人
,再接再厉。
-
【男园丁@正常】
【1】
,再接再厉。
daily_task_all_finished
:
daily_task_all_finished
:
-
【男园丁@正常】今天所有的日常任务都做完了,
主人
辛苦了。
-
【男园丁@正常】今天所有的日常任务都做完了,
【1】
辛苦了。
-
【男园丁@正常】这些奖励都是
你用自己的劳动换来的,你真让我感到惊喜主人
。
-
【男园丁@正常】这些奖励都是
【2】用自己的劳动换来的,你真让我感到惊喜【1】
。
-
【男园丁@正常】回去好好犒赏一下
你
的努力。
-
【男园丁@正常】回去好好犒赏一下
【2】
的努力。
...
@@ -85,38 +85,38 @@ man:
...
@@ -85,38 +85,38 @@ man:
woman
:
woman
:
#查看任务
#查看任务
check_task_fail_no_name
:
check_task_fail_no_name
:
-
【女园丁@正常】
主人,你
想看哪种类型的任务呀?
-
【女园丁@正常】
【1】,【2】
想看哪种类型的任务呀?
#查看园丁升级任务状态
#查看园丁升级任务状态
check_update_task_status_unfinished
:
check_update_task_status_unfinished
:
-
【女园丁@正常】
主人,我想赶快升级变强,你
也要帮我一起啊!
-
【女园丁@正常】
【1】,我想赶快升级变强,【2】
也要帮我一起啊!
-
【女园丁@正常】等级越高,我能帮助
主人
打理花园的权限就越多。
-
【女园丁@正常】等级越高,我能帮助
【1】
打理花园的权限就越多。
-
【女园丁@正常】我已经迫不及待想要完成任务升级了。
-
【女园丁@正常】我已经迫不及待想要完成任务升级了。
check_update_task_status_finished
:
check_update_task_status_finished
:
-
【女园丁@正常】好激动,
你现在要给我升级吗主人
?
-
【女园丁@正常】好激动,
【2】现在要给我升级吗【1】
?
-
【女园丁@正常】每升一级我的能力就会变得比以前更高,不知道这次升级会带来什么样的改变……
-
【女园丁@正常】每升一级我的能力就会变得比以前更高,不知道这次升级会带来什么样的改变……
-
【女园丁@正常】我想要升级,这样就能为
主人
更好的打理花圃了!
-
【女园丁@正常】我想要升级,这样就能为
【1】
更好的打理花圃了!
#询问日常任务
#询问日常任务
check_daily_task_status_unfinished
:
check_daily_task_status_unfinished
:
-
【女园丁@正常】
主人
,那我们就不要浪费时间了,现在就去完成任务吧!
-
【女园丁@正常】
【1】
,那我们就不要浪费时间了,现在就去完成任务吧!
-
【女园丁@正常】
主人
觉得累的话,可以休息一下再来继续完成任务。
-
【女园丁@正常】
【1】
觉得累的话,可以休息一下再来继续完成任务。
-
【女园丁@正常】不知道今天的任务完成后,会得到什么样的奖励……
-
【女园丁@正常】不知道今天的任务完成后,会得到什么样的奖励……
check_daily_task_status_finished
:
check_daily_task_status_finished
:
-
【女园丁@正常】日常任务每天都有,
主人
还要再接再厉,我们明天再来吧!
-
【女园丁@正常】日常任务每天都有,
【1】
还要再接再厉,我们明天再来吧!
-
【女园丁@正常】赶快去休息一下吧!我知道
你
累了。
-
【女园丁@正常】赶快去休息一下吧!我知道
【2】
累了。
-
【女园丁@正常】
主人你真厉害,这么轻松就把任务给完成了,给你
鼓掌!
-
【女园丁@正常】
【1】【2】真厉害,这么轻松就把任务给完成了,给【2】
鼓掌!
#任务提醒
#任务提醒
#园丁任务完成提示
#园丁任务完成提示
update_task_finished
:
update_task_finished
:
-
【女园丁@正常】太好了,再升到下一级我又能变强不少!
-
【女园丁@正常】太好了,再升到下一级我又能变强不少!
-
【女园丁@正常】真期待我升级之后又会变成什么样子……
-
【女园丁@正常】真期待我升级之后又会变成什么样子……
-
【女园丁@正常】谢谢
你主人,没有你
的话我是不可能这么快就升级的!
-
【女园丁@正常】谢谢
【1】【2】,没有【2】
的话我是不可能这么快就升级的!
update_task_level_finished
:
update_task_level_finished
:
-
【女园丁@正常】那就麻烦
主人
帮我升级吧!
-
【女园丁@正常】那就麻烦
【1】
帮我升级吧!
-
【女园丁@正常】我们花了这么长的时间,终于迎来了这至关重要的一刻啦!
-
【女园丁@正常】我们花了这么长的时间,终于迎来了这至关重要的一刻啦!
-
【女园丁@正常】我已经迫不及待想要升级了!
-
【女园丁@正常】我已经迫不及待想要升级了!
daily_task_finished
:
daily_task_finished
:
-
【女园丁@正常】
主人
,再做几个就完成了,加油哦。
-
【女园丁@正常】
【1】
,再做几个就完成了,加油哦。
daily_task_all_finished
:
daily_task_all_finished
:
-
【女园丁@正常】做完了这么多任务,主人一定很累了。
-
【女园丁@正常】做完了这么多任务,【1】一定很累了。
-
【女园丁@正常】我也被主人的勤劳感染了,我现在要赶快去看看花圃!
-
【女园丁@正常】我也被【1】的勤劳感染了,我现在要赶快去看看花圃!
-
【女园丁@正常】嘿嘿,主人可以好好休息一下了!
-
【女园丁@正常】嘿嘿,【1】可以好好休息一下了!
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment