Commit 22549a7f by 李进峰

global variable update

parent 2555aef0
......@@ -41,7 +41,6 @@ public class GameEnv implements Serializable{
// System.out.println(jsonString);
String jsonString = DBUtil.queryEnvJsonByBotName(botName);
Map<String, Object> gameProjectMap = JSON.parseObject(jsonString);
System.out.println(gameProjectMap);
this.followNpcIndex = new HashMap<String, NpcInstance>();
this.placeLinkDirectGo = new HashMap<String, Place>();
this.placeNoLinkDirectGo = new HashMap<String, Place>();
......@@ -440,6 +439,7 @@ public class GameEnv implements Serializable{
}
return null;
}
public String queryCurPlaceGoodsInstanceByNickname(String curPlaceName, String nickname) {
List<GoodsInstance> goodsInstances = this.placeIndex.get(curPlaceName).getGoodsInstances();
for(int i=0; i<goodsInstances.size();i++) {
......@@ -792,7 +792,6 @@ public class GameEnv implements Serializable{
}
}
if(goodsInstanceBoolean) {
System.out.print(goodsInstance);
List<Attr> attrs = goodsInstance.getAttrs();
if(names[3].equals("所在地点")) {
Place placeOrigin = goodsInstance.getPlace();
......@@ -894,8 +893,8 @@ public class GameEnv implements Serializable{
return true;
}
}
}else if(names.length == 3 && names[0].equals("globalVariable")) {
this.globalAttrs.put(names[2], value);
}else if(names.length == 2 && names[0].equals("globalVariable")) {
this.globalAttrs.put(names[1], value);
}
return false;
}
......
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