Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qwgame
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
赵国君
qwgame
Commits
371e70ca
Commit
371e70ca
authored
Apr 02, 2019
by
zhaoguojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回滚一个文件
parent
781ce1b4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
GameEnv.java
...java/com/qiwu/chatbotbackend/GameEnvironment/GameEnv.java
+5
-6
No files found.
src/main/java/com/qiwu/chatbotbackend/GameEnvironment/GameEnv.java
View file @
371e70ca
...
@@ -75,7 +75,7 @@ public class GameEnv implements Serializable{
...
@@ -75,7 +75,7 @@ public class GameEnv implements Serializable{
Map
<
String
,
Object
>
placeTmpMap
=
(
Map
<
String
,
Object
>)
gameProjectMap
.
get
(
"place"
);
Map
<
String
,
Object
>
placeTmpMap
=
(
Map
<
String
,
Object
>)
gameProjectMap
.
get
(
"place"
);
if
(
placeTmpMap
!=
null
&&
!
placeTmpMap
.
isEmpty
())
{
if
(
placeTmpMap
!=
null
&&
!
placeTmpMap
.
isEmpty
())
{
// 地图基本数据定义
// 地图基本数据定义
List
<
String
>
placeNames
=
new
ArrayList
<>(
placeTmpMap
.
keySet
());
List
<
String
>
placeNames
=
new
ArrayList
<
String
>(
placeTmpMap
.
keySet
());
for
(
int
i
=
0
;
i
<
placeNames
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
placeNames
.
size
();
i
++)
{
String
placeName
=
placeNames
.
get
(
i
);
String
placeName
=
placeNames
.
get
(
i
);
Map
<
String
,
Object
>
placeMap
=
(
Map
<
String
,
Object
>)
placeTmpMap
.
get
(
placeName
);
Map
<
String
,
Object
>
placeMap
=
(
Map
<
String
,
Object
>)
placeTmpMap
.
get
(
placeName
);
...
@@ -111,7 +111,6 @@ public class GameEnv implements Serializable{
...
@@ -111,7 +111,6 @@ public class GameEnv implements Serializable{
// 别名
// 别名
List
<
String
>
nicknames
=
(
List
<
String
>)
placeMap
.
get
(
"nicknames"
);
List
<
String
>
nicknames
=
(
List
<
String
>)
placeMap
.
get
(
"nicknames"
);
for
(
int
i
=
0
;
i
<
nicknames
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
nicknames
.
size
();
i
++)
{
System
.
out
.
println
(
nicknames
.
get
(
i
));
Nickname
nickname
=
this
.
getNicknameUtil
(
nicknames
.
get
(
i
));
Nickname
nickname
=
this
.
getNicknameUtil
(
nicknames
.
get
(
i
));
Map
<
String
,
Place
>
nicknamePlaceMap
=
nickname
.
getPlaceMap
();
Map
<
String
,
Place
>
nicknamePlaceMap
=
nickname
.
getPlaceMap
();
nicknamePlaceMap
.
put
(
place
.
getName
(),
place
);
nicknamePlaceMap
.
put
(
place
.
getName
(),
place
);
...
@@ -595,7 +594,7 @@ public class GameEnv implements Serializable{
...
@@ -595,7 +594,7 @@ public class GameEnv implements Serializable{
}
}
// 查询指定物品的简介
// 查询指定物品的简介
public
String
queryGoodsIntroByGoodsName
(
String
name
){
public
String
queryGoodsIntroByGoodsName
(
String
name
){
GoodsInstance
goodsInstance
=
this
.
queryGoodsByGoodsN
ame
(
name
);
GoodsInstance
goodsInstance
=
this
.
findGoodsInstanceByNameOrNickn
ame
(
name
);
if
(
goodsInstance
!=
null
)
{
if
(
goodsInstance
!=
null
)
{
return
goodsInstance
.
getAttrs
().
get
(
"intro"
);
return
goodsInstance
.
getAttrs
().
get
(
"intro"
);
}
else
{
}
else
{
...
@@ -668,7 +667,7 @@ public class GameEnv implements Serializable{
...
@@ -668,7 +667,7 @@ public class GameEnv implements Serializable{
}
}
// 查询指定NPC简介
// 查询指定NPC简介
public
String
queryNpcIntroByNpcName
(
String
name
){
public
String
queryNpcIntroByNpcName
(
String
name
){
NpcInstance
npcInstance
=
queryNpcByNpcN
ame
(
name
);
NpcInstance
npcInstance
=
this
.
findNpcInstanceByNameOrNickn
ame
(
name
);
return
npcInstance
.
getAttrs
().
get
(
"intro"
);
return
npcInstance
.
getAttrs
().
get
(
"intro"
);
}
}
// 查询指定npc的属性值
// 查询指定npc的属性值
...
@@ -694,7 +693,7 @@ public class GameEnv implements Serializable{
...
@@ -694,7 +693,7 @@ public class GameEnv implements Serializable{
// 查询指定npc的所有属性
// 查询指定npc的所有属性
public
List
<
String
>
queryNpcAttrsByNpcName
(
String
name
){
public
List
<
String
>
queryNpcAttrsByNpcName
(
String
name
){
List
<
String
>
attrNames
=
new
ArrayList
<
String
>();
List
<
String
>
attrNames
=
new
ArrayList
<
String
>();
NpcInstance
npcInstance
=
queryNpcByNpcN
ame
(
name
);
NpcInstance
npcInstance
=
this
.
findNpcInstanceByNameOrNickn
ame
(
name
);
if
(
npcInstance
!=
null
)
{
if
(
npcInstance
!=
null
)
{
attrNames
.
addAll
(
npcInstance
.
getAttrs
().
keySet
());
attrNames
.
addAll
(
npcInstance
.
getAttrs
().
keySet
());
return
attrNames
;
return
attrNames
;
...
@@ -704,7 +703,7 @@ public class GameEnv implements Serializable{
...
@@ -704,7 +703,7 @@ public class GameEnv implements Serializable{
}
}
// 查询角色的地点
// 查询角色的地点
public
String
queryNpcSiteByNpcName
(
String
npcName
)
{
public
String
queryNpcSiteByNpcName
(
String
npcName
)
{
return
this
.
queryNpcByNpcN
ame
(
npcName
).
getPlace
().
getName
();
return
this
.
findNpcInstanceByNameOrNickn
ame
(
npcName
).
getPlace
().
getName
();
}
}
// 增加
// 增加
public
boolean
insert
(
String
name
){
public
boolean
insert
(
String
name
){
...
...
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