Commit 955c5e93 by 李进峰

place update

parent 22549a7f
...@@ -866,19 +866,19 @@ public class GameEnv implements Serializable{ ...@@ -866,19 +866,19 @@ public class GameEnv implements Serializable{
}else { }else {
return false; return false;
} }
}else if(names[0].equals("place")) { }else if(names.length == 3 && names[0].equals("place")) {
Place place = this.placeIndex.get(names[2]); Place place = this.placeIndex.get(names[1]);
if(names[3].equals("到达条件")) { if(names[2].equals("到达条件")) {
place.setGoFlag(Integer.parseInt(value)); place.setGoFlag(Integer.parseInt(value));
if(place.getGoFlag().equals(2)) { if(place.getGoFlag().equals(1)) {
this.placeLinkDirectGo.put(place.getName(),place); this.placeLinkDirectGo.put(place.getName(),place);
this.placeNoLinkDirectGo.remove(place.getName()); this.placeNoLinkDirectGo.remove(place.getName());
}else if(place.getGoFlag().equals(3)) { }else if(place.getGoFlag().equals(2)) {
this.placeNoLinkDirectGo.put(place.getName(),place); this.placeNoLinkDirectGo.put(place.getName(),place);
this.placeLinkDirectGo.remove(place.getName()); this.placeLinkDirectGo.remove(place.getName());
} }
return true; return true;
}else if(names[3].equals("可去地点")) { }else if(names[2].equals("可去地点")) {
String[] ableGos = value.split("~"); String[] ableGos = value.split("~");
List<Place> places = new ArrayList<Place>(); List<Place> places = new ArrayList<Place>();
byte[] line = this.mapGraph[this.mapNames.get(place.getName())]; byte[] line = this.mapGraph[this.mapNames.get(place.getName())];
...@@ -891,11 +891,13 @@ public class GameEnv implements Serializable{ ...@@ -891,11 +891,13 @@ public class GameEnv implements Serializable{
} }
place.setAbleGo(places); place.setAbleGo(places);
return true; return true;
}else {
return false;
} }
} }else if(names[0].equals("globalVariable")) {
}else if(names.length == 2 && names[0].equals("globalVariable")) {
this.globalAttrs.put(names[1], value); this.globalAttrs.put(names[1], value);
} }
}
return false; 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