diff --git a/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antFarm/AntFarm.java b/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antFarm/AntFarm.java index edd24eff..b45653ea 100644 --- a/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antFarm/AntFarm.java +++ b/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antFarm/AntFarm.java @@ -812,6 +812,7 @@ private static void receiveFarmTaskAward() { if ("SUCCESS".equals(memo)) { JSONObject signList = jo.getJSONObject("signList"); sign(signList); + Thread.sleep(2000); JSONArray jaFarmTaskList = jo.getJSONArray("farmTaskList"); for (int i = 0; i < jaFarmTaskList.length(); i++) { jo = jaFarmTaskList.getJSONObject(i); @@ -825,10 +826,11 @@ private static void receiveFarmTaskAward() { int awardCount = jo.getInt("awardCount"); if (awardCount + foodStock > foodStockLimit) { unreceiveTaskAward++; - Log.record("领取" + awardCount + "克饲料后将超过[" + foodStockLimit + "克]上限,已终止领取"); - break; + Log.record("领取" + awardCount + "克饲料后将超过[" + foodStockLimit + "克]上限,终止领取"); + return; } s = AntFarmRpcCall.receiveFarmTaskAward(jo.getString("taskId")); + Thread.sleep(5000); jo = new JSONObject(s); memo = jo.getString("memo"); if ("SUCCESS".equals(memo)) { diff --git a/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antForest/AntForestV2.java b/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antForest/AntForestV2.java index 526950ed..661f1a24 100644 --- a/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antForest/AntForestV2.java +++ b/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antForest/AntForestV2.java @@ -385,7 +385,8 @@ private JSONObject collectUserEnergy(String userId) { boolean isCollectEnergy = collectEnergy.getValue() && !dontCollectMap.containsKey(userId); if (isSelf) { - if ("CAN_PLAY".equals(userHomeObject.optString("whackMoleStatus"))) { + String whackMoleStatus = userHomeObject.optString("whackMoleStatus"); + if ("CAN_PLAY".equals(whackMoleStatus) || "CAN_INITIATIVE_PLAY".equals(whackMoleStatus) || "NEED_MORE_FRIENDS".equals(whackMoleStatus)) { whackMole(); } updateDoubleTime(userHomeObject); @@ -459,10 +460,6 @@ private JSONObject collectUserEnergy(String userId) { if (!TaskCommon.IS_ENERGY_TIME) { if (isSelf) { - String whackMoleStatus = userHomeObject.optString("whackMoleStatus"); - if ("CAN_INITIATIVE_PLAY".equals(whackMoleStatus) || "NEED_MORE_FRIENDS".equals(whackMoleStatus)) { - whackMole(); - } if (totalCertCount.getValue()) { JSONObject userBaseInfo = userHomeObject.getJSONObject("userBaseInfo"); int totalCertCount = userBaseInfo.optInt("totalCertCount", 0); @@ -891,7 +888,7 @@ private void collectUserBatchEnergy(String userId, final List bubbleIdList String resultCode = jo.getString("resultCode"); if (!"SUCCESS".equalsIgnoreCase(resultCode)) { if ("PARAM_ILLEGAL2".equals(resultCode)) { - Log.record("[" + UserIdMap.getNameById(userId) + "]" + "能量已被收取,取消重试 错误信息:" + jo.getString("resultDesc")); + Log.record("[" + UserIdMap.getNameById(userId) + "]" + "能量已被收取,取消重试 错误:" + jo.getString("resultDesc")); return; } Log.record("[" + UserIdMap.getNameById(userId) + "]" + jo.getString("resultDesc"));