Commit beff5956 by hxw

修复查询某地点有什么东西

parent 3225595d
......@@ -163,11 +163,11 @@ public class WorldController {
}
NPCName = currentInfoPoint.get(valuePair[1]).split(":", 2)[1];
returnStr = gameEnv.queryGoodsIntroByGoodsName(NPCName);
returnStr = gameEnv.queryNpcIntroByNpcName(NPCName);
if(returnStr == null )
returnStr = DONT_FOUND;
else{
returnStr = format.replace(ITEM_NAME_SLOT, NPCName).replace(ATTR_VALUE_SLOT, returnStr);
returnStr = format.replace(NPC_NAME_SLOT, NPCName).replace(ATTR_VALUE_SLOT, returnStr);
}
break;
......@@ -449,9 +449,9 @@ public class WorldController {
format = SCRIPT_ITEM_IN_PLACE;
}
destination = currentInfoPoint.get(valuePair[1]).split(":")[1];
destination = currentInfoPoint.get(valuePair[1]).split(":")[0];
sites = gameEnv.queryAroundGoodsBySite(historyInfoPoint.get(destination));
sites = gameEnv.queryAroundGoodsBySite(destination);
if(sites == null || sites.size() == 0)
returnStr = NOTHING_FOUND;
else {
......@@ -465,14 +465,14 @@ public class WorldController {
}
}
break;
case "queryNPCInPlace":
case "queryNpcInPlace":
format = userInfo.varInitialMap.get("NPC_IN_PLACE");
if(format == null){
format = SCRIPT_NPC_IN_PLACE;
}
destination = currentInfoPoint.get(valuePair[1]).split(":")[1];
sites = gameEnv.queryAroundNpcBySite(historyInfoPoint.get(destination));
destination = currentInfoPoint.get(valuePair[1]).split(":")[0];
sites = gameEnv.queryAroundNpcBySite(destination);
if(sites == null || sites.size() == 0)
returnStr = NOTHING_FOUND;
else {
......@@ -495,7 +495,7 @@ public class WorldController {
destination = currentInfoPoint.get(valuePair[1]).split(":")[1];
sites = gameEnv.queryAroundAllBySite(historyInfoPoint.get(destination));
sites = gameEnv.queryAroundAllBySite(destination);
if(sites == null || sites.size() == 0)
returnStr = NOTHING_FOUND;
else {
......@@ -510,6 +510,10 @@ public class WorldController {
}
break;
default:
returnStr = "error";
break;
}
}
......
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