From 22549a7f9581f3f778123ae3ef0130cd2a4e43fc Mon Sep 17 00:00:00 2001 From: 李进峰 Date: Sat, 22 Dec 2018 10:58:18 +0800 Subject: [PATCH] global variable update --- src/GameEnvironment/GameEnv.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/GameEnvironment/GameEnv.java b/src/GameEnvironment/GameEnv.java index 1965a0c..4731f73 100644 --- a/src/GameEnvironment/GameEnv.java +++ b/src/GameEnvironment/GameEnv.java @@ -41,7 +41,6 @@ public class GameEnv implements Serializable{ // System.out.println(jsonString); String jsonString = DBUtil.queryEnvJsonByBotName(botName); Map gameProjectMap = JSON.parseObject(jsonString); - System.out.println(gameProjectMap); this.followNpcIndex = new HashMap(); this.placeLinkDirectGo = new HashMap(); this.placeNoLinkDirectGo = new HashMap(); @@ -440,6 +439,7 @@ public class GameEnv implements Serializable{ } return null; } + public String queryCurPlaceGoodsInstanceByNickname(String curPlaceName, String nickname) { List goodsInstances = this.placeIndex.get(curPlaceName).getGoodsInstances(); for(int i=0; i 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; } -- libgit2 0.27.1