Commit 371e70ca by zhaoguojun

回滚一个文件

parent 781ce1b4
......@@ -75,7 +75,7 @@ public class GameEnv implements Serializable{
Map<String, Object> placeTmpMap = (Map<String, Object>)gameProjectMap.get("place");
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++) {
String placeName = placeNames.get(i);
Map<String,Object> placeMap = (Map<String,Object>)placeTmpMap.get(placeName);
......@@ -111,7 +111,6 @@ public class GameEnv implements Serializable{
// 别名
List<String> nicknames = (List<String>)placeMap.get("nicknames");
for(int i=0; i<nicknames.size(); i++) {
System.out.println(nicknames.get(i));
Nickname nickname = this.getNicknameUtil(nicknames.get(i));
Map<String,Place> nicknamePlaceMap = nickname.getPlaceMap();
nicknamePlaceMap.put(place.getName(), place);
......@@ -595,7 +594,7 @@ public class GameEnv implements Serializable{
}
// 查询指定物品的简介
public String queryGoodsIntroByGoodsName(String name){
GoodsInstance goodsInstance = this.queryGoodsByGoodsName(name);
GoodsInstance goodsInstance = this.findGoodsInstanceByNameOrNickname(name);
if(goodsInstance !=null) {
return goodsInstance.getAttrs().get("intro");
}else {
......@@ -668,7 +667,7 @@ public class GameEnv implements Serializable{
}
// 查询指定NPC简介
public String queryNpcIntroByNpcName(String name){
NpcInstance npcInstance = queryNpcByNpcName(name);
NpcInstance npcInstance = this.findNpcInstanceByNameOrNickname(name);
return npcInstance.getAttrs().get("intro");
}
// 查询指定npc的属性值
......@@ -694,7 +693,7 @@ public class GameEnv implements Serializable{
// 查询指定npc的所有属性
public List<String> queryNpcAttrsByNpcName(String name){
List<String> attrNames = new ArrayList<String>();
NpcInstance npcInstance = queryNpcByNpcName(name);
NpcInstance npcInstance = this.findNpcInstanceByNameOrNickname(name);
if(npcInstance != null) {
attrNames.addAll(npcInstance.getAttrs().keySet());
return attrNames;
......@@ -704,7 +703,7 @@ public class GameEnv implements Serializable{
}
// 查询角色的地点
public String queryNpcSiteByNpcName(String npcName) {
return this.queryNpcByNpcName(npcName).getPlace().getName();
return this.findNpcInstanceByNameOrNickname(npcName).getPlace().getName();
}
// 增加
public boolean insert(String name){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment